diff --git a/cypress.json b/cypress.json
index 59049e5..506f93e 100644
--- a/cypress.json
+++ b/cypress.json
@@ -1,5 +1,6 @@
{
"supportFile": "cypress/support/index.ts",
"fixturesFolder": false,
- "baseUrl": "http://czydojade.localhost:8080"
+ "baseUrl": "http://czydojade.localhost:8080/dummy/",
+ "modifyObstructiveCode": false
}
\ No newline at end of file
diff --git a/cypress/integration/start.spec.ts b/cypress/integration/start.spec.ts
index 6e8abd6..cae2b4e 100644
--- a/cypress/integration/start.spec.ts
+++ b/cypress/integration/start.spec.ts
@@ -1,10 +1,26 @@
-describe("The Start Page", () => {
+describe("Get departures for one stop", () => {
it("Sucessfully Loads", () => {
- cy.visit('/dummy');
+ cy.visit('/');
});
- it("Allows to open favourites window", () => {
- cy.get('#open_favourites_picker').click();
- cy.get('#favourites_list').should('exist');
- })
+ 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');
+ // })
});
\ No newline at end of file
diff --git a/resources/components/finder.html b/resources/components/finder.html
index eeaaad6..aa90b4f 100644
--- a/resources/components/finder.html
+++ b/resources/components/finder.html
@@ -22,7 +22,7 @@
-
-