scinote-web/features/protocol.feature

108 lines
4.4 KiB
Gherkin
Raw Normal View History

2019-12-17 18:21:49 +08:00
# feature/protocol. feature
Feature: Protocol
As a member of a project
want to add/ edit/ delete a tag
want to add/ edit task description
want to complete / uncomplete task
want to add / change due date
Background:
Given default screen size2
Given the "BioSistemika Process" team exists
Given the following users are registered
| name | email | password | password_confirmation |
| Karli Novak | nonadmin@myorg.com | mypassword1234 | mypassword1234 |
And "nonadmin@myorg.com" is in "BioSistemika Process" team as a "admin"
Given Demo project exists for the "BioSistemika Process" team
And "nonadmin@myorg.com" is signed in with "mypassword1234"
@javascript
Scenario: Successful add new tag to a task
2020-07-08 19:40:42 +08:00
Given I'm on the Protocols page of a "Experiment design" task
2020-07-02 20:48:33 +08:00
And I click element with css ".search-field"
And I click element with css ".edit-tags-link"
2019-12-17 18:21:49 +08:00
And I click on "New" tag button
And I click on Edit sign of "New tag" tag
And I fill in "Star" in "#tag_name" field
2020-07-02 20:48:33 +08:00
And I click element with css ".btn-colorselector"
2019-12-17 18:21:49 +08:00
And I select "#15369E" color
2020-07-02 20:48:33 +08:00
And I click element with css ".save-tag-link"
2019-12-17 18:21:49 +08:00
Then I should see "Star"
2020-07-02 20:48:33 +08:00
And I click "Close" button
2019-12-17 18:21:49 +08:00
Then I should see "Star"
2020-07-06 20:52:42 +08:00
# Make this test shorter and more isolated
@javascript @wip
2019-12-17 18:21:49 +08:00
Scenario: Successful change a tag to a task
2020-07-08 19:40:42 +08:00
Given I'm on the Protocols page of a "Experiment design" task
2020-07-02 20:48:33 +08:00
And I click element with css ".search-field"
And I click element with css ".edit-tags-link"
2019-12-17 18:21:49 +08:00
And I click on "New" tag button
And I click on Edit sign of "New tag" tag
And I fill in "Sun" in "#tag_name" field
2020-07-02 20:48:33 +08:00
And I click element with css ".btn-colorselector"
2019-12-17 18:21:49 +08:00
And I select "#15369E" color
2020-07-02 20:48:33 +08:00
And I click element with css ".save-tag-link"
2019-12-17 18:21:49 +08:00
And I click on Edit sign of "Dry lab" tag
And I fill in "Sky" in "#tag_name" field
2020-07-02 20:48:33 +08:00
And I click element with css ".btn-colorselector"
2019-12-17 18:21:49 +08:00
And I select "#DC143C" color
2020-07-02 20:48:33 +08:00
And I click element with css ".save-tag-link"
2019-12-17 18:21:49 +08:00
And WAIT
2020-07-06 20:52:42 +08:00
And I click "fa-times" icon at position 2 within "#manage-module-tags-modal .modal-body"
2020-07-02 20:48:33 +08:00
And I click "Close" button
2020-07-08 19:40:42 +08:00
And I'm on the Protocols page of a "Experiment design" task
2020-07-02 20:48:33 +08:00
Then I should see "Sun"
Then I should not see "Sky"
2019-12-17 18:21:49 +08:00
@javascript
Scenario: Successful add a tag to a task
2020-07-08 19:40:42 +08:00
Given I'm on the Protocols page of a "Experiment design" task
2020-07-02 20:48:33 +08:00
And I click element with css ".search-field"
And I click element with css ".edit-tags-link"
And I click element with css ".bootstrap-select"
2019-12-17 18:21:49 +08:00
And WAIT
And I click on "Plant" within dropdown menu
2020-07-02 20:48:33 +08:00
And I click "Add" button
2019-12-17 18:21:49 +08:00
And WAIT
2020-07-02 20:48:33 +08:00
And I click element with css ".bootstrap-select"
2019-12-17 18:21:49 +08:00
And WAIT
And I click on "Bacteria" within dropdown menu
2020-07-02 20:48:33 +08:00
And I click "Add" button
And I click "Close" button
2020-07-08 19:40:42 +08:00
And I'm on the Protocols page of a "Experiment design" task
2019-12-17 18:21:49 +08:00
Then I should see "Plant"
Then I should see "Bacteria"
@javascript
Scenario: Successful delete a tag
2020-07-08 19:40:42 +08:00
Given I'm on the Protocols page of a "Experiment design" task
2020-07-02 20:48:33 +08:00
And I click element with css ".search-field"
And I click element with css ".edit-tags-link"
And I click element with css ".delete-tag-link"
And I click "Close" button
2020-07-08 19:40:42 +08:00
And I'm on the Protocols page of a "Experiment design" task
2019-12-17 18:21:49 +08:00
Then I should not see "Dry lab"
@javascript
Scenario: Successful add description
2020-07-08 19:40:42 +08:00
Given I'm on the Protocols page of a "Experiment design" task
2020-07-02 20:48:33 +08:00
And I click element with css "#my_module_description_view"
2019-12-17 18:21:49 +08:00
And confirm with ENTER key to "#my_module_description_textarea_ifr"
And I fill in "I was on Triglav one summer" in "#my_module_description_textarea" rich text editor field
2020-07-02 20:48:33 +08:00
And I click element with css ".tinymce-save-button"
2019-12-17 18:21:49 +08:00
Then I should see "I was on Triglav one summer"
@javascript
Scenario: Successful change description
2020-07-08 19:40:42 +08:00
Given I'm on the Protocols page of a "Experiment design" task
2020-07-02 20:48:33 +08:00
And I click element with css "#my_module_description_view"
2019-12-17 18:21:49 +08:00
And confirm with ENTER key to "#my_module_description_textarea_ifr"
And I fill in "I was on Triglav one summer" in "#my_module_description_textarea" rich text editor field
2020-07-02 20:48:33 +08:00
And I click element with css ".tinymce-save-button"
And I click element with css "#my_module_description_view"
2019-12-17 18:21:49 +08:00
And confirm with ENTER key to "#my_module_description_textarea_ifr"
And I fill in "I will go to Krn one day." in "#my_module_description_textarea" rich text editor field
2020-07-02 20:48:33 +08:00
And I click element with css ".tinymce-save-button"
2019-12-17 18:21:49 +08:00
Then I should see "I will go to Krn one day."