Refactor: Improve wait times and visibility checks in store-shard-3.spec.ts (#5108)
* Refactor: Improve wait times and visibility checks in store-shard-3.spec.ts
This commit is contained in:
parent
b682a26c26
commit
f97a326023
1 changed files with 14 additions and 18 deletions
|
|
@ -16,10 +16,8 @@ test(
|
||||||
}
|
}
|
||||||
|
|
||||||
await page.goto("/");
|
await page.goto("/");
|
||||||
await page.waitForTimeout(1000);
|
|
||||||
|
|
||||||
await page.getByTestId("button-store").click();
|
await page.getByTestId("button-store").click();
|
||||||
await page.waitForTimeout(1000);
|
|
||||||
|
|
||||||
await page.getByTestId("api-key-button-store").click();
|
await page.getByTestId("api-key-button-store").click();
|
||||||
|
|
||||||
|
|
@ -29,18 +27,16 @@ test(
|
||||||
|
|
||||||
await page.getByTestId("api-key-save-button-store").click();
|
await page.getByTestId("api-key-save-button-store").click();
|
||||||
|
|
||||||
await page.waitForTimeout(1000);
|
await expect(page.getByText("API key saved successfully")).toBeVisible({
|
||||||
await page.getByText("Success! Your API Key has been saved.").isVisible();
|
timeout: 5000,
|
||||||
|
});
|
||||||
await page.waitForTimeout(1000);
|
|
||||||
|
|
||||||
await page.getByTestId("button-store").click();
|
await page.getByTestId("button-store").click();
|
||||||
await page.waitForTimeout(1000);
|
|
||||||
|
|
||||||
await page.getByText("Basic RAG").isVisible();
|
await expect(page.getByText("Basic RAG")).toBeVisible({ timeout: 30000 });
|
||||||
|
|
||||||
await page.getByTestId("select-order-store").click();
|
await page.getByTestId("select-order-store").click();
|
||||||
await page.waitForTimeout(1000);
|
|
||||||
await page.getByText("Alphabetical").click();
|
await page.getByText("Alphabetical").click();
|
||||||
|
|
||||||
await page.getByText("Album Cover Builder").isVisible();
|
await page.getByText("Album Cover Builder").isVisible();
|
||||||
|
|
@ -61,18 +57,19 @@ test("should filter by type", { tag: ["@release"] }, async ({ page }) => {
|
||||||
dotenv.config({ path: path.resolve(__dirname, "../../.env") });
|
dotenv.config({ path: path.resolve(__dirname, "../../.env") });
|
||||||
}
|
}
|
||||||
await page.goto("/");
|
await page.goto("/");
|
||||||
await page.waitForTimeout(1000);
|
|
||||||
await page.getByTestId("button-store").click();
|
await page.getByTestId("button-store").click();
|
||||||
await page.waitForTimeout(1000);
|
await page.waitForSelector('[data-testid="api-key-button-store"]', {
|
||||||
|
timeout: 100000,
|
||||||
|
});
|
||||||
await page.getByTestId("api-key-button-store").click();
|
await page.getByTestId("api-key-button-store").click();
|
||||||
await page
|
await page
|
||||||
.getByPlaceholder("Insert your API Key")
|
.getByPlaceholder("Insert your API Key")
|
||||||
.fill(process.env.STORE_API_KEY ?? "");
|
.fill(process.env.STORE_API_KEY ?? "");
|
||||||
await page.getByTestId("api-key-save-button-store").click();
|
await page.getByTestId("api-key-save-button-store").click();
|
||||||
await page.waitForTimeout(1000);
|
await expect(page.getByText("API key saved successfully")).toBeVisible({
|
||||||
await page.getByText("Success! Your API Key has been saved.").isVisible();
|
timeout: 5000,
|
||||||
|
});
|
||||||
await page.getByTestId("button-store").click();
|
await page.getByTestId("button-store").click();
|
||||||
await page.waitForTimeout(1000);
|
|
||||||
await page.waitForSelector('[data-testid="likes-Website Content QA"]', {
|
await page.waitForSelector('[data-testid="likes-Website Content QA"]', {
|
||||||
timeout: 100000,
|
timeout: 100000,
|
||||||
});
|
});
|
||||||
|
|
@ -81,7 +78,6 @@ test("should filter by type", { tag: ["@release"] }, async ({ page }) => {
|
||||||
timeout: 100000,
|
timeout: 100000,
|
||||||
});
|
});
|
||||||
await page.getByTestId("flows-button-store").click();
|
await page.getByTestId("flows-button-store").click();
|
||||||
await page.waitForTimeout(1000);
|
|
||||||
await page.waitForSelector('[data-testid="icon-Group"]', {
|
await page.waitForSelector('[data-testid="icon-Group"]', {
|
||||||
timeout: 100000,
|
timeout: 100000,
|
||||||
});
|
});
|
||||||
|
|
@ -92,8 +88,9 @@ test("should filter by type", { tag: ["@release"] }, async ({ page }) => {
|
||||||
timeout: 100000,
|
timeout: 100000,
|
||||||
});
|
});
|
||||||
await page.getByTestId("components-button-store").click();
|
await page.getByTestId("components-button-store").click();
|
||||||
await page.waitForTimeout(1000);
|
await expect(page.getByTestId("icon-Group").last()).toBeHidden({
|
||||||
await page.getByTestId("icon-Group").last().isHidden();
|
timeout: 30000,
|
||||||
|
});
|
||||||
await page.waitForSelector('[data-testid="icon-ToyBrick"]', {
|
await page.waitForSelector('[data-testid="icon-ToyBrick"]', {
|
||||||
timeout: 100000,
|
timeout: 100000,
|
||||||
});
|
});
|
||||||
|
|
@ -103,7 +100,6 @@ test("should filter by type", { tag: ["@release"] }, async ({ page }) => {
|
||||||
timeout: 100000,
|
timeout: 100000,
|
||||||
});
|
});
|
||||||
await page.getByTestId("all-button-store").click();
|
await page.getByTestId("all-button-store").click();
|
||||||
await page.waitForTimeout(1000);
|
|
||||||
await page.waitForSelector('[data-testid="icon-Group"]', {
|
await page.waitForSelector('[data-testid="icon-Group"]', {
|
||||||
timeout: 100000,
|
timeout: 100000,
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue