(core) make cognito logins for tests work on slightly smaller screens

Summary:
A selfish diff to tweak deployment tests so they pass on a
slightly smaller laptop screen that for whatever reason trips
a css breakpoint on the cognito login page.

Test Plan: manual

Reviewers: georgegevoian

Reviewed By: georgegevoian

Differential Revision: https://phab.getgrist.com/D3292
This commit is contained in:
Paul Fitzpatrick 2022-02-25 13:28:57 -05:00
parent c2070877b6
commit c91593e312

View File

@ -140,12 +140,15 @@ export class HomeUtil {
if ((await this.driver.getCurrentUrl()).match(/signup\?/)) {
await this.driver.findWait('a[href*="login?"]', 4000).click();
}
await this.driver.findWait('div.modal-content-desktop input[name="username"]', 4000);
await this.setValue(this.driver.findWait('div.modal-content-desktop input[name="username"]', 4000),
email);
await this.setValue(this.driver.findWait('div.modal-content-desktop input[name="password"]', 4000),
password);
await this.driver.find('div.modal-content-desktop input[name="signInSubmitButton"]').click();
// There are two login forms, one hidden, one shown. Pick the one that is shown.
const block =
(await this.driver.find('div.modal-content-desktop').isDisplayed()) ?
(await this.driver.find('div.modal-content-desktop')) :
(await this.driver.find('div.modal-content-mobile'));
await block.findWait('input[name="username"]', 4000);
await this.setValue(block.findWait('input[name="username"]', 4000), email);
await this.setValue(block.findWait('input[name="password"]', 4000), password);
await block.find('input[name="signInSubmitButton"]').click();
}
/**