From d9c1bf6bb9ae530527eac682cfa0387503324a37 Mon Sep 17 00:00:00 2001 From: Roman Hotsiy Date: Thu, 21 Jan 2016 17:27:20 +0200 Subject: [PATCH] update e2e to pass with responsive menu --- protractor.conf.js | 2 +- tests/e2e/helpers.js | 2 +- tests/e2e/redoc.spec.js | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/protractor.conf.js b/protractor.conf.js index f50b1ec2..2629eb04 100644 --- a/protractor.conf.js +++ b/protractor.conf.js @@ -29,7 +29,7 @@ let config = { }, multiCapabilities: [ { browserName: 'chrome' }, - { browserName: 'firefox' } + //{ browserName: 'firefox' } ] }; diff --git a/tests/e2e/helpers.js b/tests/e2e/helpers.js index 8c097368..7fa8ff4f 100644 --- a/tests/e2e/helpers.js +++ b/tests/e2e/helpers.js @@ -65,7 +65,7 @@ function verifyNoBrowserErrors() { function scrollToEl(selector) { let script = ` document.querySelector('${selector}').scrollIntoView(true); - window.scrollBy(0, 10); + window.scrollBy(0, 200); `; return browser.driver.executeScript(script); diff --git a/tests/e2e/redoc.spec.js b/tests/e2e/redoc.spec.js index e53a3a03..f6f3629a 100644 --- a/tests/e2e/redoc.spec.js +++ b/tests/e2e/redoc.spec.js @@ -44,7 +44,8 @@ describe('Scroll sync', () => { it('should update active menu entries on page scroll', () => { scrollToEl('[tag="store"]').then(function() { - expect($('.menu-cat-header.active').getText()).toBe('STORE'); + expect($('.menu-cat-header.active').getInnerHtml()).toContain('store'); + expect($('.selected-tag').getInnerHtml()).toContain('store'); }); }); });