Fix functional tests #87
Annotations
10 errors, 1 warning, and 1 notice
[chromium] › functional/detailed/common.test.ts:66:4 › Tests on compliance assessments item › Tests on compliance assessments item details › Compliance assessments item details are showing properly:
frontend/tests/utils/page-content.ts#L81
1) [chromium] › functional/detailed/common.test.ts:66:4 › Tests on compliance assessments item › Tests on compliance assessments item details › Compliance assessments item details are showing properly
Error: locator.click: Error: strict mode violation: getByRole('row', { name: 'NIST CSF' }).filter({ has: getByText('English').first() }).getByTestId('tablerow-import-button') resolved to 2 elements:
1) <button type="submit" data-testid="tablerow-import-butto…>…</button> aka getByRole('row', { name: 'NIST-CSF-2.0 NIST CSF version' }).getByTestId('tablerow-import-button')
2) <button type="submit" data-testid="tablerow-import-butto…>…</button> aka getByRole('row', { name: 'NIST-CSF-1.1 NIST CSF version' }).getByTestId('tablerow-import-button')
Call log:
- waiting for getByRole('row', { name: 'NIST CSF' }).filter({ has: getByText('English').first() }).getByTestId('tablerow-import-button')
at utils/page-content.ts:81
79 | }
80 | }
> 81 | await this.importItemButton(name, language).click();
| ^
82 | await this.isToastVisible('Successfully imported library ' + urn + '.+', undefined, {
83 | timeout: 15000
84 | });
at PageContent.importLibrary (/home/runner/work/ciso-assistant-community/ciso-assistant-community/frontend/tests/utils/page-content.ts:81:47)
at PageContent.createItem (/home/runner/work/ciso-assistant-community/ciso-assistant-community/frontend/tests/utils/page-content.ts:48:4)
at /home/runner/work/ciso-assistant-community/ciso-assistant-community/frontend/tests/functional/detailed/common.test.ts:48:5
|
[chromium] › functional/detailed/common.test.ts:66:4 › Tests on compliance assessments item › Tests on compliance assessments item details › Compliance assessments item details are showing properly:
frontend/tests/utils/page-content.ts#L81
1) [chromium] › functional/detailed/common.test.ts:66:4 › Tests on compliance assessments item › Tests on compliance assessments item details › Compliance assessments item details are showing properly
Retry #1 ───────────────────────────────────────────────────────────────────────────────────────
Error: locator.click: Error: strict mode violation: getByRole('row', { name: 'NIST CSF' }).filter({ has: getByText('English').first() }).getByTestId('tablerow-import-button') resolved to 2 elements:
1) <button type="submit" data-testid="tablerow-import-butto…>…</button> aka getByRole('row', { name: 'NIST-CSF-2.0 NIST CSF version' }).getByTestId('tablerow-import-button')
2) <button type="submit" data-testid="tablerow-import-butto…>…</button> aka getByRole('row', { name: 'NIST-CSF-1.1 NIST CSF version' }).getByTestId('tablerow-import-button')
Call log:
- waiting for getByRole('row', { name: 'NIST CSF' }).filter({ has: getByText('English').first() }).getByTestId('tablerow-import-button')
at utils/page-content.ts:81
79 | }
80 | }
> 81 | await this.importItemButton(name, language).click();
| ^
82 | await this.isToastVisible('Successfully imported library ' + urn + '.+', undefined, {
83 | timeout: 15000
84 | });
at PageContent.importLibrary (/home/runner/work/ciso-assistant-community/ciso-assistant-community/frontend/tests/utils/page-content.ts:81:47)
at PageContent.createItem (/home/runner/work/ciso-assistant-community/ciso-assistant-community/frontend/tests/utils/page-content.ts:48:4)
at /home/runner/work/ciso-assistant-community/ciso-assistant-community/frontend/tests/functional/detailed/common.test.ts:48:5
|
[chromium] › functional/detailed/common.test.ts:66:4 › Tests on compliance assessments item › Tests on compliance assessments item details › Compliance assessments item details are showing properly:
frontend/tests/utils/page-content.ts#L81
1) [chromium] › functional/detailed/common.test.ts:66:4 › Tests on compliance assessments item › Tests on compliance assessments item details › Compliance assessments item details are showing properly
Retry #2 ───────────────────────────────────────────────────────────────────────────────────────
Error: locator.click: Error: strict mode violation: getByRole('row', { name: 'NIST CSF' }).filter({ has: getByText('English').first() }).getByTestId('tablerow-import-button') resolved to 2 elements:
1) <button type="submit" data-testid="tablerow-import-butto…>…</button> aka getByRole('row', { name: 'NIST-CSF-2.0 NIST CSF version' }).getByTestId('tablerow-import-button')
2) <button type="submit" data-testid="tablerow-import-butto…>…</button> aka getByRole('row', { name: 'NIST-CSF-1.1 NIST CSF version' }).getByTestId('tablerow-import-button')
Call log:
- waiting for getByRole('row', { name: 'NIST CSF' }).filter({ has: getByText('English').first() }).getByTestId('tablerow-import-button')
at utils/page-content.ts:81
79 | }
80 | }
> 81 | await this.importItemButton(name, language).click();
| ^
82 | await this.isToastVisible('Successfully imported library ' + urn + '.+', undefined, {
83 | timeout: 15000
84 | });
at PageContent.importLibrary (/home/runner/work/ciso-assistant-community/ciso-assistant-community/frontend/tests/utils/page-content.ts:81:47)
at PageContent.createItem (/home/runner/work/ciso-assistant-community/ciso-assistant-community/frontend/tests/utils/page-content.ts:48:4)
at /home/runner/work/ciso-assistant-community/ciso-assistant-community/frontend/tests/functional/detailed/common.test.ts:48:5
|
[chromium] › functional/nav.test.ts:9:1 › sidebar navigation tests:
frontend/tests/functional/nav.test.ts#L54
2) [chromium] › functional/nav.test.ts:9:1 › sidebar navigation tests › more panel links are working properly
Error: Timed out 10000ms waiting for expect(locator).toHaveText(expected)
Locator: locator('#page-title')
Expected string: "Profile"
Received string: "profile"
Call log:
- expect.soft.toHaveText with timeout 10000ms
- waiting for locator('#page-title')
- locator resolved to <span id="page-title" class="text-2xl font-bold pb-1">profile</span>
- unexpected value "profile"
- locator resolved to <span id="page-title" class="text-2xl font-bold pb-1">profile</span>
- unexpected value "profile"
- locator resolved to <span id="page-title" class="text-2xl font-bold pb-1">profile</span>
- unexpected value "profile"
- locator resolved to <span id="page-title" class="text-2xl font-bold pb-1">profile</span>
- unexpected value "profile"
- locator resolved to <span id="page-title" class="text-2xl font-bold pb-1">profile</span>
- unexpected value "profile"
- locator resolved to <span id="page-title" class="text-2xl font-bold pb-1">profile</span>
- unexpected value "profile"
- locator resolved to <span id="page-title" class="text-2xl font-bold pb-1">profile</span>
- unexpected value "profile"
- locator resolved to <span id="page-title" class="text-2xl font-bold pb-1">profile</span>
- unexpected value "profile"
- locator resolved to <span id="page-title" class="text-2xl font-bold pb-1">profile</span>
- unexpected value "profile"
- locator resolved to <span id="page-title" class="text-2xl font-bold pb-1">profile</span>
- unexpected value "profile"
- locator resolved to <span id="page-title" class="text-2xl font-bold pb-1">profile</span>
- unexpected value "profile"
- locator resolved to <span id="page-title" class="text-2xl font-bold pb-1">profile</span>
- unexpected value "profile"
- locator resolved to <span id="page-title" class="text-2xl font-bold pb-1">profile</span>
- unexpected value "profile"
- locator resolved to <span id="page-title" class="text-2xl font-bold pb-1">profile</span>
- unexpected value "profile"
52 | await expect(sideBar.morePanel).toHaveAttribute('inert');
53 | await expect(page).toHaveURL('/profile');
> 54 | await expect.soft(logedPage.pageTitle).toHaveText('Profile');
| ^
55 |
56 | await sideBar.moreButton.click();
57 | await expect(sideBar.morePanel).not.toHaveAttribute('inert');
at /home/runner/work/ciso-assistant-community/ciso-assistant-community/frontend/tests/functional/nav.test.ts:54:42
at /home/runner/work/ciso-assistant-community/ciso-assistant-community/frontend/tests/functional/nav.test.ts:47:2
|
[chromium] › functional/nav.test.ts:9:1 › sidebar navigation tests:
frontend/tests/functional/nav.test.ts#L54
2) [chromium] › functional/nav.test.ts:9:1 › sidebar navigation tests › more panel links are working properly
Retry #1 ───────────────────────────────────────────────────────────────────────────────────────
Error: Timed out 10000ms waiting for expect(locator).toHaveText(expected)
Locator: locator('#page-title')
Expected string: "Profile"
Received string: "profile"
Call log:
- expect.soft.toHaveText with timeout 10000ms
- waiting for locator('#page-title')
- locator resolved to <span id="page-title" class="text-2xl font-bold pb-1">profile</span>
- unexpected value "profile"
- locator resolved to <span id="page-title" class="text-2xl font-bold pb-1">profile</span>
- unexpected value "profile"
- locator resolved to <span id="page-title" class="text-2xl font-bold pb-1">profile</span>
- unexpected value "profile"
- locator resolved to <span id="page-title" class="text-2xl font-bold pb-1">profile</span>
- unexpected value "profile"
- locator resolved to <span id="page-title" class="text-2xl font-bold pb-1">profile</span>
- unexpected value "profile"
- locator resolved to <span id="page-title" class="text-2xl font-bold pb-1">profile</span>
- unexpected value "profile"
- locator resolved to <span id="page-title" class="text-2xl font-bold pb-1">profile</span>
- unexpected value "profile"
- locator resolved to <span id="page-title" class="text-2xl font-bold pb-1">profile</span>
- unexpected value "profile"
- locator resolved to <span id="page-title" class="text-2xl font-bold pb-1">profile</span>
- unexpected value "profile"
- locator resolved to <span id="page-title" class="text-2xl font-bold pb-1">profile</span>
- unexpected value "profile"
- locator resolved to <span id="page-title" class="text-2xl font-bold pb-1">profile</span>
- unexpected value "profile"
- locator resolved to <span id="page-title" class="text-2xl font-bold pb-1">profile</span>
- unexpected value "profile"
- locator resolved to <span id="page-title" class="text-2xl font-bold pb-1">profile</span>
- unexpected value "profile"
- locator resolved to <span id="page-title" class="text-2xl font-bold pb-1">profile</span>
- unexpected value "profile"
52 | await expect(sideBar.morePanel).toHaveAttribute('inert');
53 | await expect(page).toHaveURL('/profile');
> 54 | await expect.soft(logedPage.pageTitle).toHaveText('Profile');
| ^
55 |
56 | await sideBar.moreButton.click();
57 | await expect(sideBar.morePanel).not.toHaveAttribute('inert');
at /home/runner/work/ciso-assistant-community/ciso-assistant-community/frontend/tests/functional/nav.test.ts:54:42
at /home/runner/work/ciso-assistant-community/ciso-assistant-community/frontend/tests/functional/nav.test.ts:47:2
|
[chromium] › functional/nav.test.ts:9:1 › sidebar navigation tests:
frontend/tests/functional/nav.test.ts#L54
2) [chromium] › functional/nav.test.ts:9:1 › sidebar navigation tests › more panel links are working properly
Retry #2 ───────────────────────────────────────────────────────────────────────────────────────
Error: Timed out 10000ms waiting for expect(locator).toHaveText(expected)
Locator: locator('#page-title')
Expected string: "Profile"
Received string: "profile"
Call log:
- expect.soft.toHaveText with timeout 10000ms
- waiting for locator('#page-title')
- locator resolved to <span id="page-title" class="text-2xl font-bold pb-1">profile</span>
- unexpected value "profile"
- locator resolved to <span id="page-title" class="text-2xl font-bold pb-1">profile</span>
- unexpected value "profile"
- locator resolved to <span id="page-title" class="text-2xl font-bold pb-1">profile</span>
- unexpected value "profile"
- locator resolved to <span id="page-title" class="text-2xl font-bold pb-1">profile</span>
- unexpected value "profile"
- locator resolved to <span id="page-title" class="text-2xl font-bold pb-1">profile</span>
- unexpected value "profile"
- locator resolved to <span id="page-title" class="text-2xl font-bold pb-1">profile</span>
- unexpected value "profile"
- locator resolved to <span id="page-title" class="text-2xl font-bold pb-1">profile</span>
- unexpected value "profile"
- locator resolved to <span id="page-title" class="text-2xl font-bold pb-1">profile</span>
- unexpected value "profile"
- locator resolved to <span id="page-title" class="text-2xl font-bold pb-1">profile</span>
- unexpected value "profile"
- locator resolved to <span id="page-title" class="text-2xl font-bold pb-1">profile</span>
- unexpected value "profile"
- locator resolved to <span id="page-title" class="text-2xl font-bold pb-1">profile</span>
- unexpected value "profile"
- locator resolved to <span id="page-title" class="text-2xl font-bold pb-1">profile</span>
- unexpected value "profile"
- locator resolved to <span id="page-title" class="text-2xl font-bold pb-1">profile</span>
- unexpected value "profile"
- locator resolved to <span id="page-title" class="text-2xl font-bold pb-1">profile</span>
- unexpected value "profile"
52 | await expect(sideBar.morePanel).toHaveAttribute('inert');
53 | await expect(page).toHaveURL('/profile');
> 54 | await expect.soft(logedPage.pageTitle).toHaveText('Profile');
| ^
55 |
56 | await sideBar.moreButton.click();
57 | await expect(sideBar.morePanel).not.toHaveAttribute('inert');
at /home/runner/work/ciso-assistant-community/ciso-assistant-community/frontend/tests/functional/nav.test.ts:54:42
at /home/runner/work/ciso-assistant-community/ciso-assistant-community/frontend/tests/functional/nav.test.ts:47:2
|
[chromium] › functional/user-route.test.ts:6:1 › user usual routine actions are working correctly:
frontend/tests/utils/page-content.ts#L81
3) [chromium] › functional/user-route.test.ts:6:1 › user usual routine actions are working correctly
Error: locator.click: Error: strict mode violation: getByRole('row', { name: 'NIST CSF' }).filter({ has: getByText('English').first() }).getByTestId('tablerow-import-button') resolved to 2 elements:
1) <button type="submit" data-testid="tablerow-import-butto…>…</button> aka getByRole('row', { name: 'NIST-CSF-2.0 NIST CSF version' }).getByTestId('tablerow-import-button')
2) <button type="submit" data-testid="tablerow-import-butto…>…</button> aka getByRole('row', { name: 'NIST-CSF-1.1 NIST CSF version' }).getByTestId('tablerow-import-button')
Call log:
- waiting for getByRole('row', { name: 'NIST CSF' }).filter({ has: getByText('English').first() }).getByTestId('tablerow-import-button')
at utils/page-content.ts:81
79 | }
80 | }
> 81 | await this.importItemButton(name, language).click();
| ^
82 | await this.isToastVisible('Successfully imported library ' + urn + '.+', undefined, {
83 | timeout: 15000
84 | });
at PageContent.importLibrary (/home/runner/work/ciso-assistant-community/ciso-assistant-community/frontend/tests/utils/page-content.ts:81:47)
at /home/runner/work/ciso-assistant-community/ciso-assistant-community/frontend/tests/functional/user-route.test.ts:75:3
at /home/runner/work/ciso-assistant-community/ciso-assistant-community/frontend/tests/functional/user-route.test.ts:66:2
|
[chromium] › functional/user-route.test.ts:6:1 › user usual routine actions are working correctly:
frontend/tests/functional/user-route.test.ts#L250
3) [chromium] › functional/user-route.test.ts:6:1 › user usual routine actions are working correctly
Test timeout of 150000ms exceeded while running "afterEach" hook.
248 | });
249 |
> 250 | test.afterEach('cleanup', async ({ foldersPage, usersPage, page }) => {
| ^
251 | await foldersPage.goto();
252 | await page.waitForURL(foldersPage.url);
253 | await foldersPage.deleteItemButton(vars.folderName).click();
at /home/runner/work/ciso-assistant-community/ciso-assistant-community/frontend/tests/functional/user-route.test.ts:250:6
|
[chromium] › functional/user-route.test.ts:6:1 › user usual routine actions are working correctly:
frontend/tests/utils/page-content.ts#L81
3) [chromium] › functional/user-route.test.ts:6:1 › user usual routine actions are working correctly
Retry #1 ───────────────────────────────────────────────────────────────────────────────────────
Error: locator.click: Error: strict mode violation: getByRole('row', { name: 'NIST CSF' }).filter({ has: getByText('English').first() }).getByTestId('tablerow-import-button') resolved to 2 elements:
1) <button type="submit" data-testid="tablerow-import-butto…>…</button> aka getByRole('row', { name: 'NIST-CSF-2.0 NIST CSF version' }).getByTestId('tablerow-import-button')
2) <button type="submit" data-testid="tablerow-import-butto…>…</button> aka getByRole('row', { name: 'NIST-CSF-1.1 NIST CSF version' }).getByTestId('tablerow-import-button')
Call log:
- waiting for getByRole('row', { name: 'NIST CSF' }).filter({ has: getByText('English').first() }).getByTestId('tablerow-import-button')
at utils/page-content.ts:81
79 | }
80 | }
> 81 | await this.importItemButton(name, language).click();
| ^
82 | await this.isToastVisible('Successfully imported library ' + urn + '.+', undefined, {
83 | timeout: 15000
84 | });
at PageContent.importLibrary (/home/runner/work/ciso-assistant-community/ciso-assistant-community/frontend/tests/utils/page-content.ts:81:47)
at /home/runner/work/ciso-assistant-community/ciso-assistant-community/frontend/tests/functional/user-route.test.ts:75:3
at /home/runner/work/ciso-assistant-community/ciso-assistant-community/frontend/tests/functional/user-route.test.ts:66:2
|
[chromium] › functional/user-route.test.ts:6:1 › user usual routine actions are working correctly:
frontend/tests/functional/user-route.test.ts#L250
3) [chromium] › functional/user-route.test.ts:6:1 › user usual routine actions are working correctly
Retry #1 ───────────────────────────────────────────────────────────────────────────────────────
Test timeout of 150000ms exceeded while running "afterEach" hook.
248 | });
249 |
> 250 | test.afterEach('cleanup', async ({ foldersPage, usersPage, page }) => {
| ^
251 | await foldersPage.goto();
252 | await page.waitForURL(foldersPage.url);
253 | await foldersPage.deleteItemButton(vars.folderName).click();
at /home/runner/work/ciso-assistant-community/ciso-assistant-community/frontend/tests/functional/user-route.test.ts:250:6
|
functional-tests (3.11)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/setup-python@v4. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
🎭 Playwright Run Summary
6 failed
[chromium] › functional/detailed/common.test.ts:66:4 › Tests on compliance assessments item › Tests on compliance assessments item details › Compliance assessments item details are showing properly
[chromium] › functional/nav.test.ts:9:1 › sidebar navigation tests ─────────────────────────────
[chromium] › functional/user-route.test.ts:6:1 › user usual routine actions are working correctly
[firefox] › functional/detailed/common.test.ts:66:4 › Tests on compliance assessments item › Tests on compliance assessments item details › Compliance assessments item details are showing properly
[firefox] › functional/nav.test.ts:9:1 › sidebar navigation tests ──────────────────────────────
[firefox] › functional/user-route.test.ts:6:1 › user usual routine actions are working correctly
20 skipped
38 passed (30.9m)
|