Modify run conditions for nightly e2e job to create test cycle and post in channel. (#2971)

This commit is contained in:
yasserfaraazkhan
2024-03-19 22:18:29 +05:30
committed by GitHub
parent d3b43b5b64
commit 7c2b4ec502
18 changed files with 480 additions and 268 deletions

View File

@@ -13,6 +13,7 @@ describe('LongServerName', function desc() {
const config = env.demoConfig;
const longServerName = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus quis malesuada dolor, vel scelerisque sem';
const longServerUrl = 'https://example.org';
let newServerView;
beforeEach(async () => {
env.createTestUserDataDir();
@@ -31,7 +32,7 @@ describe('LongServerName', function desc() {
});
// wait for autofocus to finish
await asyncSleep(500);
await asyncSleep(1000);
});
afterEach(async () => {
@@ -41,26 +42,24 @@ describe('LongServerName', function desc() {
await env.clearElectronInstances();
});
let newServerView;
it('MM-T4050 Long server name', async () => {
await newServerView.type('#serverNameInput', longServerName);
await newServerView.type('#serverUrlInput', longServerUrl);
await newServerView.click('#saveNewServerModal');
await asyncSleep(1000);
const existing = Boolean(await this.app.windows().find((window) => window.url().includes('newServer')));
const existing = Boolean(this.app.windows().find((window) => window.url().includes('newServer')));
existing.should.be.false;
const mainView = this.app.windows().find((window) => window.url().includes('index'));
const dropdownView = this.app.windows().find((window) => window.url().includes('dropdown'));
const isServerTabExists = Boolean(await mainView.locator(`text=${longServerName}`));
const isServerAddedDropdown = Boolean(await dropdownView.locator(`text=${longServerName}`));
const isServerTabExists = Boolean(mainView.locator(`text=${longServerName}`));
const isServerAddedDropdown = Boolean(dropdownView.locator(`text=${longServerName}`));
isServerTabExists.should.be.true;
isServerAddedDropdown.should.be.true;
const serverNameLocator = await mainView.locator(`text=${longServerName}`);
const serverNameLocator = mainView.locator(`text=${longServerName}`);
const isTruncated = await serverNameLocator.evaluate((element) => {
return element.offsetWidth < element.scrollWidth;