Fixes to E2E tests for v5.1.1 (#2169)

This commit is contained in:
Devin Binnie 2022-06-22 12:43:24 -04:00 committed by GitHub
parent 895d8bd077
commit 7440a73ca2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 12 deletions

View file

@ -189,12 +189,12 @@ module.exports = {
},
async loginToMattermost(window) {
await window.waitForSelector('#loginId');
await window.waitForSelector('#loginPassword');
await window.waitForSelector('#loginButton');
await window.type('#loginId', 'user-1');
await window.type('#loginPassword', 'SampleUs@r-1');
await window.click('#loginButton');
await window.waitForSelector('#input_loginId');
await window.waitForSelector('#input_password-input');
await window.waitForSelector('#saveSetting');
await window.type('#input_loginId', 'user-1');
await window.type('#input_password-input', 'SampleUs@r-1');
await window.click('#saveSetting');
},
addClientCommands(client) {

View file

@ -124,8 +124,8 @@ describe('focus', function desc() {
await dropdownView.click('.TeamDropdown .TeamDropdown__button:has-text("community")');
// eslint-disable-next-line dot-notation
const secondServer = this.serverMap['community___TAB_MESSAGING'].win;
await secondServer.waitForSelector('#loginId');
await secondServer.focus('#loginId');
await secondServer.waitForSelector('#input_loginId');
await secondServer.focus('#input_loginId');
await mainView.click('.TeamDropdownButton');
await dropdownView.click(`.TeamDropdown .TeamDropdown__button:has-text("${config.teams[0].name}")`);
@ -142,7 +142,7 @@ describe('focus', function desc() {
await mainView.click('.TeamDropdownButton');
await dropdownView.click('.TeamDropdown .TeamDropdown__button:has-text("community")');
const isLoginFocused = await secondServer.$eval('#loginId', (el) => el === document.activeElement);
const isLoginFocused = await secondServer.$eval('#input_loginId', (el) => el === document.activeElement);
isLoginFocused.should.be.true;
// Make sure you can just start typing and it'll go in the post textbox
@ -150,7 +150,7 @@ describe('focus', function desc() {
robot.typeString('username');
await asyncSleep(500);
const loginString = await secondServer.inputValue('#loginId');
const loginString = await secondServer.inputValue('#input_loginId');
loginString.should.equal('username');
});
});

View file

@ -68,7 +68,7 @@ describe('back_button', function desc() {
poweredByOneLogin.should.not.be.null;
await backButton.click();
let loginPrompt = await firstServer.waitForSelector('#loginId');
let loginPrompt = await firstServer.waitForSelector('#input_loginId');
loginPrompt.should.not.be.null;
await mainWindow.waitForSelector('button:has-text("Back")', {state: 'hidden'});
@ -88,7 +88,7 @@ describe('back_button', function desc() {
await backButton.click();
await backButton.click();
loginPrompt = await firstServer.waitForSelector('#loginId');
loginPrompt = await firstServer.waitForSelector('#input_loginId');
loginPrompt.should.not.be.null;
});
});