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

Fix/e2e product testing #354

Merged
merged 3 commits into from
Jul 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
}
5 changes: 5 additions & 0 deletions e2e-product-testing/cypress/fixtures/example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name": "Using fixtures to represent data",
"email": "hello@cypress.io",
"body": "Fixtures are a great way to mock data for responses to routes"
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
Feature: Exclude planning units

Scenario: upload correct lock-out shp
Given the user is in the Analysis tab
And the user has selected 'Exclude areas'
And the user has selected 'Upload shapefile'
When the user uploads a correct shapefile
Then the area is displayed on the map and as a removable modal

Scenario: upload incorrect lock-out shp
Given the user is in the Analysis tab
And the user has selected 'Exclude areas'
And the user has selected 'Upload shapefile'
When the user uploads an incorrect shapefile
Then the user gets an error on screen

@happypath
Scenario: draw lock-out area over map
Given the user is in the Analysis tab
And the user has selected 'Exclude areas'
And the user has selected 'Draw a shape on map'
When the user draws on the map
Then the area is displayed on the map and as a removable modal

@happypath
Scenario: select individual lock-out planning units on map
Given the user is in the Analysis tab
And the user has selected 'Exclude areas'
And the user has selected 'Select planning units'
When the user selects planning units on the map
Then the area is displayed on the map and as a removable modal

@happypath
Scenario: remove lock-out selection
Given the user is in the Analysis tab
And the user has selected 'Exclude areas'
And the user has added some areas to include
When the user clicks 'Clear' on a selected area to exclude
Then the selected excluded area is removed form the map and the modal
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
Feature: Include planning units

Scenario: upload correct lock-in shp
Given the user is in the Analysis tab
And the user has selected 'Include areas'
And the user has selected 'Upload shapefile'
When the user uploads a correct shapefile
Then the area is displayed on the map and as a removable modal

Scenario: upload incorrect lock-in shp
Given the user is in the Analysis tab
And the user has selected 'Include areas'
And the user has selected 'Upload shapefile'
When the user uploads an incorrect shapefile
Then the user gets an error on screen

@happypath
Scenario: draw lock-in area over map
Given the user is in the Analysis tab
And the user has selected 'Include areas'
And the user has selected 'Draw a shape on map'
When the user draws on the map
Then the area is displayed on the map and as a removable modal

@happypath
Scenario: select individual lock-in planning units on map
Given the user is in the Analysis tab
And the user has selected 'Include areas'
And the user has selected 'Select planning units'
When the user selects planning units on the map
Then the area is displayed on the map and as a removable modal

@happypath
Scenario: remove lock-in selection
Given the user is in the Analysis tab
And the user has selected 'Include areas'
And the user has added some areas to include
When the user clicks 'Clear' on a selected areas to include
Then the selected included area is removed form the map and the modal
20 changes: 11 additions & 9 deletions e2e-product-testing/cypress/integration/CostSurface.feature
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
Feature: cost surface
Scenario: Upload correct cost surface shp
Given the user is in Analysis tab
When the user uploads a correct shapefile for the cost surface
Then the file appears on the screen
Scenario: Upload incorrect cost surface shp
Given the user is in Analysis tab
When the user uploads an incorrect shapefile for the cost surface
Then the user receives an error message on screen
Feature: cost surface

Scenario: Upload correct cost surface shp
Given the user is in Analysis tab
When the user uploads a correct shapefile for the cost surface
Then the file appears on the screen

Scenario: Upload incorrect cost surface shp
Given the user is in Analysis tab
When the user uploads an incorrect shapefile for the cost surface
Then the user receives an error message on screen
91 changes: 0 additions & 91 deletions e2e-product-testing/cypress/integration/Features.feature

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Feature: Intersection

@happypath
Scenario: Open intersection modal
Given the user is in Features tab 1/2
And the user has added at least one Intersection layer (species type)
When The user clicks on 'Select features +'
Then the Intersection modal opens

@happypath
Scenario: Intersection species with bioregional layer
Given the user is in the Intersection modal
And the user has selected a bioregional layer
And the user has selected a category
And the user has selected sub-categories
And the user has saved
When the features are processed (Continue)
Then each intersection of species with sub-category appears as a new separate feature in Features tab 1/2
37 changes: 37 additions & 0 deletions e2e-product-testing/cypress/integration/FeaturesModal.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
Feature: Add features modal

@happypath
Scenario: Open features modal
Given the user is on the Features tab 1/2
When the user selects 'Add features +'
Then the modal to add features opens

@happypath
Scenario: Add features from inside platform
Given the user is on Add features modal (Marxan 06b)
When the user selects 'Add' on the features he/she wants to add and Saves
Then the features are added to the Features tab 1/2

Scenario: Upload features with incorrect shp
Given the user is on Add features modal (Marxan 06b)
And the user has an incorrect shapefile
When the user uploads his/her shp via 'Upload your own features'
Then the user gets an error message

Scenario: Upload features with correct shp
Given the user is on Add features modal (Marxan 06b)
And the user has a correct shapefile
When the user uploads his/her shp via 'Upload your own features'
Then the features are added to the Features tab 1/2

@happypath
Scenario: Search features from inside platform with correct keywords
Given the user is on Add features modal (Marxan 06b)
When the user uses the search bar and types a keyword that matches a feature
Then only the features that match the keyword are shown

Scenario: Search features from inside platform with incorrect keywords
Given the user is on Add features modal (Marxan 06b)
When the user uses the search bar and types a keyword that does not matches any feature
Then no features are shown

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Feature: Feature processing

@happypath
Scenario: Feature processing
Given the user is in Feature tab 2/2
When the user clicks 'Continue'
Then the user is sent to the Project dashboard to view the status of the Scenario
13 changes: 13 additions & 0 deletions e2e-product-testing/cypress/integration/FeaturesSetFpf.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Feature: Set FPF

@happypath
Scenario: Set individual FPF
Given the user is in Features tab 2/2
When the user changes the value of the FPF of one feature
Then the new FPF is displayed for that feature

@happypath
Scenario: Set block FPF
Given the user is in Features tab 2/2
When the user changes the value in the section 'ALL FPF'
Then the FPF of all the features display the new value
13 changes: 13 additions & 0 deletions e2e-product-testing/cypress/integration/FeaturesSetTargets.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Feature: Set targets

@happypath
Scenario: Set individual target
Given the user is in Features tab 2/2
When the user changes the value of the target of one feature
Then the new target is displayed for that feature

@happypath
Scenario: Set block target
Given the user is in Features tab 2/2
When the user changes the value in the section 'ALL TARGETS'
Then the target of all the features display the new value
10 changes: 10 additions & 0 deletions e2e-product-testing/cypress/integration/FeaturesSplit.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Feature: Split

@happypath
Scenario: Split output
Given the user is in Features tab 1/2
And the user has added at least one Split layer (bioregional type)
And the user selects the bioregional layer and a category to split by
And the user selects the unique sub-categories he/she wants to keep
When the features are processed (Continue)
Then each sub-category appears as a new separate feature in Features tab 1/2
Loading