mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
(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
This commit is contained in:
parent
db57815d2b
commit
52eb5325c2
@ -24,7 +24,7 @@ describe('ActionLog', function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
before(async 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 session.tempDoc(cleanup, 'Hello.grist');
|
||||||
await gu.dismissWelcomeTourIfNeeded();
|
await gu.dismissWelcomeTourIfNeeded();
|
||||||
});
|
});
|
||||||
|
@ -179,9 +179,13 @@ export class HomeUtil {
|
|||||||
const code = authenticator.generate(secret);
|
const code = authenticator.generate(secret);
|
||||||
await this.driver.find('input[name="verificationCode"]').sendKeys(code);
|
await this.driver.find('input[name="verificationCode"]').sendKeys(code);
|
||||||
await this.driver.find('.test-mfa-submit').click();
|
await this.driver.find('.test-mfa-submit').click();
|
||||||
await this.driver.wait(async () => {
|
await this.driver.wait(
|
||||||
return !await this.driver.findContent('.test-mfa-title', 'Almost there!').isPresent();
|
async () => {
|
||||||
}, 4000);
|
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…
Reference in New Issue
Block a user