Target Web Application: https://mystifying-beaver-ee03b5.netlify.app/
- Fork the project
- Browse to https://github.com/##USERNAME##/simplesite_project/actions/workflows/python-app.yml
- Press Run workflow
pip3 install -r requirements.txt
pytest -s --browser chrome --mode headless
Scenario 1: Verify that a selected column is sorted from low to high
Supported columns for sorting: NUMBER OF CASES, AVERAGE IMPACT SCORE
Steps:
- Open homepage url
- From "Sort data" drop down, select the Column name passed as parameters
- fetch the column data
- expand to numbers in case ending with 'k', 'M' or 'B'
- assert the column is sorted in ascending order
Scenario 2: Verify if a string matches values in the NAME and COMPLEXITY columns, the corresponding rows are returned and other rows are filtered out
Steps:
- Open homepage url
- Insert string passed as parameters in "Filter data" text box
- fetch values of NAME column
- fetch values of COMPLEXITY column
- combined cells from NAME and COMPLEXITY columns into tuples
- assert the filter test criteria is available in any of the tuple values irrespective of case sensitivity
Scenario 3: Verify if a string does not match values in the NAME and COMPLEXITY columns, all rows are filtered out
Steps:
- Open homepage url
- Insert string passed as parameters in "Filter data" text box
- store NAME column details
- assert that no rows are returned for non existing criterias
Scenario 4: Verify combination of sorting first followed by filtering, the filtered columns should still be sorted
Steps:
- Open homepage url
- Sort table by Impact score column
- Enter filter text (e.g "high") in the "Filter data" text box
- assert that "AVERAGE IMPACT SCORE" column is sorted and COMPLEXITY column contains only filter text.
Scenario 5: Verify combination of filtering first followed by sorting, the filtered columns should still be sorted
Steps:
- Open homepage url
- Enter filter text (e.g "ack") in the "Filter data" text box
- Sort table by Number of cases score column
- assert that "NUMBER OF CASES" column is sorted and NAME column contains only filter text.
-
OS: Ubuntu 18.04
-
Python version: 3.6 and above
-
Libraries:
pytest==6.2.5 selenium==3.141.0 webdriver-manager==3.4.2
-
Browser: Google Chrome=93.0.4577.63