Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[meta issue] FE E2E Testing #454

Open
rachel-labri-tipton opened this issue Jan 10, 2024 · 2 comments · Fixed by #470
Open

[meta issue] FE E2E Testing #454

rachel-labri-tipton opened this issue Jan 10, 2024 · 2 comments · Fixed by #470

Comments

@rachel-labri-tipton
Copy link
Contributor

rachel-labri-tipton commented Jan 10, 2024

Detailed Description

We would like to have better E2E testing coverage for the Quartz Solar UI. Up until now, we have been using a tick list and human eyes to check the UI's functionality. It's time to automate!

We'd like to add E2E testing using Cypress tests for the following pages in the Quartz UI:

  • National & GSP PV Forecast
  • Delta View
  • Sites View
  • Dashboard Mode
  • 4-hour View Mode

Context

Our FE has been lacking E2E testing and we are trying to catch up on the backlog and put in place a system for writing Cypress tests as we add new features.

Possible Implementation

It would be helpful to convert our current UAT list into E2E Cypress Tests.

General

  • does the page load?
  • is the version visible?
  • has the version been bumped?
  • Does the feedback button work?
  • Is the legend visible
  • Is the database stable, check on AWS

Auth

  • Can I log on with Auth?
  • Can i log out?

Quartz-specific points

  • Does the logo link to the new Quartz website?
  • Is the OCF logo present in the logo area?
  • Does the OCF logo link to the OCF website?
  • Does the Documentation link go to the new Quartz docs?

PV Forecast View

National

  • Does PV live estimate show on the plot? (black dashed)
  • Does PV live updated show on the plot? (black solid)
  • Does OCF forecast show up on plot? (yellow)
  • For OCF forecast, is the future a dashed line?
  • Can I hover on the plot to show the values on the plot?
  • Clicking on a GSP makes the GSP plot show up?
  • Clicking on a GSP when already selected, makes the GSP plot go away?
  • Can I click on a time in the national plot which then updates the map?
  • Can I click on a past time in the GSP plot which then updates the map?
  • Can I click on a future time in the GSP plot which then updates the map? – [expected; PVnet only runs 8h ahead for GSPs]
  • Check that map shading reflects PV data accurately.

Time

  • Is time now in Europe London time? It should be to the nearest 30 minute, rounded up.
  • Is the hover time in Europe London time?
  • Are the X axis in Europe London time?

Header

  • Is this the title clear it is National data?
  • Does the headline current estimated PV figure display?
  • Does it show the current Forecasted value?
  • Does the next forecast figure display?
  • Are the units GW?

Probabilistic Charts

  • Shading appears around the lines.
  • Plevel values in the tooltip are 0.0 or above.

GSP

  • Does PV live estimate show on the plot? (dashed black)
  • Does PV live updated show on the plot? (solid black)
  • Does OCF forecast show up on plot? (yellow)
  • For OCF forecast, is the future a dashed line?
  • Can I hover on the plot to show the values on the plot?

Time

  • Is time now in Europe London time?
  • Is the hover time in Europe London time?
  • Are the X axis in Europe London time?

Header

  • Does the GSP name show up?
  • Is the current estimated PV visible?
  • Is the next forecast figure visible?
  • Are the above figures in MW?

Probabilistic Charts

  • Shading appears around the lines.
  • Plevel values in the tooltip are 0.0 or above.

Map

  • Does a map of the UK show up?
  • Are the GSP boundaries displayed?
  • Can I click on '%', 'MW' and 'Capacity'
  • on 'Capacity' view, is there very little power in Scotland, and Melksham a shining beacon of renewables?

Four Hour View

National & GSP

  • Does the "4hr forecast" toggle show in the Profile Dropdown menu?
  • Toggle on
    • Does the 4hr forecast show up on the plot? (orange)
    • Does the 4hr future forecast show up on the plot? (dashed orange)
    • Does the 4hr forecast not show on the chart or tooltip when switched off?
  • Toggle off
    • Does the 4hr forecast not show on the chart or tooltip when switched off?
    • Does the 4hr future forecast not show on the chart or tooltip when switched off?
  • Does the 4hr forecast toggle persist across refreshes/logouts using cookie?
  • Do the 4hr forecast values show in the hover tooltip?

Delta View

