Skip to content

Commit

Permalink
test(apps/web): Add e2e test for importing specifications
Browse files Browse the repository at this point in the history
  • Loading branch information
nevendyulgerov committed Jan 13, 2025
1 parent b71aeab commit a066625
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion apps/web/e2e/pages/specifications.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,19 @@ test("should have correct title", async ({ page }) => {
test("should display empty state", async ({ page }) => {
await expect(page.getByText("No Specifications Found!")).toBeVisible();
await expect(page.getByText("Create one")).toBeVisible();
await expect(page.getByText("Import Specifications")).toBeVisible();
await expect(page.getByText("Import specifications")).toBeVisible();
});

test("should open file chooser when 'Import Specifications' is clicked", async ({
page,
}) => {
const importSpecificationsButton = page.getByText("Import specifications");
await expect(importSpecificationsButton).toBeVisible();

const fileChooserPromise = page.waitForEvent("filechooser");
await importSpecificationsButton.click();

const fileChooser = await fileChooserPromise;

expect(fileChooser.isMultiple()).toBe(false);
});

0 comments on commit a066625

Please sign in to comment.