mirror of
https://github.com/penpot/penpot.git
synced 2025-12-11 22:14:05 +01:00
WIP
This commit is contained in:
@@ -22,7 +22,7 @@ export default defineConfig({
|
||||
workers: 1,
|
||||
/* Timeout for expects (longer in CI) */
|
||||
expect: {
|
||||
timeout: process.env.CI ? 20000 : 5000,
|
||||
timeout: process.env.CI ? 60000 : 5000,
|
||||
},
|
||||
|
||||
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
|
||||
|
||||
@@ -36,6 +36,12 @@ const setupVariantsFileWithVariant = async (workspacePage) => {
|
||||
await workspacePage.clickLeafLayer("Rectangle");
|
||||
await workspacePage.page.keyboard.press("Control+k");
|
||||
await workspacePage.page.keyboard.press("Control+k");
|
||||
|
||||
// We wait until layer-row starts looking like it an component
|
||||
await workspacePage.page.getByTestId("layer-row")
|
||||
.filter({ hasText: "Rectangle"})
|
||||
.getByTestId("icon-component")
|
||||
.waitFor();
|
||||
};
|
||||
|
||||
const findVariant = async (workspacePage, index) => {
|
||||
@@ -76,17 +82,13 @@ const findVariantNoWait = (workspacePage, index) => {
|
||||
const variant1 = workspacePage.layers
|
||||
.getByTestId("layer-row")
|
||||
.filter({ hasText: "Value 1" })
|
||||
.filter({ has: workspacePage.page.getByTestId("icon-variant") })
|
||||
.nth(index);
|
||||
|
||||
const variant2 = workspacePage.layers
|
||||
.getByTestId("layer-row")
|
||||
.filter({ hasText: "Value 2" })
|
||||
.filter({ has: workspacePage.page.getByTestId("icon-variant") })
|
||||
.nth(index);
|
||||
|
||||
// await container.waitFor();
|
||||
|
||||
return {
|
||||
container: container,
|
||||
variant1: variant1,
|
||||
|
||||
Reference in New Issue
Block a user