forked from watertap-org/watertap
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added error handling for invalid input on solve; added cypress test f…
…or invalid input
- Loading branch information
1 parent
56e9cef
commit 21dfa32
Showing
5 changed files
with
55 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
describe('Invalid Input Test', () => { | ||
it('test negative input for recovery rate', () => { | ||
//load webpage | ||
cy.visit('/') | ||
|
||
//click example ro flowsheet | ||
cy.findByRole('link', { name: /example ro flowsheet/i}).click() | ||
|
||
//enter negative value for recovery rate | ||
var recovery_textbox = cy.get('#outlined-basicRecovery') | ||
recovery_textbox.click({force:true}) | ||
recovery_textbox = cy.get('#outlined-basicRecovery') | ||
recovery_textbox.type('{backspace}{backspace}{backspace}-10') | ||
|
||
//click on save | ||
cy.findAllByRole('button', { name: /save/i}).eq(0).click() | ||
|
||
//click on solve | ||
cy.findAllByRole('button', { name: /solve/i}).eq(0).click() | ||
|
||
//find error message | ||
cy.findByRole('alert') | ||
|
||
}) | ||
|
||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters