Skip to content

Commit

Permalink
Add tests for general section (59 total, 59 pass)
Browse files Browse the repository at this point in the history
  • Loading branch information
JanHoefelmeyer committed Oct 19, 2023
1 parent 71c5711 commit 15be7f7
Showing 1 changed file with 382 additions and 0 deletions.
382 changes: 382 additions & 0 deletions tests/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,385 @@ test('test select file button', async ({ page }) => {

await expect(page.getByRole('heading', { name: 'BSI-2022-0001: CVRF-CSAF-Converter: XML External Entities Vulnerability' })).toBeVisible()
});

test('general collapsible visibility', async ({ page }) => {
await page.goto('/');
await page.locator('input[type="file"]').click();
await page.locator('input[type="file"]').setInputFiles('./docs/bsi-2022-0001.json');

await expect(page.getByRole('heading', { name: ' General' })).toBeVisible()
});

test('general collapsible content ID', async ({ page }) => {
await page.goto('/');
await page.locator('input[type="file"]').click();
await page.locator('input[type="file"]').setInputFiles('./docs/bsi-2022-0001.json');

await expect(page.getByRole('cell', { name: 'ID' })).toBeVisible()
});

test('general collapsible content ID value', async ({ page }) => {
await page.goto('/');
await page.locator('input[type="file"]').click();
await page.locator('input[type="file"]').setInputFiles('./docs/bsi-2022-0001.json');

await expect(page.getByRole('cell', { name: 'BSI-2022-0001' })).toBeVisible()
});

test('general collapsible content csaf version', async ({ page }) => {
await page.goto('/');
await page.locator('input[type="file"]').click();
await page.locator('input[type="file"]').setInputFiles('./docs/bsi-2022-0001.json');

await expect(page.getByRole('cell', { name: 'CSAF-Version' })).toBeVisible()
});

test('general collapsible content csaf version value', async ({ page }) => {
await page.goto('/');
await page.locator('input[type="file"]').click();
await page.locator('input[type="file"]').setInputFiles('./docs/bsi-2022-0001.json');

await expect(page.getByRole('cell', { name: '2.0' })).toBeVisible()
});

test('general collapsible content aggregate severity text', async ({ page }) => {
await page.goto('/');
await page.locator('input[type="file"]').click();
await page.locator('input[type="file"]').setInputFiles('./docs/bsi-2022-0001.json');

await expect(page.getByRole('cell', { name: 'Aggregate severity text' })).toBeVisible()
});

test('general collapsible content aggregate severity text value', async ({ page }) => {
await page.goto('/');
await page.locator('input[type="file"]').click();
await page.locator('input[type="file"]').setInputFiles('./docs/bsi-2022-0001.json');

await expect(page.getByRole('cell', { name: 'moderate' })).toBeVisible()
});

test('general collapsible content TLP level', async ({ page }) => {
await page.goto('/');
await page.locator('input[type="file"]').click();
await page.locator('input[type="file"]').setInputFiles('./docs/bsi-2022-0001.json');

await expect(page.getByRole('cell', {name: 'TLP', exact:true})).toBeVisible()
});

test('general collapsible content TLP value', async ({ page }) => {
await page.goto('/');
await page.locator('input[type="file"]').click();
await page.locator('input[type="file"]').setInputFiles('./docs/bsi-2022-0001.json');

await expect(page.getByRole('cell', { name: 'WHITE' })).toBeVisible()
});

test('general collapsible content TLP url', async ({ page }) => {
await page.goto('/');
await page.locator('input[type="file"]').click();
await page.locator('input[type="file"]').setInputFiles('./docs/bsi-2022-0001.json');

await expect(page.getByRole('cell', { name: 'TLP URL' })).toBeVisible()
});

test('general collapsible content TLP url value', async ({ page }) => {
await page.goto('/');
await page.locator('input[type="file"]').click();
await page.locator('input[type="file"]').setInputFiles('./docs/bsi-2022-0001.json');

await expect(page.getByRole('cell', { name: 'https://www.first.org/tlp/' })).toBeVisible()
});


