[MM-14093] Rename 'team' to 'server' and 'tab' to 'view' in most cases, some additional cleanup (#2711)
* Rename MattermostTeam -> UniqueServer, MattermostTab -> UniqueView * Rename 'team' to 'server' * Some further cleanup * Rename weirdly named function * Rename 'tab' to 'view' in most instances * Fix i18n * PR feedback
This commit is contained in:
@@ -98,8 +98,8 @@ describe('focus', function desc() {
|
||||
it('MM-T1316 should return focus to the message box when closing the settings window', async () => {
|
||||
const mainView = this.app.windows().find((window) => window.url().includes('index'));
|
||||
const dropdownView = this.app.windows().find((window) => window.url().includes('dropdown'));
|
||||
await mainView.click('.TeamDropdownButton');
|
||||
await dropdownView.click('.TeamDropdown .TeamDropdown__button.addServer');
|
||||
await mainView.click('.ServerDropdownButton');
|
||||
await dropdownView.click('.ServerDropdown .ServerDropdown__button.addServer');
|
||||
const newServerView = await this.app.waitForEvent('window', {
|
||||
predicate: (window) => window.url().includes('newServer'),
|
||||
});
|
||||
@@ -121,15 +121,15 @@ describe('focus', function desc() {
|
||||
it('MM-T1317 should return focus to the focused box when switching servers', async () => {
|
||||
const mainView = this.app.windows().find((window) => window.url().includes('index'));
|
||||
const dropdownView = this.app.windows().find((window) => window.url().includes('dropdown'));
|
||||
await mainView.click('.TeamDropdownButton');
|
||||
await dropdownView.click('.TeamDropdown .TeamDropdown__button:has-text("community")');
|
||||
await mainView.click('.ServerDropdownButton');
|
||||
await dropdownView.click('.ServerDropdown .ServerDropdown__button:has-text("community")');
|
||||
// eslint-disable-next-line dot-notation
|
||||
const secondServer = this.serverMap['community___TAB_MESSAGING'].win;
|
||||
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}")`);
|
||||
await mainView.click('.ServerDropdownButton');
|
||||
await dropdownView.click(`.ServerDropdown .ServerDropdown__button:has-text("${config.teams[0].name}")`);
|
||||
const isTextboxFocused = await firstServer.$eval('#post_textbox', (el) => el === document.activeElement);
|
||||
isTextboxFocused.should.be.true;
|
||||
|
||||
@@ -141,8 +141,8 @@ describe('focus', function desc() {
|
||||
const textboxString = await firstServer.inputValue('#post_textbox');
|
||||
textboxString.should.equal('Mattermost');
|
||||
|
||||
await mainView.click('.TeamDropdownButton');
|
||||
await dropdownView.click('.TeamDropdown .TeamDropdown__button:has-text("community")');
|
||||
await mainView.click('.ServerDropdownButton');
|
||||
await dropdownView.click('.ServerDropdown .ServerDropdown__button:has-text("community")');
|
||||
const isLoginFocused = await secondServer.$eval('#input_loginId', (el) => el === document.activeElement);
|
||||
isLoginFocused.should.be.true;
|
||||
|
||||
|
Reference in New Issue
Block a user