Quality Assurance and Testing - OtagoPolytechnic/Cloudy-with-a-Chance-of-LoRa GitHub Wiki
Test Plan
Cypress Tests
Homepage
- Homepage loads with weather data
- Search bar is visible
- Shows hourly and 7-day forecast
- Displays extra weather details
- Shows sunrise and sunset info
- Displays current location and background image
- Navigation links work (Weather, CO₂, About)
CO₂ Page
- Chart loads with data
- Can switch to Pressure and Gas charts
Weather Page
- Charts show for Temperature, Humidity, Rain, and Wind
How to run tests
Cypress
To run the tests locally, open your terminal and navigate to the root of the project then enter the fullstack directory:
cd fullstack
Start the development server:
npm run dev
Open a new terminal window or tab, and again navigate to the fullstack directory.
Launch the Cypress Test Runner:
npx cypress open
This will open the Cypress GUI, allowing you to select and run the tests.
To execute all test specs in headless mode, use:
npx cypress run
This will run all test files located in cypress/e2e/ and display in the terminal.