[MM-31547] Stop users from being able to enter the same server name or URL twice (#2049)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
This commit is contained in:
@@ -109,6 +109,18 @@ describe('EditServerModal', function desc() {
|
||||
existing.should.be.true;
|
||||
});
|
||||
|
||||
it('should not edit team if another server with the same name or URL exists', async () => {
|
||||
await editServerView.fill('#teamNameInput', config.teams[1].name);
|
||||
await editServerView.click('#saveNewServerModal');
|
||||
let existing = await editServerView.isVisible('#teamNameInput.is-invalid');
|
||||
existing.should.be.true;
|
||||
|
||||
await editServerView.fill('#teamNameInput', 'NewTestTeam');
|
||||
await editServerView.fill('#teamUrlInput', config.teams[1].url);
|
||||
existing = await editServerView.isVisible('#teamUrlInput.is-invalid');
|
||||
existing.should.be.true;
|
||||
});
|
||||
|
||||
it('MM-T4391_2 should edit team when Save is pressed and name edited', async () => {
|
||||
await editServerView.fill('#teamNameInput', 'NewTestTeam');
|
||||
await editServerView.click('#saveNewServerModal');
|
||||
|
Reference in New Issue
Block a user