Skip to content

Commit

Permalink
FeedView basic E2E-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JanHoefelmeyer committed Oct 6, 2023
1 parent 00d67d1 commit 83a858b
Showing 1 changed file with 30 additions and 5 deletions.
35 changes: 30 additions & 5 deletions tests/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@ test("index page has URL Button", async ({ page }) => {
await expect(page.getByRole('button', { name: ' URL' })).toBeVisible();
});

test("index page has Switch to ROLIE-feed Button", async ({ page }) => {
await page.goto("/");
await expect(page.getByRole('link', { name: 'Switch to ROLIE-feed' })).toBeVisible();
});

test("index page has textbox", async ({ page }) => {
await page.goto("/");
await expect(page.locator('input[type="text"]')).toBeVisible();
Expand All @@ -48,6 +43,36 @@ test("index page has dropbox", async ({ page }) => {
expect(divTextContent).toContain("Drop your CSAF-file here");
});

test("index page has Switch to ROLIE-feed Button", async ({ page }) => {
await page.goto("/");
await expect(page.getByRole('link', { name: 'Switch to ROLIE-feed' })).toBeVisible();
});

test("index page Switch to ROLIE-feed Button works", async ({ page }) => {
await page.goto("/");
await page.getByRole('link', { name: 'Switch to ROLIE-feed' }).click();
await expect(page.getByRole('link', { name: 'Switch to Single View' })).toBeVisible();
});

test("index page ROLIE feed version has View feed button", async ({ page }) => {
await page.goto("/");
await page.getByRole('link', { name: 'Switch to ROLIE-feed' }).click();
await expect(page.getByRole('button', { name: ' View feed' })).toBeVisible();
});

test("index page ROLIE feed version has switch to single view button", async ({ page }) => {
await page.goto("/");
await page.getByRole('link', { name: 'Switch to ROLIE-feed' }).click();
await expect(page.getByRole('link', { name: 'Switch to single view' })).toBeVisible();
});

test("index page ROLIE feed version has working switch to single view button", async ({ page }) => {
await page.goto("/");
await page.getByRole('link', { name: 'Switch to ROLIE-feed' }).click();
await page.getByRole('link', { name: 'Switch to single view' }).click();
await expect(page.getByRole('link', { name: 'Switch to ROLIE-feed' })).toBeVisible();
});

test("Test dropbox", async ({ page }) => {
await page.goto("/");
const buffer = readFileSync("./docs/bsi-2022-0001.json");
Expand Down

0 comments on commit 83a858b

Please sign in to comment.