Skip to content

Commit

Permalink
fix(e2e-product-testing): separate features and add tags support
Browse files Browse the repository at this point in the history
  • Loading branch information
kgajowy authored and hotzevzl committed Jul 20, 2021
1 parent 638425d commit c5cd923
Show file tree
Hide file tree
Showing 11 changed files with 128 additions and 220 deletions.
5 changes: 3 additions & 2 deletions e2e-product-testing/cypress.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"testFiles": "**/*.{feature,features}",
"testFiles": "**/*.feature",
"screenshotOnRunFailure": true,
"videoUploadOnPasses": false
"videoUploadOnPasses": false,
"TAGS": "@implemented-tag"
}
216 changes: 0 additions & 216 deletions e2e-product-testing/cypress/integration/Solutions.feature

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@happypath
Feature: Download solutions table

Scenario: Download complete solutions table
Given the user is in the solutions table modal
When the user selects 'Download solutions'
Then the user receives a bundle zip with all the result files in his/her local machine
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Feature: Modify unmet targets

@happypath
Scenario: Mark as met
Given the user has run marxan
And there are unmet targets
And the user is in the Feature tab
When the user selects 'Mark as met' on a feature
Then that feature does not appear as unmet in the list

Scenario: Increase FPF in all features at once
Given the user has run marxan
And there are unmet targets
And the user is in the Feature tab
When the user increases the FPF in the 'Change FPF in all not met features' box
Then the new FPF set by the user appears in all the unmet features

@happypath
Scenario: Increase FPF in one feature
Given the user has run marxan
And there are unmet targets
And the user is in the Feature tab
When the user increases the FPF in the one feature
Then the new FPF set by the user appears only for that feature


Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
@happypath
Feature: Order solutions table

Scenario: Order solutions by run
Given the user is in the solutions table modal
When the user selects 'Order by: Run numbers'
Then the solutions are ordered by run number (lowest to highest)

Scenario: Order solutions by score
Given the user is in the solutions table modal
When the user selects 'Order by: Score'
Then the solutions are ordered by score (lowest to highest)

Scenario: Order solutions by cost
Given the user is in the solutions table modal
When the user selects 'Order by: Cost'
Then the solutions are ordered by cost (lowest to highest)

Scenario: Order solutions by planning units
Given the user is in the solutions table modal
When the user selects 'Order by: Planning Units'
Then the solutions are ordered by planning units (lowest to highest)

Scenario: Order solutions by missing values
Given the user is in the solutions table modal
When the user selects 'Order by: Missing values'
Then the solutions are ordered by missing values (lowest to highest)
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
@run_gap_analysis @happypath
Feature: View post-run gap Analysis

Scenario: Open gap analysis (default view all features, graph)
Given the user is in Solutions tab
When the user opens the 'View run gap analysis' modal
Then the gap analysis displays all the features as a bar graph

Scenario: Open gap analysis (default view all features, map)
Given the user is in Solutions tab
When the user opens the 'View run gap analysis' modal
Then the gap analysis displays all the features on a map

Scenario: Gap analysis view selected features
Given the user has opened the gap analysis
When the user selects on the open eye icon on the features bar graph
Then the eye is crossed out and the layer is hidden in the map

Scenario: Close gap analysis
Given the user has opened the gap analysis
When the user clicks on 'Close gap analysis'
Then the gap analysis is no longer visible
25 changes: 25 additions & 0 deletions e2e-product-testing/cypress/integration/SolutionsView.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
@solutions_table
Feature: View solutions table

@happypath
Scenario: Open solutions modal
Given the user is in the Solutions tab
When the user clicks on 'View solutions table'
Then the solution table modal opens on screen

@happypath
Scenario: View all solutions
Given the user is in the solutions table modal
When the user does not select the 'View 5 most different solutions'
Then the user sees all the solutions ordered by run number

Scenario: View 5 most different solutions
Given the user is in the solutions table modal
When the user selects the 'View 5 most different solutions'
Then the user sees the 5 most different solutions ordered by run number

@happypath
Scenario: View solutions on map
Given the user is in the solutions table modal
When the user marks a solution in the 'View on map' column
Then the solution is shown on the map
16 changes: 16 additions & 0 deletions e2e-product-testing/cypress/integration/SolutionsViewUnmet.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
@unmet_targets
Feature: View unmet targets

Scenario: Move from Solutions to Features
Given the user is in the Solutions tab
And there are features that don't meet their target
When the user clicks 'Go to features'
Then the user is taken to the Feature tab

@happypath
Scenario: View features with unmet targets
Given the user has run marxan
And there are unmet targets
And the user is in the Feature tab
When the user click on 'Features that don't meet your targets'
Then only the features that don't meet the target are shown on display
4 changes: 2 additions & 2 deletions e2e-product-testing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"main": "index.js",
"license": "MIT",
"scripts": {
"cypress:open": "cypress open'",
"cypress:ci": "cypress-tags run -e TAGS=\"@implemented\" --headless --browser chrome"
"cypress:open": "cypress open",
"cypress:ci": "cypress-tags run -e TAGS=\"@implemented\""
},
"devDependencies": {
"@types/cypress-cucumber-preprocessor": "4.0.1",
Expand Down

0 comments on commit c5cd923

Please sign in to comment.