test('general collapsible content Category field', async ({ page }) => {
await page.goto('/');
await page.locator('input[type="file"]').click();
await page.locator('input[type="file"]').setInputFiles('./docs/bsi-2022-0001.json');

await expect(page.getByRole('cell', { name: 'Category', exact:true })).toBeVisible()
});

test('general collapsible content Category field value', async ({ page }) => {
await page.goto('/');
await page.locator('input[type="file"]').click();
await page.locator('input[type="file"]').setInputFiles('./docs/bsi-2022-0001.json');

await expect(page.getByRole('cell', { name: 'csaf_security_advisory' })).toBeVisible()
});

test('general collapsible content Title', async ({ page }) => {
await page.goto('/');
await page.locator('input[type="file"]').click();
await page.locator('input[type="file"]').setInputFiles('./docs/bsi-2022-0001.json');

await expect(page.getByRole('cell', { name: 'Title' })).toBeVisible()
});

test('general collapsible content Title value', async ({ page }) => {
await page.goto('/');
await page.locator('input[type="file"]').click();
await page.locator('input[type="file"]').setInputFiles('./docs/bsi-2022-0001.json');

await expect(page.getByRole('cell', { name: 'CVRF-CSAF-Converter: XML External Entities Vulnerability' })).toBeVisible()
});

test('general collapsible content Publisher name', async ({ page }) => {
await page.goto('/');
await page.locator('input[type="file"]').click();
await page.locator('input[type="file"]').setInputFiles('./docs/bsi-2022-0001.json');

await expect(page.getByRole('cell', { name: 'Publisher name', exact:true })).toBeVisible()
});

test('general collapsible content Publisher name value', async ({ page }) => {
await page.goto('/');
await page.locator('input[type="file"]').click();
await page.locator('input[type="file"]').setInputFiles('./docs/bsi-2022-0001.json');

await expect(page.getByRole('cell', { name: ' Bundesamt für Sicherheit in der Informationstechnik' })).toBeVisible()
});

test('general collapsible content Publisher category', async ({ page }) => {
await page.goto('/');
await page.locator('input[type="file"]').click();
await page.locator('input[type="file"]').setInputFiles('./docs/bsi-2022-0001.json');

await expect(page.getByRole('cell', { name: 'Publisher category' })).toBeVisible()
});

test('general collapsible content Publisher category value', async ({ page }) => {
await page.goto('/');
await page.locator('input[type="file"]').click();
await page.locator('input[type="file"]').setInputFiles('./docs/bsi-2022-0001.json');

await expect(page.getByRole('cell', { name: 'coordinator' })).toBeVisible()
});

test('general collapsible content Publisher namespace', async ({ page }) => {
await page.goto('/');
await page.locator('input[type="file"]').click();
await page.locator('input[type="file"]').setInputFiles('./docs/bsi-2022-0001.json');

await expect(page.getByRole('cell', { name: 'Publisher namespace' })).toBeVisible()
});

test('general collapsible content Publisher namespace value', async ({ page }) => {
await page.goto('/');
await page.locator('input[type="file"]').click();
await page.locator('input[type="file"]').setInputFiles('./docs/bsi-2022-0001.json');

await expect(page.getByRole('cell', { name: ' https://www.bsi.bund.de' })).toBeVisible()
});

test('general collapsible content Language', async ({ page }) => {
await page.goto('/');
await page.locator('input[type="file"]').click();
await page.locator('input[type="file"]').setInputFiles('./docs/bsi-2022-0001.json');

await expect(page.getByRole('cell', { name: 'Language' })).toBeVisible()
});

test('general collapsible content Language value', async ({ page }) => {
await page.goto('/');
await page.locator('input[type="file"]').click();
await page.locator('input[type="file"]').setInputFiles('./docs/bsi-2022-0001.json');

await expect(page.getByRole('cell', { name: 'en-US' })).toBeVisible()
});

test('general collapsible content Published', async ({ page }) => {
await page.goto('/');
await page.locator('input[type="file"]').click();
await page.locator('input[type="file"]').setInputFiles('./docs/bsi-2022-0001.json');

await expect(page.getByRole('cell', { name: 'Published' })).toBeVisible()
});

