czydojade/cypress/integration/start.spec.ts
2019-12-10 17:51:15 +01:00

26 lines
826 B
TypeScript

describe("Get departures for one stop", () => {
it("Sucessfully Loads", () => {
cy.visit('/');
});
it("Allows to search", () => {
cy.get('.finder input').type("Lipo");
cy.get('.finder__stops ul li:first-child').should('contain.text', 'Lipowa')
});
it('Allows to pick a stop', () => {
cy.get('.finder__stops ul li:first-child button[data-action="add"]').click();
cy.get('#stops li:first-child').should('contain.text', 'Lipowa')
});
it ('Shows departures from picked stop', () => {
cy.get('#departures .departures .stop__name').should('contain.text', 'Lipowa');
});
// it("Allows to open favourites window", () => {
// cy.get('#open_favourites_picker').click();
// cy.get('#favourites_list').should('exist');
// })
});