mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-26 02:23:43 +03:00
update e2e to pass with responsive menu
This commit is contained in:
parent
825bf111f8
commit
d9c1bf6bb9
|
@ -29,7 +29,7 @@ let config = {
|
||||||
},
|
},
|
||||||
multiCapabilities: [
|
multiCapabilities: [
|
||||||
{ browserName: 'chrome' },
|
{ browserName: 'chrome' },
|
||||||
{ browserName: 'firefox' }
|
//{ browserName: 'firefox' }
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -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);
|
||||||
|
|
|
@ -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');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue
Block a user