test('general collapsible content Published value', async ({ page }) => {
await page.goto('/');
await page.locator('input[type="file"]').click();
await page.locator('input[type="file"]').setInputFiles('./docs/bsi-2022-0001.json');

await expect(page.getByRole('cell', { name: '2022-03-17T13:03:42.105Z' }).first()).toBeVisible()
});

test('general collapsible Last update content ', async ({ page }) => {
await page.goto('/');
await page.locator('input[type="file"]').click();
await page.locator('input[type="file"]').setInputFiles('./docs/bsi-2022-0001.json');

await expect(page.getByRole('cell', { name: 'Last update' })).toBeVisible()
});

test('general collapsible content Last update value', async ({ page }) => {
await page.goto('/');
await page.locator('input[type="file"]').click();
await page.locator('input[type="file"]').setInputFiles('./docs/bsi-2022-0001.json');

await expect(page.getByRole('cell', { name: '2022-03-17T13:03:42.105Z' }).nth(1)).toBeVisible()
});

test('general collapsible content Tracking version', async ({ page }) => {
await page.goto('/');
await page.locator('input[type="file"]').click();
await page.locator('input[type="file"]').setInputFiles('./docs/bsi-2022-0001.json');

await expect(page.getByRole('cell', { name: 'Tracking version' })).toBeVisible()
});

test('general collapsible content Tracking version value', async ({ page }) => {
await page.goto('/');
await page.locator('input[type="file"]').click();
await page.locator('input[type="file"]').setInputFiles('./docs/bsi-2022-0001.json');

await expect(page.getByRole('cell', { name: '1', exact:true })).toBeVisible()
});

test('general collapsible content Generator engine', async ({ page }) => {
await page.goto('/');
await page.locator('input[type="file"]').click();
await page.locator('input[type="file"]').setInputFiles('./docs/bsi-2022-0001.json');

await expect(page.getByRole('cell', { name: 'Generator engine', exact:true })).toBeVisible()
});

test('general collapsible content Generator engine value', async ({ page }) => {
await page.goto('/');
await page.locator('input[type="file"]').click();
await page.locator('input[type="file"]').setInputFiles('./docs/bsi-2022-0001.json');

await expect(page.getByRole('cell', { name: 'Secvisogram' })).toBeVisible()
});

test('general collapsible content Generator engine version', async ({ page }) => {
await page.goto('/');
await page.locator('input[type="file"]').click();
await page.locator('input[type="file"]').setInputFiles('./docs/bsi-2022-0001.json');

await expect(page.getByRole('cell', { name: 'Generator engine version' })).toBeVisible()
});

test('general collapsible content Generator engine version value', async ({ page }) => {
await page.goto('/');
await page.locator('input[type="file"]').click();
await page.locator('input[type="file"]').setInputFiles('./docs/bsi-2022-0001.json');

await expect(page.getByRole('cell', { name: '1.12.1' })).toBeVisible()
});

test('general collapsible content Generator date', async ({ page }) => {
await page.goto('/');
await page.locator('input[type="file"]').click();
await page.locator('input[type="file"]').setInputFiles('./docs/bsi-2022-0001.json');

await expect(page.getByRole('cell', { name: 'Generator date' })).toBeVisible()
});

test('general collapsible content Generator date value', async ({ page }) => {
await page.goto('/');
await page.locator('input[type="file"]').click();
await page.locator('input[type="file"]').setInputFiles('./docs/bsi-2022-0001.json');

await expect(page.getByRole('cell', { name: '2022-03-17T13:09:42.105Z' })).toBeVisible()
});

test('general collapsible content Revision history', async ({ page }) => {
await page.goto('/');
await page.locator('input[type="file"]').click();
await page.locator('input[type="file"]').setInputFiles('./docs/bsi-2022-0001.json');

await expect(page.getByRole('heading', { name: ' Revision history' })).toBeVisible()
});

