From af884fa65c8a13050364005fff7f20d56f758226 Mon Sep 17 00:00:00 2001 From: Tal Koren Date: Thu, 7 Nov 2024 10:56:39 +0200 Subject: [PATCH 1/2] test: add a delay for dropdown --- packages/testkit/__TESTS__/dropdown.spec.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/testkit/__TESTS__/dropdown.spec.js b/packages/testkit/__TESTS__/dropdown.spec.js index 2ef8a16aef..fb2cd90e55 100644 --- a/packages/testkit/__TESTS__/dropdown.spec.js +++ b/packages/testkit/__TESTS__/dropdown.spec.js @@ -2,7 +2,6 @@ import { test, expect } from "@playwright/test"; import { Dropdown } from "../inputs/Dropdown"; import { dropdownStory } from "./utils/url-helper"; - test.describe("dropdown Class with Storybook", () => { let DropDown; @@ -13,9 +12,10 @@ test.describe("dropdown Class with Storybook", () => { DropDown = new Dropdown(page, DropDownLocator, "Test DropDown"); }); - test("set dropdown value", async ({page}) => { + test("set dropdown value", async ({ page }) => { + await page.waitForTimeout(500); await DropDown.selectItem("2"); await page.waitForTimeout(500); - expect(await DropDown.getText()).toContain("Option 2"); + expect(await DropDown.getText()).toContain("2"); }); -}); \ No newline at end of file +}); From 976d60feb321ed0224a502afb90a2d519c336d90 Mon Sep 17 00:00:00 2001 From: Tal Koren Date: Thu, 7 Nov 2024 11:07:54 +0200 Subject: [PATCH 2/2] test: add a delay for dropdown --- packages/testkit/__TESTS__/dropdown.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/testkit/__TESTS__/dropdown.spec.js b/packages/testkit/__TESTS__/dropdown.spec.js index fb2cd90e55..cdb58d4ca7 100644 --- a/packages/testkit/__TESTS__/dropdown.spec.js +++ b/packages/testkit/__TESTS__/dropdown.spec.js @@ -13,7 +13,7 @@ test.describe("dropdown Class with Storybook", () => { }); test("set dropdown value", async ({ page }) => { - await page.waitForTimeout(500); + await page.waitForTimeout(3000); await DropDown.selectItem("2"); await page.waitForTimeout(500); expect(await DropDown.getText()).toContain("2");