Skip to content

Running the Art Gallery site – Window

Cypress has been added to the project develpoment and requires no addtional dependancies.

Cypress

  • npm install cypress -D

Running the tests

Follow the instructions in the Art Gallery setup guide or refer to new docker setup to run the project.

NB You must have the project running in order to run the tests.

In the terminal run

  • npx cypress open

This will open the intro winodw to cypress

Select E2E testing and choose the browser that you wish to use to run the tests.

Select the test you want to run from the list in the Spec directory.

Adding or creating new tests

All tests are stored in the project in the \art-gallery\cypress\e2e\ folder

File naming convention

  • pagename.spec.cy.js

File name is based on the html page name e.g. exhibition.spec.cy.js

List of current tests

Test IDTestPageLocal URLTest fileExpected Result
1diplays the correct subheading - Artistart and culturehttp://localhost:8080/cultureartandculture.spec.cy.jsSuccess
2displays the correct image - Artistart and culturehttp://localhost:8080/cultureartandculture.spec.cy.jsSuccess
3displays the correct details -Artistart and culturehttp://localhost:8080/cultureartandculture.spec.cy.jsSuccess
4diplays the correct subheading - Artworkart and culturehttp://localhost:8080/cultureartandculture.spec.cy.jsSuccess
5displays the correct image - Artworkart and culturehttp://localhost:8080/cultureartandculture.spec.cy.jsSuccess
6displays the correct details -Artworkart and culturehttp://localhost:8080/cultureartandculture.spec.cy.jsSuccess
7diplays the correct subheading - Artistartistofthedayhttp://localhost:8080/artistofdayartistoftheday.spec.cy.jsSuccess
8displays the correct image - Artistartistofthedayhttp://localhost:8080/artistofdayartistoftheday.spec.cy.jsSuccess
9displays the correct details -Artistartistofthedayhttp://localhost:8080/artistofdayartistoftheday.spec.cy.jsSuccess
10diplays the correct subheading - Artworkartworkofthedayhttp://localhost:8080/artworkofdayartworkoftheday.spec.cy.jsSuccess
11displays the correct image - Artworkartworkofthedayhttp://localhost:8080/artworkofdayartworkoftheday.spec.cy.jsSuccess
12displays the correct details -Artworkartworkofthedayhttp://localhost:8080/artworkofdayartworkoftheday.spec.cy.jsSuccess
13loads artworksartworkshttp://localhost:8080/artworksartworks.spec.cy.jsSuccess
14searches and returns artwork if existsartworkshttp://localhost:8080/artworksartworks.spec.cy.jsSuccess
15searches and returns no artwork if no artwork existsartworkshttp://localhost:8080/artworksartworks.spec.cy.jsSuccess
16displays the correct headingexhibitionshttp://localhost:8080/exhibitionsexhibitions.spec.cy.jsSuccess
17displays mock data correctly in tableexhibitionshttp://localhost:8080/exhibitionsexhibitions.spec.cy.jsSuccess
18displays login modalloginhttp://localhost:8080/login.spec.cy.jsSuccess
19allows user to log inloginhttp://localhost:8080/login.spec.cy.jsSuccess
20displays correct headinghomepagehttp://localhost:8080/mainpage.spec.cy.jsSuccess
21displays banner imagehomepagehttp://localhost:8080/mainpage.spec.cy.jsSuccess
22should display signup pageregisterhttp://localhost:8080/signupregisteruser.spec.cy.jsSuccess
23should allow user to sign up.registerhttp://localhost:8080/signupregisteruser.spec.cy.jsSuccess

Additional Notes

To run the user login test, you will need to run the signup test first.
If you need to run the signup test again you will need to delete the user it creates from thebackend database.