test('general collapsible content Revision history function', async ({ page }) => {
await page.goto('/');
await page.locator('input[type="file"]').click();
await page.locator('input[type="file"]').setInputFiles('./docs/bsi-2022-0001.json');

await page.getByRole('heading', { name: ' Revision history' }).click();
await expect(page.getByRole('heading', { name: ' Revision history' })).toBeVisible()
});

test('general collapsible content Revision history table', async ({ page }) => {
await page.goto('/');
await page.locator('input[type="file"]').click();
await page.locator('input[type="file"]').setInputFiles('./docs/bsi-2022-0001.json');

await page.getByRole('heading', { name: ' Revision history' }).click();
await expect(page.locator('.subsection > .collapsible > .body')).toBeVisible()
});


test('general collapsible content Revision history Date Cell', async ({ page }) => {
await page.goto('/');
await page.locator('input[type="file"]').click();
await page.locator('input[type="file"]').setInputFiles('./docs/bsi-2022-0001.json');

await page.getByRole('heading', { name: ' Revision history' }).click();
await expect(page.getByRole('cell', { name: 'Date', exact: true })).toBeVisible()
});

test('general collapsible content Revision history Date cell value', async ({ page }) => {
await page.goto('/');
await page.locator('input[type="file"]').click();
await page.locator('input[type="file"]').setInputFiles('./docs/bsi-2022-0001.json');

await page.getByRole('heading', { name: ' Revision history' }).click();
await expect(page.getByRole('cell', { name: '2022-03-17T13:03:42.105Z' }).nth(2)).toBeVisible()
});

test('general collapsible content Revision history Number Cell', async ({ page }) => {
await page.goto('/');
await page.locator('input[type="file"]').click();
await page.locator('input[type="file"]').setInputFiles('./docs/bsi-2022-0001.json');

await page.getByRole('heading', { name: ' Revision history' }).click();
await expect(page.getByRole('cell', { name: 'Number' })).toBeVisible()
});

test('general collapsible content Revision history Number cell value', async ({ page }) => {
await page.goto('/');
await page.locator('input[type="file"]').click();
await page.locator('input[type="file"]').setInputFiles('./docs/bsi-2022-0001.json');

await page.getByRole('heading', { name: ' Revision history' }).click();
await expect(page.getByRole('cell', { name: '1', exact: true }).nth(1)).toBeVisible()
});


test('general collapsible content Revision history Summary Cell', async ({ page }) => {
await page.goto('/');
await page.locator('input[type="file"]').click();
await page.locator('input[type="file"]').setInputFiles('./docs/bsi-2022-0001.json');

await page.getByRole('heading', { name: ' Revision history' }).click();
await expect(page.getByRole('cell', { name: 'Summary' })).toBeVisible()
});

test('general collapsible content Revision history Summary cell value', async ({ page }) => {
await page.goto('/');
await page.locator('input[type="file"]').click();
await page.locator('input[type="file"]').setInputFiles('./docs/bsi-2022-0001.json');

await page.getByRole('heading', { name: ' Revision history' }).click();
await expect(page.getByRole('cell', { name: 'Initial revision' })).toBeVisible()
});


test('general collapsible content Revision history Legacy version cell', async ({ page }) => {
await page.goto('/');
await page.locator('input[type="file"]').click();
await page.locator('input[type="file"]').setInputFiles('./docs/bsi-2022-0001.json');

await page.getByRole('heading', { name: ' Revision history' }).click();
await expect(page.getByRole('cell', { name: 'Legacy_version' })).toBeVisible()
});

test('general collapsible content Revision history Legacy version value', async ({ page }) => {
await page.goto('/');
await page.locator('input[type="file"]').click();
await page.locator('input[type="file"]').setInputFiles('./docs/bsi-2022-0001.json');

await page.getByRole('heading', { name: ' Revision history' }).click();
await expect(page.getByRole('row', { name: '2022-03-17T13:03:42.105Z 1 Initial revision' }).getByRole('cell').nth(3)).toBeVisible()
});

0 comments on commit 15be7f7

Please sign in to comment.