🔧 Await promise correctly to fix tests flakyness

This commit is contained in:
Elena Torro
2026-03-03 09:14:06 +01:00
committed by Belén Albeza
parent cc2c104e16
commit 9de591d9d7
2 changed files with 4 additions and 7 deletions

View File

@@ -10,7 +10,7 @@ test.beforeEach(async ({ page, context }) => {
});
test.afterEach(async ({ context }) => {
context.clearPermissions();
await context.clearPermissions();
});
test("Create a new text shape", async ({ page }) => {
@@ -27,7 +27,7 @@ test("Create a new text shape", async ({ page }) => {
await workspace.waitForSelectedShapeName(initialText);
});
test("Create a new text shape from pasting text", async ({ page, context }) => {
test("Create a new text shape from pasting text", async ({ page }) => {
const textToPaste = "Lorem ipsum";
const workspace = new WasmWorkspacePage(page, {
textEditor: true,
@@ -49,7 +49,6 @@ test("Create a new text shape from pasting text", async ({ page, context }) => {
test("Create a new text shape from pasting text using context menu", async ({
page,
context,
}) => {
const textToPaste = "Lorem ipsum";
const workspace = new WasmWorkspacePage(page, {
@@ -122,7 +121,6 @@ test.skip("Update an already created text shape by inserting text in between", a
test("Update a new text shape appending text by pasting text", async ({
page,
context,
}) => {
const textToPaste = " dolor sit amet";
const workspace = new WasmWorkspacePage(page, {
@@ -144,7 +142,6 @@ test("Update a new text shape appending text by pasting text", async ({
test.skip("Update a new text shape prepending text by pasting text", async ({
page,
context,
}) => {
const textToPaste = "Dolor sit amet ";
const workspace = new WasmWorkspacePage(page, {

View File

@@ -11,7 +11,7 @@ test.beforeEach(async ({ page, context }) => {
});
test.afterEach(async ({ context }) => {
context.clearPermissions();
await context.clearPermissions();
});
const setupVariantsFile = async (workspacePage) => {
@@ -176,7 +176,7 @@ test("User duplicates a variant container", async ({ page }) => {
await validateVariant(variant_duplicate);
});
test("User copy paste a variant container", async ({ page, context }) => {
test("User copy paste a variant container", async ({ page }) => {
const workspacePage = new WasmWorkspacePage(page);
// Access to the read/write clipboard necesary for this functionality
await setupVariantsFileWithVariant(workspacePage);