[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:
Devin Binnie
2023-05-08 09:17:01 -04:00
committed by GitHub
parent 9f75ddcf0f
commit 316beba950
110 changed files with 1698 additions and 1757 deletions

View File

@@ -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;