mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-24 02:59:58 +08:00
ci: re-handle url
This commit is contained in:
parent
fc428073b5
commit
ebc5328b95
@ -23,12 +23,10 @@ const themes = ['default', 'dark', 'compact'];
|
||||
|
||||
async function retrieveDemoUrl(mdPath: string) {
|
||||
// ~demos/button-demo-basic
|
||||
// breadcrumb-withIcon -> ~demos/breadcrumb-demo-withicon
|
||||
return mdPath
|
||||
.replace(/^components\//, '')
|
||||
.replace('.md', '')
|
||||
.replace(/\//g, '-')
|
||||
.toLowerCase();
|
||||
.replace(/\//g, '-');
|
||||
}
|
||||
|
||||
async function retrieveConfig(mdPath: string): Promise<VisualDiffConfig> {
|
||||
@ -128,7 +126,8 @@ class BrowserAuto {
|
||||
query.set('enable-css-var', '1');
|
||||
}
|
||||
|
||||
const pageUrl = `http://localhost:${port}/~demos/${demoUrl}?${query.toString()}`;
|
||||
// breadcrumb-withIcon -> ~demos/breadcrumb-demo-withicon
|
||||
const pageUrl = `http://localhost:${port}/~demos/${demoUrl.toLowerCase()}?${query.toString()}`;
|
||||
|
||||
await page.goto(pageUrl);
|
||||
// TODO: 需要禁用掉页面中的各种采集和埋点请求,避免干扰
|
||||
|
Loading…
Reference in New Issue
Block a user