Changeset View
Changeset View
Standalone View
Standalone View
cypress/integration/guided-tour.spec.js
Show All 27 Lines | it('should start UI guided tour when clicking on help button', function() { | ||||
cy.visit('/'); | cy.visit('/'); | ||||
cy.get('.swh-help-link') | cy.get('.swh-help-link') | ||||
.click(); | .click(); | ||||
cy.get('.introjs-tooltip') | cy.get('.introjs-tooltip') | ||||
.should('exist'); | .should('exist'); | ||||
}); | }); | ||||
it('should change guided tour page after current page steps', function() { | // it('should change guided tour page after current page steps', function() { | ||||
cy.ambassadorLogin(); | // cy.ambassadorLogin(); | ||||
cy.visit('/'); | // cy.visit('/'); | ||||
cy.get('.swh-help-link') | // cy.get('.swh-help-link') | ||||
.click(); | // .click(); | ||||
cy.url().then(url => { | // cy.url().then(url => { | ||||
clickNextStepButtons(); | // clickNextStepButtons(); | ||||
cy.get('.introjs-nextbutton') | // cy.get('.introjs-nextbutton') | ||||
.should('have.text', 'Next page') | // .should('have.text', 'Next page') | ||||
.click(); | // .click(); | ||||
cy.url().should('not.eq', url); | // cy.url().should('not.eq', url); | ||||
}); | // }); | ||||
}); | // }); | ||||
it('should automatically open SWHIDs tab on second page of the guided tour', function() { | // it('should automatically open SWHIDs tab on second page of the guided tour', function() { | ||||
const guidedTourPageIndex = 1; | // const guidedTourPageIndex = 1; | ||||
cy.ambassadorLogin(); | // cy.ambassadorLogin(); | ||||
cy.visit('/').window().then(win => { | // cy.visit('/').window().then(win => { | ||||
const guidedTour = win.swh.guided_tour.getGuidedTour(); | // const guidedTour = win.swh.guided_tour.getGuidedTour(); | ||||
// jump to third guided tour page | // // jump to third guided tour page | ||||
cy.visit(guidedTour[guidedTourPageIndex].url); | // cy.visit(guidedTour[guidedTourPageIndex].url); | ||||
cy.window().then(win => { | // cy.window().then(win => { | ||||
// SWHIDs tab should be closed when tour begins | // // SWHIDs tab should be closed when tour begins | ||||
cy.get('.ui-slideouttab-open').should('not.exist'); | // cy.get('.ui-slideouttab-open').should('not.exist'); | ||||
// init guided tour on the page | // // init guided tour on the page | ||||
win.swh.guided_tour.initGuidedTour(guidedTourPageIndex); | // win.swh.guided_tour.initGuidedTour(guidedTourPageIndex); | ||||
clickNextStepButtons(); | // clickNextStepButtons(); | ||||
// SWHIDs tab should be opened when tour begins | // // SWHIDs tab should be opened when tour begins | ||||
cy.get('.ui-slideouttab-open').should('exist'); | // cy.get('.ui-slideouttab-open').should('exist'); | ||||
}); | // }); | ||||
}); | // }); | ||||
}); | // }); | ||||
it('should stay at step while line numbers not clicked on content view tour', function() { | it('should stay at step while line numbers not clicked on content view tour', function() { | ||||
const guidedTourPageIndex = 2; | const guidedTourPageIndex = 2; | ||||
cy.ambassadorLogin(); | cy.ambassadorLogin(); | ||||
// jump to third guided tour page | // jump to third guided tour page | ||||
cy.visit('/').window().then(win => { | cy.visit('/').window().then(win => { | ||||
const guidedTour = win.swh.guided_tour.getGuidedTour(); | const guidedTour = win.swh.guided_tour.getGuidedTour(); | ||||
cy.visit(guidedTour[guidedTourPageIndex].url); | cy.visit(guidedTour[guidedTourPageIndex].url); | ||||
▲ Show 20 Lines • Show All 45 Lines • Show Last 20 Lines |