update e2e to pass with responsive menu

This commit is contained in:
Roman Hotsiy 2016-01-21 17:27:20 +02:00
parent 825bf111f8
commit d9c1bf6bb9
3 changed files with 4 additions and 3 deletions

View File

@ -29,7 +29,7 @@ let config = {
}, },
multiCapabilities: [ multiCapabilities: [
{ browserName: 'chrome' }, { browserName: 'chrome' },
{ browserName: 'firefox' } //{ browserName: 'firefox' }
] ]
}; };

View File

@ -65,7 +65,7 @@ function verifyNoBrowserErrors() {
function scrollToEl(selector) { function scrollToEl(selector) {
let script = ` let script = `
document.querySelector('${selector}').scrollIntoView(true); document.querySelector('${selector}').scrollIntoView(true);
window.scrollBy(0, 10); window.scrollBy(0, 200);
`; `;
return browser.driver.executeScript(script); return browser.driver.executeScript(script);

View File

@ -44,7 +44,8 @@ describe('Scroll sync', () => {
it('should update active menu entries on page scroll', () => { it('should update active menu entries on page scroll', () => {
scrollToEl('[tag="store"]').then(function() { 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');
}); });
}); });
}); });