👋 Welcome to the SkyNews webPage Automated Scripts using Bdd Framework
-
This repo contains an test scripts written in Cypress using Bdd Framework.
-
The tests are written to be directly compared to the SkyNews Webpage.
- Install Cypress via npm:
- cd /your/project/path
- npm install cypress --save-dev
Install the plugin by running:
npm install --save-dev cypress-cucumber-preprocessor
Add it to your plugins:
cypress/plugins/index.js
const cucumber = require('cypress-cucumber-preprocessor').default
module.exports = (on, config) => {
on('file:preprocessor', cucumber())
}
Add support for feature files to your Cypress configuration
cypress.json
{
"testFiles": "**/*.{feature,features}"
}
Used Smart tagging
- @focus
Visual Studio Code
Install VS code Icons File > Preferences > File Icon Theme > VSCode Icons.
- Using the BDD (Given/When/Then) format, write 5 test cases that relate to features of the SkyNews.com homepage, using a full screen desktop view.
- Verify the browser tab’s title.
- Verify the number of categories displayed and their names.
- Verify the default focus point is on the Home category.
- Verify that if the user then clicks on ‘Climate’, this becomes the focus.
- Select a story from the homepage. Verify that a word of your choice in the title text of the article you have just selected appears once title of the new page loads.