Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: integration tests setup #5459

Merged
merged 1 commit into from
May 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/page-object-models/global.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export class GlobalPage {
async setupAndUseApiCalls(extensionId: string) {
await this.page.route(/.*/, route => route.continue());
await setupMockApis(this.page);
await this.page.waitForTimeout(600);
await this.page.waitForTimeout(1500);
await this.gotoNakedRoot(extensionId);
}

Expand Down
6 changes: 3 additions & 3 deletions tests/page-object-models/onboarding.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -285,12 +285,12 @@
'd904f412b8d116540017c302f3f7033813c95902af5a067c7befcc34fa5e5290709f157f80548603a1e4f8edc2c0d5d7';

const isSignedIn = async () => {
const { encryptionKey } = await this.page.evaluate(async () =>
const { encryptionKey } = await this.page.evaluate(() =>
chrome.storage.session.get(['encryptionKey'])
);
const hasSessionKey = encryptionKey === testAccountDerivedKey;
const hasAssetsTab = this.page.getByText('Assets');
const hasActivityTab = this.page.getByText('Activity');
const hasAssetsTab = await this.page.getByText('Assets').isVisible();
const hasActivityTab = await this.page.getByText('Activity').isVisible();

return hasSessionKey && hasAssetsTab && hasActivityTab;
};
Expand All @@ -298,7 +298,7 @@
const iterationCounter = createCounter();

do {
if (iterationCounter.getValue() > 5) throw new Error('Unable to initialised wallet state');

Check failure on line 301 in tests/page-object-models/onboarding.page.ts

View workflow job for this annotation

GitHub Actions / Shard 4 of 10

[chromium] › specs/profile/profile.spec.ts:19:3 › Profile updating › should show an error for invalid profile

1) [chromium] › specs/profile/profile.spec.ts:19:3 › Profile updating › should show an error for invalid profile Error: Unable to initialised wallet state at page-object-models/onboarding.page.ts:301 299 | 300 | do { > 301 | if (iterationCounter.getValue() > 5) throw new Error('Unable to initialised wallet state'); | ^ 302 | 303 | await this.page.evaluate( 304 | async walletState => chrome.storage.local.set({ 'persist:root': walletState }), at OnboardingPage.signInWithTestAccount (/home/runner/work/extension/extension/tests/page-object-models/onboarding.page.ts:301:50) at /home/runner/work/extension/extension/tests/specs/profile/profile.spec.ts:15:5

await this.page.evaluate(
async walletState => chrome.storage.local.set({ 'persist:root': walletState }),
Expand Down
Loading