czydojade/cypress/integration/start.spec.ts
2019-12-10 20:29:44 +01:00

21 lines
652 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');
});
});