(core) Use different user in ActionLog tests

Summary:
Nearby deployment tests used the same user, which was
causing the full suite to fail. Repeated logins with a second
verification step (TOTP) fail in Cognito if the same verification code
is used twice. This happened to be the case since the gap
between tests wasn't long enough for a new code to be generated.

Test Plan: Manually verified deployment tests now pass.

Reviewers: jarek

Reviewed By: jarek

Differential Revision: https://phab.getgrist.com/D3414
pull/203/head
George Gevoian 2 years ago
parent db57815d2b
commit 52eb5325c2

@ -24,7 +24,7 @@ describe('ActionLog', function() {
}
before(async function() {
const session = await gu.session().user('user4').login();
const session = await gu.session().user('user1').login();
await session.tempDoc(cleanup, 'Hello.grist');
await gu.dismissWelcomeTourIfNeeded();
});

@ -179,9 +179,13 @@ export class HomeUtil {
const code = authenticator.generate(secret);
await this.driver.find('input[name="verificationCode"]').sendKeys(code);
await this.driver.find('.test-mfa-submit').click();
await this.driver.wait(async () => {
return !await this.driver.findContent('.test-mfa-title', 'Almost there!').isPresent();
}, 4000);
await this.driver.wait(
async () => {
return !await this.driver.findContent('.test-mfa-title', 'Almost there!').isPresent();
},
4000,
'Possible reason: verification code is invalid or expired (i.e. was recently used to log in)'
);
}
/**

Loading…
Cancel
Save