Skip to content

Commit

Permalink
Merge pull request #150 from Breeding-Insight/feature/BI-2000
Browse files Browse the repository at this point in the history
Add test for BI-2000. Add bad ontology sample.
  • Loading branch information
cvacalares authored Oct 10, 2024
2 parents d88f61e + de2325c commit 3d94aff
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"@cucumber/cucumber": "^9.4.0",
"@cucumber/pretty-formatter": "*",
"@slime/stopwatch": "^1.0.5",
"chromedriver": "^127.0.0",
"chromedriver": "^129.0.0",
"cucumber-html-reporter": "^5.2.0",
"edgedriver": "^5.6.0",
"geckodriver": "^4.4.1",
Expand Down
17 changes: 17 additions & 0 deletions src/features/BI-2000.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Feature: Ontology error message disappears when a valid file is uploaded

@BI-2000
Scenario: Ontology error message disappears when a valid file is uploaded
Given a new program is created
Given user logs in as "Cucumber Breeder"
When user selects "*" on program-selection page
And user selects "Ontology" in navigation
And user selects "Manage Ontology" button
And user selects "Import file" menu item
And user uploads Ontology "Bad.xls" file
And user selects 'Import' button
Then user can see banner contains "Error(s) detected in file, Bad.xls . (See details below.) Import cannot proceed."
And user uploads Ontology "test01-ontology.xls" file
And user selects 'Import' button
When user selects "Confirm" button
Then user cannot see banner contains "Error(s) detected in file, Bad.xls . (See details below.) Import cannot proceed."
2 changes: 1 addition & 1 deletion src/features/BI-2056.feature
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Feature: The ontology can be case insensitive
Background:
Given a new program is created

@BI-2156 @debug
@BI-2156
Scenario Outline: The ontology can be case insensitive
Given user logs in as "Cucumber Breeder"
When user selects "*" on program-selection page
Expand Down
1 change: 0 additions & 1 deletion src/features/BI-2057.feature
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
Feature: Sample Tracking

@BI-2057
@debug
Scenario: Sample Tracking
Given a new program is created
Given user logs in as "Cucumber Breeder"
Expand Down
Binary file added src/files/OntologyImport/Bad.xls
Binary file not shown.
7 changes: 7 additions & 0 deletions src/step_definitions/steps.js
Original file line number Diff line number Diff line change
Expand Up @@ -1012,6 +1012,13 @@ Then(/^user can see banner contains "([^"]*)"$/, async (args1) => {
});
});

Then(/^user cannot see banner contains "([^"]*)"$/, async (args1) => {
await page.assert.not.visible({
selector: `//article//*[contains(text(), normalize-space("${args1}"))]`,
locateStrategy: "xpath",
});
});

Then(/^user can see "([^"]*)" column in Users$/, async (args1) => {
await page.assert.visible({
selector: `//*[@id='programUserTableLabel']//th[normalize-space(.)='${args1}']`,
Expand Down

0 comments on commit 3d94aff

Please sign in to comment.