Skip to content

Commit

Permalink
ci(docker): fix e2e docker image backend deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
DenysKarmazynDFINITY committed Aug 16, 2024
1 parent 6576c7d commit 623e9c0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 26 deletions.
4 changes: 2 additions & 2 deletions docker/deploy
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ dfx start --background --quiet

./docker/wait-port "$DFX_PORT"

dfx canister create internet_identity
dfx canister create pouh_issuer
dfx canister create internet_identity --specified-id rdmx6-jaaaa-aaaaa-aaadq-cai
dfx canister create pouh_issuer --specified-id qbw6f-caaaa-aaaah-qdcwa-cai

npm run deploy

Expand Down
28 changes: 4 additions & 24 deletions e2e/homepage.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,35 +26,15 @@ test.describe('logged out user', () => {
});

testWithII.describe('logged in user', () => {
testWithII.beforeEach(async ({ page, iiPage, context }) => {
testWithII.beforeEach(async ({ page, iiPage }) => {
const url = 'http://127.0.0.1:4943';
const canisterId = 'bkyz2-fmaaa-aaaaa-qaaaq-cai';
const timeout = 180000;
const canisterId = 'rdmx6-jaaaa-aaaaa-aaadq-cai';
const timeout = 120000;
await iiPage.waitReady({ url, canisterId, timeout });

await page.goto(testUrl);

// test if adding timeout solves the issue
const iiPageCustomPromise = context.waitForEvent('page', { timeout });
await page.getByTestId('login-button').click();

const iiPageCustom = await iiPageCustomPromise;
await expect(iiPageCustom).toHaveTitle('Internet Identity', { timeout });

await iiPageCustom.locator('#registerButton').click({ timeout });
await iiPageCustom.locator('[data-action=construct-identity]').click({ timeout });

await iiPageCustom.locator('input#captchaInput').fill('a');
await iiPageCustom.locator('#confirmRegisterButton').click({ timeout });

const identity = await iiPageCustom.locator('#userNumber').textContent({ timeout });
expect(identity).not.toBeNull();

await iiPageCustom.locator('#displayUserContinue').click();
await iiPageCustom.waitForEvent('close', { timeout });
expect(iiPageCustom.isClosed()).toBe(true);

// await iiPage.signInWithNewIdentity();
await iiPage.signInWithNewIdentity();

await page.getByTestId('exchange-balance-output').waitFor({ timeout });
await page.getByTestId('tokens-skeletons-initialized').waitFor({ timeout });
Expand Down

0 comments on commit 623e9c0

Please sign in to comment.