[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:
@@ -32,9 +32,9 @@ describe('menu_bar/dropdown', function desc() {
|
||||
|
||||
const mainWindow = this.app.windows().find((window) => window.url().includes('index'));
|
||||
const dropdownView = this.app.windows().find((window) => window.url().includes('dropdown'));
|
||||
await mainWindow.click('.TeamDropdownButton');
|
||||
const firstMenuItem = await dropdownView.innerText('.TeamDropdown button.TeamDropdown__button:nth-child(1) span');
|
||||
const secondMenuItem = await dropdownView.innerText('.TeamDropdown button.TeamDropdown__button:nth-child(2) span');
|
||||
await mainWindow.click('.ServerDropdownButton');
|
||||
const firstMenuItem = await dropdownView.innerText('.ServerDropdown button.ServerDropdown__button:nth-child(1) span');
|
||||
const secondMenuItem = await dropdownView.innerText('.ServerDropdown button.ServerDropdown__button:nth-child(2) span');
|
||||
|
||||
firstMenuItem.should.equal(config.teams[0].name);
|
||||
secondMenuItem.should.equal(config.teams[1].name);
|
||||
@@ -57,7 +57,7 @@ describe('menu_bar/dropdown', function desc() {
|
||||
let dropdownHeight = await browserWindow.evaluate((window) => window.getBrowserViews().find((view) => view.webContents.getURL().includes('dropdown')).getBounds().height);
|
||||
dropdownHeight.should.equal(0);
|
||||
|
||||
await mainWindow.click('.TeamDropdownButton');
|
||||
await mainWindow.click('.ServerDropdownButton');
|
||||
dropdownHeight = await browserWindow.evaluate((window) => window.getBrowserViews().find((view) => view.webContents.getURL().includes('dropdown')).getBounds().height);
|
||||
dropdownHeight.should.be.greaterThan(0);
|
||||
});
|
||||
@@ -74,8 +74,8 @@ describe('menu_bar/dropdown', function desc() {
|
||||
|
||||
const mainWindow = this.app.windows().find((window) => window.url().includes('index'));
|
||||
const dropdownView = this.app.windows().find((window) => window.url().includes('dropdown'));
|
||||
await mainWindow.click('.TeamDropdownButton');
|
||||
await dropdownView.click('.TeamDropdown__button.addServer');
|
||||
await mainWindow.click('.ServerDropdownButton');
|
||||
await dropdownView.click('.ServerDropdown__button.addServer');
|
||||
|
||||
const newServerModal = await this.app.waitForEvent('window', {
|
||||
predicate: (window) => window.url().includes('newServer'),
|
||||
@@ -107,8 +107,8 @@ describe('menu_bar/dropdown', function desc() {
|
||||
});
|
||||
|
||||
it('MM-T4408_2 should show the second view after clicking the menu item', async () => {
|
||||
await mainWindow.click('.TeamDropdownButton');
|
||||
await dropdownView.click('.TeamDropdown button.TeamDropdown__button:nth-child(2)');
|
||||
await mainWindow.click('.ServerDropdownButton');
|
||||
await dropdownView.click('.ServerDropdown button.ServerDropdown__button:nth-child(2)');
|
||||
|
||||
const firstViewIsAttached = await browserWindow.evaluate((window, url) => Boolean(window.getBrowserViews().find((view) => view.webContents.getURL() === url)), env.exampleURL);
|
||||
firstViewIsAttached.should.be.false;
|
||||
|
Reference in New Issue
Block a user