[FIX] Mobile view and re-enable E2E tests (#13322)

pull/13323/head
Diego Sampaio 6 years ago
parent bb9b51e633
commit 50765cb825
No known key found for this signature in database
GPG Key ID: E060152B30502562
  1. 2
      packages/rocketchat-ui-master/client/index.js
  2. 4
      packages/rocketchat-ui-master/package.js
  3. 33
      tests/end-to-end/ui/08-resolutions.js
  4. 2
      tests/pageobjects/side-nav.page.js

@ -1,5 +1,3 @@
import './main.html';
import './loading.html';
import './error.html';
import './logoLayout.html';
import './main';

@ -22,8 +22,12 @@ Package.onUse(function(api) {
'rocketchat:ui-sidenav',
'meteorhacks:inject-initial',
]);
api.addFiles('client/main.html', 'client');
api.addFiles('client/main.js', 'client');
api.mainModule('client/index.js', 'client');
api.mainModule('server/index.js', 'server');
api.addAssets('server/dynamic-css.js', 'server');
api.addAssets('public/icons.svg', 'server');
});

@ -7,7 +7,7 @@ import { checkIfUserIsValid } from '../../data/checks';
// skipping this since the main content its not moved anymore, instead there is a overlay of the side nav over the main content
describe.skip('[Resolution]', () => {
describe('[Resolution]', () => {
describe('[Mobile Render]', () => {
before(() => {
checkIfUserIsValid(username, email, password);
@ -17,15 +17,13 @@ describe.skip('[Resolution]', () => {
});
after(() => {
Global.setWindowSize(1450, 900);
sideNav.preferencesClose.waitForVisible(5000);
sideNav.preferencesClose.click();
sideNav.spotlightSearch.waitForVisible(5000);
Global.setWindowSize(1600, 1600);
sideNav.spotlightSearchIcon.waitForVisible(5000);
});
describe('moving elements:', () => {
it('it should close de sidenav', () => {
mainContent.mainContent.getLocation().should.deep.equal({ x:0, y:0 });
mainContent.mainContent.getLocation().should.deep.include({ x:0 });
});
it('it should press the navbar button', () => {
@ -33,7 +31,7 @@ describe.skip('[Resolution]', () => {
});
it('it should open de sidenav', () => {
mainContent.mainContent.getLocation().should.not.deep.equal({ x:0, y:0 });
mainContent.mainContent.getLocation().should.not.deep.equal({ x:0 });
});
it('it should open general channel', () => {
@ -41,7 +39,7 @@ describe.skip('[Resolution]', () => {
});
it('it should close de sidenav', () => {
mainContent.mainContent.getLocation().should.deep.equal({ x:0, y:0 });
mainContent.mainContent.getLocation().should.deep.include({ x:0 });
});
it('it should press the navbar button', () => {
@ -49,9 +47,9 @@ describe.skip('[Resolution]', () => {
});
it('it should open the user preferences screen', () => {
sideNav.accountMenu.waitForVisible(5000);
sideNav.accountMenu.click();
sideNav.account.waitForVisible(5000);
sideNav.sidebarUserMenu.waitForVisible();
sideNav.sidebarUserMenu.click();
sideNav.account.waitForVisible();
sideNav.account.click();
});
@ -61,7 +59,7 @@ describe.skip('[Resolution]', () => {
});
it('it should close de sidenav', () => {
mainContent.mainContent.getLocation().should.deep.equal({ x:0, y:0 });
mainContent.mainContent.getLocation().should.deep.include({ x:0 });
});
it('it should press the navbar button', () => {
@ -74,20 +72,17 @@ describe.skip('[Resolution]', () => {
});
it('it should close de sidenav', () => {
mainContent.mainContent.getLocation().should.deep.equal({ x:0, y:0 });
mainContent.mainContent.getLocation().should.deep.include({ x:0 });
});
it('it should press the navbar button', () => {
sideNav.burgerBtn.click();
});
it('it should press the avatar link', () => {
sideNav.avatar.waitForVisible(5000);
sideNav.avatar.click();
});
it('it should close de sidenav', () => {
mainContent.mainContent.getLocation().should.deep.equal({ x:0, y:0 });
sideNav.preferencesClose.waitForVisible(5000);
sideNav.preferencesClose.click();
sideNav.sidebarWrap.click();
});
it('it should press the navbar button', () => {

@ -46,6 +46,8 @@ class SideNav extends Page {
get burgerBtn() { return browser.element('.burger'); }
get sidebarWrap() { return browser.element('.sidebar-wrap'); }
// Opens a channel via rooms list
openChannel(channelName) {
browser.waitForVisible(`.sidebar-item__name=${ channelName }`, 5000);

Loading…
Cancel
Save