National

  • Does PV live estimate show on the plot? (black dashed)
  • Does PV live updated show on the plot? (black solid)
  • Does OCF forecast show up on plot? (yellow)
  • For OCF forecast, is the future a dashed line?
  • Does the 4-hour forecast not show on the chart or tooltip when switched off?
  • Does the 4-hour future forecast not show on the chart or tooltip when switched off?
  • Does the 4-hour forecast show on the chart and tooltip when switched on?
  • Can I hover on the plot to show the values on the plot?

GSP

  • Clicking on a GSP makes the GSP plot show up?
  • Clicking on a GSP when already selected, makes the GSP plot go away?
  • Can I click on a time in the national plot which then updates the map?
  • Can I click on a time in the GSP plot which then updates the map?
  • Are values higher on the map in the middle of the day, compare to early morning?

Time

  • Is time now in Europe London time? It should be 30minute, but rounded up.
  • Is the hover time in Europe London time?
  • Are the X axis in Europe London time?
  • Does the data show yesterday as well?

Header

  • Is this the title clear it is National data?
  • Does the headline current estimated PV figure display?
  • Does it show the current Forecasted value?
  • Does the next forecast figure display?
  • Are the units GW?

Probabilistic Charts

  • Shading appears around the lines.
  • Plevel values in the tooltip are 0.0 or above.

GSP

  • Does PV live estimate show on the plot? (dashed black)
  • Does PV live updated show on the plot? (solid black)
  • Does OCF forecast show up on plot? (yellow)
  • For OCF forecast, is the future a dashed line?
  • Can I hover on the plot to show the values on the plot?
  • Does the data look like solar profiles?

Time

  • Is time now in Europe London time?
  • Is the hover time in Europe London time?
  • Are the X axis in Europe London time?

Title

  • Does the GSP name show up?
  • Is the latest forecast figure visible?
  • Is the next forecast figure visible? [not currently shown for space reasons]
  • Is the current GSP delta figure visible?
  • Are the above figures in MW?
  • Is the Delta block background colour correct, i.e. pos/neg delta colour scheme?

Map

  • Does a map of the UK show up?
  • Are the GSP boundaries displayed?
  • Where Deltas are available, do the correct colours for the GSP delta buckets display and match the table?

Combined views

  • Does selectedGSP persist when switching between PV Forecast and Delta Views
  • Does selectedTime persist when switching between PV Forecast and Delta Views
  • Does map location/zoom persist when switching between PV Forecast and Delta Views

Dashboard Mode

  • Does the Dashboard Mode toggle show in the Profile Dropdown menu?
  • Does the Dashboard Mode toggle persist across refreshes/logouts using cookie?

National

  • Do the National title and forecast values show in large font?
  • Are the lines on the chart thicker?

GSP

  • Do the GSP title and forecast values show in large font?
  • Are the lines on the chart thicker?

Legend

  • Is the legend larger?
  • Do the legend items space nicely?

Map

  • Is the map legend larger?
  • Are the MW/%/Capacity buttons larger?
  • Are the date/time larger?

Refresh

  • After 10 mins, does the forecast update?
  • After 10 mins, does the forecast creation time update? - No

Sites View

  • [ ]

Outside the Cypress testing scope

National Chart

  • Does the data look like solar profiles?
  • Does the data show yesterday as well?
  • Does the data show tomorrow as well?

GSP Chart

  • Does the data look like solar profiles?
  • Does the data show yesterday as well?
  • Does the data show tomorrow as well?

Delta Chart

  • Does the data look like solar profiles?
  • Does the data show yesterday as well?
  • Does the data show tomorrow as well?

Sites Chart

  • Does the data look like solar profiles?
  • Does the data show yesterday as well?
  • Does the data show tomorrow as well?

Possible Implementation

Write tests.

@rachel-labri-tipton rachel-labri-tipton added enhancement New feature or request and removed enhancement New feature or request labels Jan 10, 2024
@rachel-labri-tipton rachel-labri-tipton changed the title MetaIssue: FE E2E Testing [meta issue] FE E2E Testing Jan 10, 2024
@peterdudfield
Copy link
Contributor

Here's how we can add it to CI, might need to create a .env from some repo secrets

@peterdudfield
Copy link
Contributor

did we managed to get cypress testing on development?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: No status
Development

Successfully merging a pull request may close this issue.

2 participants