Skip to content

Commit

Permalink
add missing await
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-intuitem committed Oct 2, 2024
1 parent 57dbf88 commit 44e40af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/tests/utils/page-content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export class PageContent extends BasePage {
await this.tab('Loaded libraries').click();

Check failure on line 83 in frontend/tests/utils/page-content.ts

View workflow job for this annotation

GitHub Actions / functional-tests (3.11, chromium)

[chromium] › functional/detailed/common.test.ts:70:4 › Tests on applied controls item › Tests on applied controls item details › Applied controls item details are showing properly

1) [chromium] › functional/detailed/common.test.ts:70:4 › Tests on applied controls item › Tests on applied controls item details › Applied controls item details are showing properly Error: locator.click: Test timeout of 50000ms exceeded. Call log: - waiting for getByTestId('tab').filter({ hasText: 'Loaded libraries' }) at utils/page-content.ts:83 81 | // If the library is not visible, it might have already been loaded 82 | if (await this.importItemButton(name, language === 'any' ? undefined : language).isHidden()) { > 83 | await this.tab('Loaded libraries').click(); | ^ 84 | expect(this.tab('Loaded libraries').getAttribute('aria-selected')).toBeTruthy(); 85 | this.page.getByTestId('search-input').fill(name); 86 | await expect(this.getRow(name)).toBeVisible(); at PageContent.importLibrary (/home/runner/work/ciso-assistant-community/ciso-assistant-community/frontend/tests/utils/page-content.ts:83:39) at PageContent.createItem (/home/runner/work/ciso-assistant-community/ciso-assistant-community/frontend/tests/utils/page-content.ts:44:4) at /home/runner/work/ciso-assistant-community/ciso-assistant-community/frontend/tests/functional/detailed/common.test.ts:48:5

Check failure on line 83 in frontend/tests/utils/page-content.ts

View workflow job for this annotation

GitHub Actions / functional-tests (3.11, chromium)

[chromium] › functional/detailed/common.test.ts:70:4 › Tests on applied controls item › Tests on applied controls item details › Applied controls item details are showing properly

1) [chromium] › functional/detailed/common.test.ts:70:4 › Tests on applied controls item › Tests on applied controls item details › Applied controls item details are showing properly Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: locator.click: Test timeout of 50000ms exceeded. Call log: - waiting for getByTestId('tab').filter({ hasText: 'Loaded libraries' }) at utils/page-content.ts:83 81 | // If the library is not visible, it might have already been loaded 82 | if (await this.importItemButton(name, language === 'any' ? undefined : language).isHidden()) { > 83 | await this.tab('Loaded libraries').click(); | ^ 84 | expect(this.tab('Loaded libraries').getAttribute('aria-selected')).toBeTruthy(); 85 | this.page.getByTestId('search-input').fill(name); 86 | await expect(this.getRow(name)).toBeVisible(); at PageContent.importLibrary (/home/runner/work/ciso-assistant-community/ciso-assistant-community/frontend/tests/utils/page-content.ts:83:39) at PageContent.createItem (/home/runner/work/ciso-assistant-community/ciso-assistant-community/frontend/tests/utils/page-content.ts:44:4) at /home/runner/work/ciso-assistant-community/ciso-assistant-community/frontend/tests/functional/detailed/common.test.ts:48:5

Check failure on line 83 in frontend/tests/utils/page-content.ts

View workflow job for this annotation

GitHub Actions / functional-tests (3.11, chromium)

[chromium] › functional/detailed/compliance-assessments.test.ts:8:1 › compliance assessments scoring is working properly

3) [chromium] › functional/detailed/compliance-assessments.test.ts:8:1 › compliance assessments scoring is working properly Error: locator.click: Test timeout of 50000ms exceeded. Call log: - waiting for getByTestId('tab').filter({ hasText: 'Loaded libraries' }) at utils/page-content.ts:83 81 | // If the library is not visible, it might have already been loaded 82 | if (await this.importItemButton(name, language === 'any' ? undefined : language).isHidden()) { > 83 | await this.tab('Loaded libraries').click(); | ^ 84 | expect(this.tab('Loaded libraries').getAttribute('aria-selected')).toBeTruthy(); 85 | this.page.getByTestId('search-input').fill(name); 86 | await expect(this.getRow(name)).toBeVisible(); at PageContent.importLibrary (/home/runner/work/ciso-assistant-community/ciso-assistant-community/frontend/tests/utils/page-content.ts:83:39) at PageContent.createItem (/home/runner/work/ciso-assistant-community/ciso-assistant-community/frontend/tests/utils/page-content.ts:44:4) at /home/runner/work/ciso-assistant-community/ciso-assistant-community/frontend/tests/functional/detailed/compliance-assessments.test.ts:43:3
expect(this.tab('Loaded libraries').getAttribute('aria-selected')).toBeTruthy();
this.page.getByTestId('search-input').fill(name);
expect(this.getRow(name)).toBeVisible();
await expect(this.getRow(name)).toBeVisible();
return;
}
await this.importItemButton(name, language === 'any' ? undefined : language).click();
Expand All @@ -92,7 +92,7 @@ export class PageContent extends BasePage {
});
await this.tab('Loaded libraries').click();
expect(this.tab('Loaded libraries').getAttribute('aria-selected')).toBeTruthy();
expect(this.getRow(name)).toBeVisible();
await expect(this.getRow(name)).toBeVisible();

Check failure on line 95 in frontend/tests/utils/page-content.ts

View workflow job for this annotation

GitHub Actions / functional-tests (3.11, chromium)

