[MM-46535] Fix E2E tests for reporting purposes (#2236)

This commit is contained in:
Devin Binnie
2022-08-25 09:11:23 -04:00
committed by GitHub
parent 16dccd373e
commit 86d35669be
9 changed files with 362 additions and 278 deletions

View File

@@ -53,16 +53,12 @@ describe('Add Server Modal', function desc() {
});
describe('MM-T4389 Invalid messages', () => {
it('MM-T4389_1 should not be valid if no team name has been set', async () => {
it('MM-T4389_1 should not be valid if no team name or URL has been set', async () => {
await newServerView.click('#saveNewServerModal');
const existing = await newServerView.isVisible('#teamNameInput.is-invalid');
existing.should.be.true;
});
it('MM-T4389_2 should not be valid if no server address has been set', async () => {
await newServerView.click('#saveNewServerModal');
const existing = await newServerView.isVisible('#teamUrlInput.is-invalid');
existing.should.be.true;
const existingName = await newServerView.isVisible('#teamNameInput.is-invalid');
const existingUrl = await newServerView.isVisible('#teamUrlInput.is-invalid');
existingName.should.be.true;
existingUrl.should.be.true;
});
it('should not be valid if a server with the same name exists', async () => {
@@ -87,13 +83,12 @@ describe('Add Server Modal', function desc() {
await newServerView.click('#saveNewServerModal');
});
it('MM-T4389_3 should not be marked invalid', async () => {
const existing = await newServerView.isVisible('#teamNameInput.is-invalid');
existing.should.be.false;
});
it('MM-T4389_4 should not be possible to click save', async () => {
it('MM-T4389_2 Name should not be marked invalid, URL should be marked invalid', async () => {
const existingName = await newServerView.isVisible('#teamNameInput.is-invalid');
const existingUrl = await newServerView.isVisible('#teamUrlInput.is-invalid');
const disabled = await newServerView.getAttribute('#saveNewServerModal', 'disabled');
existingName.should.be.false;
existingUrl.should.be.true;
(disabled === '').should.be.true;
});
});
@@ -104,13 +99,12 @@ describe('Add Server Modal', function desc() {
await newServerView.click('#saveNewServerModal');
});
it('MM-T4389_5 should be valid', async () => {
const existing = await newServerView.isVisible('#teamUrlInput.is-invalid');
existing.should.be.false;
});
it('MM-T4389_6 should not be possible to click save', async () => {
it('MM-T4389_3 URL should not be marked invalid, name should be marked invalid', async () => {
const existingName = await newServerView.isVisible('#teamNameInput.is-invalid');
const existingUrl = await newServerView.isVisible('#teamUrlInput.is-invalid');
const disabled = await newServerView.getAttribute('#saveNewServerModal', 'disabled');
existingName.should.be.true;
existingUrl.should.be.false;
(disabled === '').should.be.true;
});
});