Create projects separately in home page tests
I think creating them in Promise.all was introducing nondeterminism and making tests flaky.
This commit is contained in:
@ -1527,34 +1527,32 @@ test(
|
|||||||
{ tag: '@electron' },
|
{ tag: '@electron' },
|
||||||
async ({ context, page, cmdBar, homePage }, testInfo) => {
|
async ({ context, page, cmdBar, homePage }, testInfo) => {
|
||||||
await context.folderSetupFn(async (dir) => {
|
await context.folderSetupFn(async (dir) => {
|
||||||
await Promise.all([
|
await fsp.mkdir(path.join(dir, 'router-template-slate'), {
|
||||||
fsp.mkdir(path.join(dir, 'router-template-slate'), { recursive: true }),
|
recursive: true,
|
||||||
fsp.mkdir(path.join(dir, 'bracket'), { recursive: true }),
|
})
|
||||||
])
|
await fsp.copyFile(
|
||||||
await Promise.all([
|
path.join(
|
||||||
fsp.copyFile(
|
'src',
|
||||||
path.join(
|
'wasm-lib',
|
||||||
'src',
|
'tests',
|
||||||
'wasm-lib',
|
'executor',
|
||||||
'tests',
|
'inputs',
|
||||||
'executor',
|
'router-template-slate.kcl'
|
||||||
'inputs',
|
|
||||||
'router-template-slate.kcl'
|
|
||||||
),
|
|
||||||
path.join(dir, 'router-template-slate', 'main.kcl')
|
|
||||||
),
|
),
|
||||||
fsp.copyFile(
|
path.join(dir, 'router-template-slate', 'main.kcl')
|
||||||
path.join(
|
)
|
||||||
'src',
|
await fsp.mkdir(path.join(dir, 'bracket'), { recursive: true })
|
||||||
'wasm-lib',
|
await fsp.copyFile(
|
||||||
'tests',
|
path.join(
|
||||||
'executor',
|
'src',
|
||||||
'inputs',
|
'wasm-lib',
|
||||||
'focusrite_scarlett_mounting_braket.kcl'
|
'tests',
|
||||||
),
|
'executor',
|
||||||
path.join(dir, 'bracket', 'main.kcl')
|
'inputs',
|
||||||
|
'focusrite_scarlett_mounting_braket.kcl'
|
||||||
),
|
),
|
||||||
])
|
path.join(dir, 'bracket', 'main.kcl')
|
||||||
|
)
|
||||||
})
|
})
|
||||||
const u = await getUtils(page)
|
const u = await getUtils(page)
|
||||||
await page.setBodyDimensions({ width: 1200, height: 500 })
|
await page.setBodyDimensions({ width: 1200, height: 500 })
|
||||||
|
|||||||
Reference in New Issue
Block a user