Try fix channel creation tests

pull/5185/head
Rodrigo Nascimento 10 years ago
parent 83cce2b4e9
commit c8dfa199a8
No known key found for this signature in database
GPG Key ID: 2C85B3AFE75D23F9
  1. 1
      tests/pageobjects/side-nav.page.js
  2. 17
      tests/steps/05-channel-creation.js

@ -62,6 +62,7 @@ class SideNav extends Page {
browser.pause(200);
this.saveChannelBtn.click();
browser.waitForExist('[title="'+channelName+'"]', 1000);
this.channelType.waitForVisible(500, true);
}
addPeopleToChannel(user) {

@ -17,14 +17,13 @@ describe('Channel creation', function() {
});
beforeEach(()=>{
browser.pause(300);
sideNav.getChannelFromList('general').waitForVisible(5000);
sideNav.openChannel('general');
browser.pause(300);
browser.pause(1000);
});
afterEach(function() {
if (this.currentTest.state !== 'passed' && this.currentTest.title !== 'should close the channel creation tab') {
if (this.currentTest.state !== 'passed') {
setPublicChannelCreated(false);
switch (this.currentTest.title) {
case 'create a public channel':
@ -48,10 +47,6 @@ describe('Channel creation', function() {
sideNav.createChannel(publicChannelName, false, false);
setPublicChannelCreated(true);
});
it('should close the channel creation tab', function() {
sideNav.channelType.isVisible().should.be.false;
});
});
describe('create a private channel', function() {
@ -59,10 +54,6 @@ describe('Channel creation', function() {
sideNav.createChannel(privateChannelName, true, false);
setPrivateChannelCreated(true);
});
it('should close the channel creation tab', function() {
sideNav.channelType.isVisible().should.be.false;
});
});
describe('direct channel', function() {
@ -70,9 +61,5 @@ describe('Channel creation', function() {
sideNav.startDirectMessage(targetUser);
setDirectMessageCreated(true);
});
it('should close the channel creation tab', function() {
sideNav.channelType.isVisible().should.be.false;
});
});
});

Loading…
Cancel
Save