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) {
|
async function retrieveDemoUrl(mdPath: string) {
|
||||||
// ~demos/button-demo-basic
|
// ~demos/button-demo-basic
|
||||||
// breadcrumb-withIcon -> ~demos/breadcrumb-demo-withicon
|
|
||||||
return mdPath
|
return mdPath
|
||||||
.replace(/^components\//, '')
|
.replace(/^components\//, '')
|
||||||
.replace('.md', '')
|
.replace('.md', '')
|
||||||
.replace(/\//g, '-')
|
.replace(/\//g, '-');
|
||||||
.toLowerCase();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async function retrieveConfig(mdPath: string): Promise<VisualDiffConfig> {
|
async function retrieveConfig(mdPath: string): Promise<VisualDiffConfig> {
|
||||||
@ -128,7 +126,8 @@ class BrowserAuto {
|
|||||||
query.set('enable-css-var', '1');
|
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);
|
await page.goto(pageUrl);
|
||||||
// TODO: 需要禁用掉页面中的各种采集和埋点请求,避免干扰
|
// TODO: 需要禁用掉页面中的各种采集和埋点请求,避免干扰
|
||||||
|
Loading…
Reference in New Issue
Block a user