[chromium] › functional/user-permissions.test.ts:28:3 › Analyst user has the right permissions › user can set his password

2) [chromium] › functional/user-permissions.test.ts:28:3 › Analyst user has the right permissions › user can set his password Error: Timed out 10000ms waiting for expect(locator).toBeVisible() Locator: getByRole('row', { name: 'Documents and policies' }).first() Expected: visible Received: <element(s) not found> Call log: - expect.toBeVisible with timeout 10000ms - waiting for getByRole('row', { name: 'Documents and policies' }).first() at utils/page-content.ts:95 93 | await this.tab('Loaded libraries').click(); 94 | expect(this.tab('Loaded libraries').getAttribute('aria-selected')).toBeTruthy(); > 95 | await expect(this.getRow(name)).toBeVisible(); | ^ 96 | } 97 | 98 | async viewItemDetail(value?: string) { at PageContent.importLibrary (/home/runner/work/ciso-assistant-community/ciso-assistant-community/frontend/tests/utils/page-content.ts:95:35) at PageContent.createItem (/home/runner/work/ciso-assistant-community/ciso-assistant-community/frontend/tests/utils/page-content.ts:44:4) at Object.populateDatabase (/home/runner/work/ciso-assistant-community/ciso-assistant-community/frontend/tests/utils/test-utils.ts:283:4)

Check failure on line 95 in frontend/tests/utils/page-content.ts

View workflow job for this annotation

GitHub Actions / functional-tests (3.11, chromium)

[chromium] › functional/user-permissions.test.ts:28:3 › Analyst user has the right permissions › user can set his password

2) [chromium] › functional/user-permissions.test.ts:28:3 › Analyst user has the right permissions › user can set his password Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: Timed out 10000ms waiting for expect(locator).toBeVisible() Locator: getByRole('row', { name: 'Critical risk matrix 5x5' }).first() Expected: visible Received: <element(s) not found> Call log: - expect.toBeVisible with timeout 10000ms - waiting for getByRole('row', { name: 'Critical risk matrix 5x5' }).first() at utils/page-content.ts:95 93 | await this.tab('Loaded libraries').click(); 94 | expect(this.tab('Loaded libraries').getAttribute('aria-selected')).toBeTruthy(); > 95 | await expect(this.getRow(name)).toBeVisible(); | ^ 96 | } 97 | 98 | async viewItemDetail(value?: string) { at PageContent.importLibrary (/home/runner/work/ciso-assistant-community/ciso-assistant-community/frontend/tests/utils/page-content.ts:95:35) at PageContent.createItem (/home/runner/work/ciso-assistant-community/ciso-assistant-community/frontend/tests/utils/page-content.ts:44:4) at Object.populateDatabase (/home/runner/work/ciso-assistant-community/ciso-assistant-community/frontend/tests/utils/test-utils.ts:283:4)

Check failure on line 95 in frontend/tests/utils/page-content.ts

View workflow job for this annotation

GitHub Actions / functional-tests (3.11, chromium)

[chromium] › functional/user-permissions.test.ts:28:3 › Reader user has the right permissions › user can set his password

4) [chromium] › functional/user-permissions.test.ts:28:3 › Reader user has the right permissions › user can set his password Error: Timed out 10000ms waiting for expect(locator).toBeVisible() Locator: getByRole('row', { name: 'Mitre ATT&CK v14 - Threats and mitigations' }).first() Expected: visible Received: <element(s) not found> Call log: - expect.toBeVisible with timeout 10000ms - waiting for getByRole('row', { name: 'Mitre ATT&CK v14 - Threats and mitigations' }).first() at utils/page-content.ts:95 93 | await this.tab('Loaded libraries').click(); 94 | expect(this.tab('Loaded libraries').getAttribute('aria-selected')).toBeTruthy(); > 95 | await expect(this.getRow(name)).toBeVisible(); | ^ 96 | } 97 | 98 | async viewItemDetail(value?: string) { at PageContent.importLibrary (/home/runner/work/ciso-assistant-community/ciso-assistant-community/frontend/tests/utils/page-content.ts:95:35) at PageContent.createItem (/home/runner/work/ciso-assistant-community/ciso-assistant-community/frontend/tests/utils/page-content.ts:44:4) at Object.populateDatabase (/home/runner/work/ciso-assistant-community/ciso-assistant-community/frontend/tests/utils/test-utils.ts:283:4)

Check failure on line 95 in frontend/tests/utils/page-content.ts

View workflow job for this annotation

GitHub Actions / functional-tests (3.11, chromium)

[chromium] › functional/user-route.test.ts:6:1 › user usual routine actions are working correctly

5) [chromium] › functional/user-route.test.ts:6:1 › user usual routine actions are working correctly Error: Timed out 10000ms waiting for expect(locator).toBeVisible() Locator: getByRole('row', { name: 'NIST-CSF-1.1' }).first() Expected: visible Received: <element(s) not found> Call log: - expect.toBeVisible with timeout 10000ms - waiting for getByRole('row', { name: 'NIST-CSF-1.1' }).first() at utils/page-content.ts:95 93 | await this.tab('Loaded libraries').click(); 94 | expect(this.tab('Loaded libraries').getAttribute('aria-selected')).toBeTruthy(); > 95 | await expect(this.getRow(name)).toBeVisible(); | ^ 96 | } 97 | 98 | async viewItemDetail(value?: string) { at PageContent.importLibrary (/home/runner/work/ciso-assistant-community/ciso-assistant-community/frontend/tests/utils/page-content.ts:95:35) 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
}

async viewItemDetail(value?: string) {
Expand Down

0 comments on commit 44e40af

Please sign in to comment.