mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-22 08:36:33 +03:00
Add more e2e tests
This commit is contained in:
parent
b9bc3f2eab
commit
57b96a6eda
|
@ -43,12 +43,39 @@ describe('Scroll sync', () => {
|
|||
fixFFTest(done);
|
||||
});
|
||||
|
||||
it('should update active menu entries on page scroll', () => {
|
||||
scrollToEl('[tag="store"]').then(function() {
|
||||
it('should update active menu entries on page scroll forwards', () => {
|
||||
scrollToEl('[tag="store"]').then(() => {
|
||||
expect($('.menu-cat-header.active').getInnerHtml()).toContain('store');
|
||||
expect($('.selected-tag').getInnerHtml()).toContain('store');
|
||||
});
|
||||
});
|
||||
|
||||
it('should update active menu entries on page scroll backwards', () => {
|
||||
scrollToEl('[operation-id="getPetById"]').then(() => {
|
||||
expect($('.menu-cat-header.active').getInnerHtml()).toContain('pet');
|
||||
expect($('.selected-tag').getInnerHtml()).toContain('pet');
|
||||
expect($('.menu-cat li.active').getInnerHtml()).toContain('Find pet by ID');
|
||||
expect($('.selected-endpoint').getInnerHtml()).toContain('Find pet by ID');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('Language tabs sync', () => {
|
||||
let specUrl = URL;
|
||||
|
||||
beforeEach((done) => {
|
||||
browser.get(specUrl);
|
||||
fixFFTest(done);
|
||||
});
|
||||
|
||||
it('should sync language tabs', () => {
|
||||
var $item = $$('[operation-id="addPet"] tabs > ul > li').last();
|
||||
// check if correct item
|
||||
expect($item.getText()).toContain('PHP');
|
||||
$item.click().then(() => {
|
||||
expect($('[operation-id="updatePet"] li.active').getText()).toContain('PHP');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
if (process.env.JOB === 'e2e-guru') {
|
||||
|
|
Loading…
Reference in New Issue
Block a user