test commit for travis

pull/7094/head
Martin Schoeler 9 years ago
parent 8d968bbc35
commit c516d9ddc8
  1. 2
      packages/rocketchat-ui-sidenav/client/toolbar.html
  2. 1
      tests/end-to-end/ui/04-main-elements-render.js
  3. 50
      tests/pageobjects/side-nav.page.js

@ -19,7 +19,7 @@
<template name="toolbarSearchList">
<i class="{{icon}} {{userStatus}}"></i>
<span class="room-title {{#if unread}}bold{{/if}}">{{displayName}}</span>
<span class="room-title {{#if unread}}bold{{/if}}" name="{{displayName}}" >{{displayName}}</span>
{{#if unread}}
<span class="unread">{{unread}}</span>
{{/if}}

@ -27,6 +27,7 @@ describe('[Main Elements Render]', function() {
});
it('it should show the new channel button', () => {
sideNav.newChannelBtn.waitForVisible(5000);
sideNav.newChannelBtn.isVisible().should.be.true;
});

@ -46,31 +46,47 @@ class SideNav extends Page {
browser.click(`.rooms-list > .wrapper > ul [title="${ channelName }"]`);
browser.waitForVisible('.input-message', 5000);
browser.waitUntil(function() {
browser.waitForVisible('.room-title', 5000);
return browser.getText('.room-title') === channelName;
}, 5000);
browser.waitForVisible('.fixed-title .room-title', 8000);
return browser.getText('.fixed-title .room-title') === channelName;
}, 10000);
}
// Opens a channel via spotlight search
searchChannel(channelName) {
this.spotlightSearch.waitForVisible(5000);
this.spotlightSearch.click();
this.spotlightSearch.setValue(channelName);
browser.waitForVisible(`.room-title=${ channelName }`, 10000);
browser.click(`.room-title=${ channelName }`);
browser.waitUntil(function() {
browser.waitForVisible('.room-title', 5000);
return browser.getText('.room-title') === channelName;
}, 5000);
browser.waitForVisible('.fixed-title .room-title', 5000);
const currentRoom = browser.element('.fixed-title .room-title').getText();
if (currentRoom !== channelName) {
this.spotlightSearch.waitForVisible(5000);
this.spotlightSearch.click();
this.spotlightSearch.setValue(channelName);
// const room = browser.selectByVisibleText('.search.room-title', channelName);
// room.waitForVisible(5000);
// room.click();
browser.waitForVisible(`[name='${ channelName }']`, 5000);
browser.click(`[name='${ channelName }']`);
browser.waitUntil(function() {
browser.waitForVisible('.fixed-title .room-title', 8000);
return browser.getText('.fixed-title .room-title') === channelName;
}, 10000);
}
}
// Gets a channel from the spotlight search
getChannelFromSpotlight(channelName) {
this.spotlightSearch.waitForVisible(5000);
this.spotlightSearch.click();
this.spotlightSearch.setValue(channelName);
browser.waitForVisible(`.room-title=${ channelName }`, 5000);
return browser.element(`.room-title=${ channelName }`);
browser.waitForVisible('.fixed-title .room-title', 5000);
const currentRoom = browser.element('.fixed-title .room-title').getText();
if (currentRoom !== channelName) {
this.spotlightSearch.waitForVisible(5000);
this.spotlightSearch.click();
this.spotlightSearch.setValue(channelName);
browser.waitForVisible(`[name='${ channelName }']`, 5000);
return browser.element(`[name='${ channelName }']`);
// const room = browser.selectByValue('.search.room-title', channelName);
// room.waitForVisible(5000);
// return room;
// return browser.element(`.room-title=${ channelName }`);
}
}
// Gets a channel from the rooms list

Loading…
Cancel
Save