Implement Cucumber tests for direct upload [SCI-3771]

This commit is contained in:
Oleksii Kriuchykhin 2019-09-03 15:14:37 +02:00
parent 940ef5b92f
commit e58d3cf169
12 changed files with 672 additions and 579 deletions

View file

@ -4,6 +4,12 @@ Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.
config.after_initialize do
Bullet.enable = true
Bullet.bullet_logger = true
Bullet.raise = true # raise an error if n+1 query occurs
end
# In the development environment your application's code is reloaded on
# every request. This slows down response time but is perfect for development
# since you don't have to restart the web server when you make code changes.

View file

@ -3,11 +3,6 @@ Rails.application.configure do
config.webpacker.check_yarn_integrity = false
# Settings specified here will take precedence over those in config/application.rb.
config.after_initialize do
Bullet.enable = true
Bullet.bullet_logger = true
Bullet.raise = true # raise an error if n+1 query occurs
end
# Configure public file server for tests with Cache-Control for performance.
config.public_file_server.enabled = true

View file

@ -0,0 +1,187 @@
# feature/protocol step. feature
Feature: Protocol step
As a member of a project
I want to add/ edit/ delete a step
I want to add/ edit/ delete description to a step
I want to add/ edit/ delete table to a step
I want to add/ edit/ delete file to a step
Background:
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"
@wip
Scenario: Unsuccessful add new step to a task
Given TASK page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to "Add new" button
And I click on "Add" button
Then I should see Step name "can't be blank" red error message
And I click to "Cancel" button
@wip
Scenario: Successful add new step to a task
Given TASK page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to "Add new" button
Then I fill in "LJ ZOO" to Step name field
And I click on "Add" button
Then I should see "ZOO" step
@wip
Scenario: Successful add new step to a task
Given TASK page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to "Add new" button
Then I fill in "ZOO" to Step name field
And I click on "Add" button
Then I should see "ZOO" step
@javascript
Scenario: Successful add new step to a task
Given I'm on the Protocols page of a "qPCR" task
And I click first "New Step" link
Then I fill in "PES" in "#step_name" field
Then I fill in "zivali pa so se odpravile dalje po svetu." in "#step_description_textarea" rich text editor field
And I click "Files" link
Then I attach file "Moon.png" to the drag-n-drop field
Then I attach file "File.txt" to the drag-n-drop field
Then I attach file "Star.png" to the drag-n-drop field
Then I click "Tables" link
Then I click "Add table" link
Then I fill in "PES" in ".table_name" field
# Then I fill in "Labradorec" to "A1" Table field
# Then I fill in "Dalmatinec" to "B2" Table field
And I click "Add" button
Then I should see "PES" on "#steps" element
And I should see "Moon.png" attachment on "PES" step
And I should see "File.txt" attachment on "PES" step
And I should see "Star.png" attachment on "PES" step
@wip
Scenario: Successful reorder Steps
Given TASK page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to down arrow icon of a "LJ ZOO" Step
Then I click to down arrow icon of a "LJ ZOO" Step
Then I click to up arrow icon of a "PES" Step
Then I should see "PES" step on first position
Then I should see "ZOO" step on second position
@wip
Scenario: Successful edit Step
Given TASK page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to "Edit step" icon of a "PES" Step
Then I change "zivali pa so se odpravile dalje po svetu." Description field with "Vse to pa zaradi botra petelina!" Description field
And I click on "Files" tab
And I click to "Browse to add" button
Then "Open" window is opened
And I click to "Star.png" File
Then I click to "Open" button
And I click to "X" of "Moon.png" file
Then I click on "Tables" tab
And I fill in "Seznam pasem" to Table title field
Then I change "Labradorec" cell content with "Bobtail" cell content to "A1" Table field
And I fill in "Kraski ovcar" to "D2" Table field
Then I click on "Checklist" tab
And I click on "+Add checklist" link
And I click on "+Add item" link
And I click on "+Add item" link
Then I fill in "Seznam pasem" to Checklist name field
And I fill in "Buldog" to Checklist item field
And I fill in "Lesi" to Checklist item field
And I fill in "Hrt" to Checklist item field
And I click on "Add" button
Then I should see "PES" edited step
@wip
Scenario: Successful edit Step with reordering checklist items
Given TASK page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to "Edit step" icon of a "PES" Step
Then I click on "Checklist" tab
And I move "Hrt" Checklist item to first position
And I move "Buldog" Checklist item to third position
And I click on "Add" button
Then I should see "PES" edited step
@wip
Scenario: Successful check checklist item
Given TASK page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I check "Buldog" Checklist item of a "PES" Step
And I check "Lesi" Checklist item of a "PES" Step
Then I should see checked two check boxes
@wip
Scenario: Successful add comment to a Step
Given TASK page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
Then I add "I was on Triglav one summer." in comment field
And I click to "+" sign in comment field of a "ZOO" Step
Then I should see "I was on Triglav one summer." in Comments list of "ZOO" Step
@wip
Scenario: Unsuccessful add comment to a Step
Given TASK page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to "+" sign in comment field of a "ZOO" Step
Then I should see "can't be blank" red error message under comment field in Comments list of a "ZOO" Step
@wip
Scenario: Successful edit comment to a Step
Given TASK page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to down arrow of a "ZOO" comment
And I click to "Edit" in Comment options modal window
Then I change "I was on Triglav one summer." comment with "I was on Triglav one summer and I do not have plans to go once more." comment
And I click to "OK" sign
Then I should see "I was on Triglav one summer and I do not have plans to go once more." in Comments list of a "ZOO" Step
@wip
Scenario: Unsuccessful edit comment to a Step
Given TASK page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to down arrow of a "ZOO" comment
And I click to "Edit" in Comment options modal window
Then I change "I was on Triglav one summer." comment with "I was on Triglav one summer and I do not have plans to go once more." comment
And I click to "Cancel" sign
Then I should see "I was on Triglav one summer." in Comments list of a "ZOO" Step
@wip
Scenario: Unsuccessful delete comment to a Step
Given TASK page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to down arrow of a "I was on Triglav one summer." comment
And I click to "Delete" in Comment options modal window
And I click to "Cancel" button in "Are you sure you wish to delete this comment" modal window
Then I should see "I was on Triglav one summer." in Comments list of a "ZOO" Text
@wip
Scenario: Successful delete comment to a Step
Given TASK page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to down arrow of a "I was on Triglav one summer." comment
And I click to "Delete" in Comment options modal window
And I click to "OK" button in "Are you sure you wish to delete this comment" modal window
Then "I was on Triglav one summer." comment is removed from Comments list of a "ZOO" Step
@wip
Scenario: Successful delete Step
Given TASK page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to "Delete" icon of a "LJ ZOO" Step
And I click to "OK" button of a "Are you sure to delete step LJ ZOO?" modal window
Then I should see " Step 3 successfully deleted." flash message
@wip
Scenario: Successful complete Step
Given TASK page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to "Complete step" button of a "ZOO" Step
Then I should see white "Uncomplete step" button
@wip
Scenario: Successful edit completed Step
Given TASK page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to "Edit step" icon of a "PES" Step
Then I change "Vse to pa zaradi botra petelina!" Description field with "Bezimo, da se nam se kaj ne zgodi!" Description field
And I click on "Add" button
Then I should see "PES" edited step
@wip
Scenario: Successful uncomplete Step
Given TASK page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to "Uncomplete step" button of a "ZOO" Step
Then I should see "Complete step" button

View file

@ -1,167 +0,0 @@
# feature/protocol step. feature
Feature: Protocol step
As a member of a project
I want to add/ edit/ delete a step
I want to add/ edit/ delete description to a step
I want to add/ edit/ delete table to a step
I want to add/ edit/ delete file to a step
Background:
Given the following users is registered:
| name | email | password | team | role |
|Karli Novak (creator)| nonadmin@myorg.com | mypassword1234 | BioSistemika Process | Administrator|
And the following file:
| file | size |
| Moon.png | 0.5 MB |
| Star.png | 0.5 MB |
Scenario: Unsuccessful add new step to a task
Given TASK page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to "Add new" button
And I click on "Add" button
Then I should see Step name "can't be blank" red error message
And I click to "Cancel" button
Scenario: Successful add new step to a task
Given TASK page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to "Add new" button
Then I fill in "LJ ZOO" to Step name field
And I click on "Add" button
Then I should see "ZOO" step
Scenario: Successful add new step to a task
Given TASK page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to "Add new" button
Then I fill in "ZOO" to Step name field
And I click on "Add" button
Then I should see "ZOO" step
Scenario: Successful add new step to a task
Given TASK page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to "Add new" button
Then I fill in "PES" to Step name field
Then I fill in "zivali pa so se odpravile dalje po svetu." to Description field
And I click on "Files" tab
And I click to "Browse to add" button
Then "Open" window is opened
And I click to "Moon.png" File
Then I click to "Open" button
Then I click on "Tables" tab
Then I click on "+Add table" link
And I should see Table title and Table form
Then I fill in "Labradorec" to "A1" Table field
Then I fill in "Dalmatinec" to "B2" Table field
And I click on "Add" button
Then I should see "PES" step
Scenario: Successful reorder Steps
Given TASK page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to down arrow icon of a "LJ ZOO" Step
Then I click to down arrow icon of a "LJ ZOO" Step
Then I click to up arrow icon of a "PES" Step
Then I should see "PES" step on first position
Then I should see "ZOO" step on second position
Scenario: Successful edit Step
Given TASK page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to "Edit step" icon of a "PES" Step
Then I change "zivali pa so se odpravile dalje po svetu." Description field with "Vse to pa zaradi botra petelina!" Description field
And I click on "Files" tab
And I click to "Browse to add" button
Then "Open" window is opened
And I click to "Star.png" File
Then I click to "Open" button
And I click to "X" of "Moon.png" file
Then I click on "Tables" tab
And I fill in "Seznam pasem" to Table title field
Then I change "Labradorec" cell content with "Bobtail" cell content to "A1" Table field
And I fill in "Kraski ovcar" to "D2" Table field
Then I click on "Checklist" tab
And I click on "+Add checklist" link
And I click on "+Add item" link
And I click on "+Add item" link
Then I fill in "Seznam pasem" to Checklist name field
And I fill in "Buldog" to Checklist item field
And I fill in "Lesi" to Checklist item field
And I fill in "Hrt" to Checklist item field
And I click on "Add" button
Then I should see "PES" edited step
Scenario: Successful edit Step with reordering checklist items
Given TASK page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to "Edit step" icon of a "PES" Step
Then I click on "Checklist" tab
And I move "Hrt" Checklist item to first position
And I move "Buldog" Checklist item to third position
And I click on "Add" button
Then I should see "PES" edited step
Scenario: Successful check checklist item
Given TASK page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I check "Buldog" Checklist item of a "PES" Step
And I check "Lesi" Checklist item of a "PES" Step
Then I should see checked two check boxes
Scenario: Successful add comment to a Step
Given TASK page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
Then I add "I was on Triglav one summer." in comment field
And I click to "+" sign in comment field of a "ZOO" Step
Then I should see "I was on Triglav one summer." in Comments list of "ZOO" Step
Scenario: Unsuccessful add comment to a Step
Given TASK page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to "+" sign in comment field of a "ZOO" Step
Then I should see "can't be blank" red error message under comment field in Comments list of a "ZOO" Step
Scenario: Successful edit comment to a Step
Given TASK page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to down arrow of a "ZOO" comment
And I click to "Edit" in Comment options modal window
Then I change "I was on Triglav one summer." comment with "I was on Triglav one summer and I do not have plans to go once more." comment
And I click to "OK" sign
Then I should see "I was on Triglav one summer and I do not have plans to go once more." in Comments list of a "ZOO" Step
Scenario: Unsuccessful edit comment to a Step
Given TASK page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to down arrow of a "ZOO" comment
And I click to "Edit" in Comment options modal window
Then I change "I was on Triglav one summer." comment with "I was on Triglav one summer and I do not have plans to go once more." comment
And I click to "Cancel" sign
Then I should see "I was on Triglav one summer." in Comments list of a "ZOO" Step
Scenario: Unsuccessful delete comment to a Step
Given TASK page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to down arrow of a "I was on Triglav one summer." comment
And I click to "Delete" in Comment options modal window
And I click to "Cancel" button in "Are you sure you wish to delete this comment" modal window
Then I should see "I was on Triglav one summer." in Comments list of a "ZOO" Text
Scenario: Successful delete comment to a Step
Given TASK page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to down arrow of a "I was on Triglav one summer." comment
And I click to "Delete" in Comment options modal window
And I click to "OK" button in "Are you sure you wish to delete this comment" modal window
Then "I was on Triglav one summer." comment is removed from Comments list of a "ZOO" Step
Scenario: Successful delete Step
Given TASK page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to "Delete" icon of a "LJ ZOO" Step
And I click to "OK" button of a "Are you sure to delete step LJ ZOO?" modal window
Then I should see " Step 3 successfully deleted." flash message
Scenario: Successful complete Step
Given TASK page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to "Complete step" button of a "ZOO" Step
Then I should see white "Uncomplete step" button
Scenario: Successful edit completed Step
Given TASK page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to "Edit step" icon of a "PES" Step
Then I change "Vse to pa zaradi botra petelina!" Description field with "Bezimo, da se nam se kaj ne zgodi!" Description field
And I click on "Add" button
Then I should see "PES" edited step
Scenario: Successful uncomplete Step
Given TASK page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to "Uncomplete step" button of a "ZOO" Step
Then I should see "Complete step" button

329
features/result.feature Normal file
View file

@ -0,0 +1,329 @@
# feature/result. feature
Feature: Result
As a member of a project
I want to add/ edit/ delete text results of a task
I want to add/ edit/ delete table results of a task
I want to add/ edit/ delete file results of a task
Background:
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"
@wip
Scenario: Unsuccessful add Text result
Given RESULTS page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to "Text" button
And I click on "Add text result" button
Then I should see Text "can't be blank" red error message
And I click to "Cancel" button
@wip
Scenario: Successful add text result with Text name
Given RESULTS page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to "Text" button
Then I fill in "ZOO" to Name field
Then I fill in "Živali pa so se odpravile dalje po svetu." to Text field
And I click on "Add text result" button
Then I should see "ZOO" Text Result
@wip
Scenario: Successful add Text result
Given RESULTS page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to "Text" button
Then I fill in "Vse to pa zaradi botra petelina, bog mu daj zdravje!" to Text field
And I click on "Add text result" button
Then I should see "Vse to pa zaradi botra petelina, bog mu daj zdravje!" Text field
@wip
Scenario: Successful edit Text task result
Given RESULTS page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to "Edit result" icon of a "LJ ZOO" Text task result
Then I change "LJ ZOO" Name with "ZOO" Name
Then I change "Živali pa so se odpravile dalje po svetu." Text field with "Vse to pa zaradi botra petelina!" Text field
And I click on "Update text result" button
Then I should see "Vse to pa zaradi botra petelina!" Text field
@wip
Scenario: Successful add comment to a Text task result
Given RESULTS page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
Then I add "I was on Triglav one summer." in comment field
And I click to "+" sign in comment field of a "ZOO" Text result
Then I should see "I was on Triglav one summer." in Comments list of "ZOO" Text result
@wip
Scenario: Unsuccessful add comment to a Text task result
Given RESULTS page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to "+" sign in comment field of a "ZOO" Text result
Then I should see "can't be blank" red error message under comment field in Comments list of a "ZOO" Text result
@wip
Scenario: Successful edit comment to a Text task result
Given RESULTS page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to down arrow of a "ZOO" comment
And I click to "Edit" in Comment options modal window
Then I change "I was on Triglav one summer." comment with "I was on Triglav one summer and I do not have plans to go once more." comment
And I click to "OK" sign
Then I should see "I was on Triglav one summer and I do not have plans to go once more." in Comments list of a "ZOO" Text result
@wip
Scenario: Unsuccessful edit comment to a Text task result
Given RESULTS page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to down arrow of a "ZOO" comment
And I click to "Edit" in Comment options modal window
Then I change "I was on Triglav one summer." comment with "I was on Triglav one summer and I do not have plans to go once more." comment
And I click to "Cancel" sign
Then I should see "I was on Triglav one summer." in Comments list of a "ZOO" Text result
@wip
Scenario: Unsuccessful delete comment to a Text task result
Given RESULTS page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to down arrow of a "I was on Triglav one summer." comment
And I click to "Delete" in Comment options modal window
And I click to "Cancel" button in "Are you sure you wish to delete this comment" modal window
Then I should see "I was on Triglav one summer." in Comments list of a "ZOO" Text result
@wip
Scenario: Successful delete comment to a Text task result
Given RESULTS page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to down arrow of a "I was on Triglav one summer." comment
And I click to "Delete" in Comment options modal window
And I click to "OK" button in "Are you sure you wish to delete this comment" modal window
Then "I was on Triglav one summer." comment is removed from Comments list of a "ZOO" Text result
@wip
Scenario: Successful archive text result with Text name
Given RESULTS page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to "Archive result" icon of a "ZOO" Text task result
And I click to "OK" button in "Are you sure to archive result?" modal window
Then I should see "Successfully archived text result in task Control." flash message
@wip
Scenario: Unsuccessful add Table result
Given RESULTS page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to "Table" button
And I click on "Add Table result" button
Then I should see Text "can't be blank" red error message
And I click to "Cancel" button
@wip
Scenario: Successful add table result with Table name
Given RESULTS page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to "Table" button
Then I fill in "ZOO" to Name field
Then I fill in "Živali pa so se odpravile dalje po svetu." to "A1" Table field
And I click on "Add table result" button
Then I should see "ZOO" Table Result
@wip
Scenario: Successful add Table result
Given RESULTS page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to "Table" button
Then I fill in "Vse to pa zaradi botra petelina, bog mu daj zdravje!" to "A1" Table field
And I click on "Add table result" button
Then I should see "Vse to pa zaradi botra petelina, bog mu daj zdravje!" in "A1" Table field
@wip
Scenario: Successful edit Table task result
Given RESULTS page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to "Edit result" icon of a "LJ ZOO" Table task result
Then I change "LJ ZOO" Name with "ZOO" Name
Then I change "Živali pa so se odpravile dalje po svetu." Table field with "Vse to pa zaradi botra petelina!" Table field
Then I fill in "I was on Triglav one summer" to "B2" Table field
And I click on "Update table result" button
Then I should see "I was on Triglav one summer" in "B2" Table field
@wip
Scenario: Successful add comment to a Table task result
Given RESULTS page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
Then I add "I was on Triglav one summer." in comment field
And I click to "+" sign in comment field of a "ZOO" Table result
Then I should see "I was on Triglav one summer." in Comments list of "ZOO" Table result
@wip
Scenario: Successful edit comment to a Table task result
Given RESULTS page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to down arrow of a "ZOO" comment
And I click to "Edit" in Comment options modal window
Then I change "I was on Triglav one summer." comment with "I was on Triglav one summer and I do not have plans to go once more." comment
And I click to "OK" sign
Then I should see "I was on Triglav one summer and I do not have plans to go once more." in Comments list of a "ZOO" Table result
@wip
Scenario: Unsuccessful edit comment to a Table task result
Given RESULTS page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to down arrow of a "ZOO" comment
And I click to "Edit" in Comment options modal window
Then I change "I was on Triglav one summer." comment with "I was on Triglav one summer and I do not have plans to go once more." comment
And I click to "Cancel" sign
Then I should see "I was on Triglav one summer." in Comments list of a "ZOO" Table result
@wip
Scenario: Unsuccessful delete comment to a Table task result
Given RESULTS page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to down arrow of a "I was on Triglav one summer." comment
And I click to "Delete" in Comment options modal window
And I click to "Cancel" button in "Are you sure you wish to delete this comment" modal window
Then I should see "I was on Triglav one summer." in Comments list of a "ZOO" Table result
@wip
Scenario: Successful delete comment to a Table task result
Given RESULTS page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to down arrow of a "I was on Triglav one summer." comment
And I click to "Delete" in Comment options modal window
And I click to "OK" button in "Are you sure you wish to delete this comment" modal window
Then "I was on Triglav one summer." comment is removed from Comments list of a "ZOO" Table result
@wip
Scenario: Successful archive Table result with Table name
Given RESULTS page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to "Archive result" icon of a "ZOO" Table task result
And I click to "OK" button in "Are you sure to archive result?" modal window
Then I should see "Successfully archived table result in task Control." flash message
@wip
Scenario: Unsuccessful add File result
Given RESULTS page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to "File" button
And I click on "Add file result" button
Then I should see File "can't be blank" red error message
And I click to "Cancel" button
@javascript
Scenario: Successful add File result with File name
Given I'm on the Results page of a "qPCR" task
And I click "File" link
Then I attach file "Moon.png" to the drag-n-drop field
Then I fill in "LJ ZOO" in ".panel-result-attachment-new input" field
And I click "Add" button
Then I should see "LJ ZOO" on "#results" element
@javascript
Scenario: Successful add File result
Given I'm on the Results page of a "qPCR" task
And I click "File" link
Then I attach file "File.txt" to the drag-n-drop field
And I click "Add" button
Then I should see "File.txt" on "#results" element
@javascript
Scenario: Successful edit File result with File name
Given I'm on the Results page of a "qPCR" task
And I click "File" link
Then I attach file "Moon.png" to the drag-n-drop field
Then I fill in "LJ ZOO" in ".panel-result-attachment-new input" field
And I click "Add" button
And I click edit "LJ ZOO" result icon
Then I attach a "Star.png" file to "#result_asset_attributes_file" field
Then I fill in "STAR ZOO" in "#result_name" field
And I click "Save" button
Then I should see "STAR ZOO" on "#results" element
@wip
Scenario: Successful add comment to a File task result
Given RESULTS page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
Then I add "I was on Triglav one summer." in comment field
And I click to "+" sign in comment field of a "ZOO" File result
Then I should see "I was on Triglav one summer." in Comments list of "ZOO" File result
@wip
Scenario: Successful edit comment to a File task result
Given RESULTS page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to down arrow of a "ZOO" comment
And I click to "Edit" in Comment options modal window
Then I change "I was on Triglav one summer." comment with "I was on Triglav one summer and I do not have plans to go once more." comment
And I click to "OK" sign
Then I should see "I was on Triglav one summer and I do not have plans to go once more." in Comments list of a "ZOO" File result
@wip
Scenario: Unsuccessful edit comment to a File task result
Given RESULTS page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to down arrow of a "ZOO" comment
And I click to "Edit" in Comment options modal window
Then I change "I was on Triglav one summer." comment with "I was on Triglav one summer and I do not have plans to go once more." comment
And I click to "Cancel" sign
Then I should see "I was on Triglav one summer." in Comments list of a "ZOO" File result
@wip
Scenario: Unsuccessful delete comment to a File task result
Given RESULTS page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to down arrow of a "I was on Triglav one summer." comment
And I click to "Delete" in Comment options modal window
And I click to "Cancel" button in "Are you sure you wish to delete this comment" modal window
Then I should see "I was on Triglav one summer." in Comments list of a "ZOO" File result
@wip
Scenario: Successful delete comment to a File task result
Given RESULTS page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to down arrow of a "I was on Triglav one summer." comment
And I click to "Delete" in Comment options modal window
And I click to "OK" button in "Are you sure you wish to delete this comment" modal window
Then "I was on Triglav one summer." comment is removed from Comments list of a "ZOO" File result
@wip
Scenario: Successful archive File result with File name
Given RESULTS page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to "Archive result" icon of a "ZOO" File task result
And I click to "OK" button in "Are you sure to archive result?" modal window
Then I should see "Successfully archived file result in task Control." flash message
@wip
Scenario: Download archived Text result
Given RESULTS page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to "Archive" icon
Then I should see "ZOO" Text result
And I click to down arrow of a "ZOO" Text result
And I click to "Download" of a Options modal window
Then I should see "ZOO" Text result is dowloaded
@wip
Scenario: Download archived Table result
Given RESULTS page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to "Archive" icon
Then I should see "ZOO" Table result
And I click to down arrow of a "ZOO" Table result
And I click to "Download" of a Options modal window
Then I should see "ZOO" Table result is dowloaded
@wip
Scenario: Download archived File result
Given RESULTS page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to "Archive" icon
Then I should see "ZOO" File result
And I click to down arrow of a "ZOO" File result
And I click to "Download" of a Options modal window
Then I should see "ZOO" File result is dowloaded
@wip
Scenario: Delete archived Text result
Given RESULTS page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to "Archive" icon
Then I should see "ZOO" Text result
And I click to down arrow of a "ZOO" Text result
And I click to "Delete" of a Options modal window
And I click to "OK" button in "Are you sure to permanently delete result?" modal window
Then I should see "Sucessfully removed result from task Control." flash message
@wip
Scenario: Delete archived Table result
Given RESULTS page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to "Archive" icon
Then I should see "ZOO" Table result
And I click to down arrow of a "ZOO" Table result
And I click to "Delete" of a Options modal window
And I click to "OK" button in "Are you sure to permanently delete result?" modal window
Then I should see "Sucessfully removed result from task Control." flash message
@wip
Scenario: Delete archived File result
Given RESULTS page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to "Archive" icon
Then I should see "ZOO" File result
And I click to down arrow of a "ZOO" File result
And I click to "Delete" of a Options modal window
And I click to "OK" button in "Are you sure to permanently delete result?" modal window
Then I should see "Sucessfully removed result from task Control." flash message

View file

@ -1,297 +0,0 @@
# feature/result. feature
Feature: Result
As a member of a project
I want to add/ edit/ delete text results of a task
I want to add/ edit/ delete table results of a task
I want to add/ edit/ delete file results of a task
Background:
Given the following users is registered:
| name | email | password | team | role |
|Karli Novak (creator)| nonadmin@myorg.com | mypassword1234 | BioSistemika Process | Administrator|
And the following file:
| file | size |
| Moon.png | 0.5 MB |
| Star.png | 0.5 MB |
Scenario: Unsuccessful add Text result
Given RESULTS page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to "Text" button
And I click on "Add text result" button
Then I should see Text "can't be blank" red error message
And I click to "Cancel" button
Scenario: Successful add text result with Text name
Given RESULTS page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to "Text" button
Then I fill in "ZOO" to Name field
Then I fill in "Živali pa so se odpravile dalje po svetu." to Text field
And I click on "Add text result" button
Then I should see "ZOO" Text Result
Scenario: Successful add Text result
Given RESULTS page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to "Text" button
Then I fill in "Vse to pa zaradi botra petelina, bog mu daj zdravje!" to Text field
And I click on "Add text result" button
Then I should see "Vse to pa zaradi botra petelina, bog mu daj zdravje!" Text field
Scenario: Successful edit Text task result
Given RESULTS page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to "Edit result" icon of a "LJ ZOO" Text task result
Then I change "LJ ZOO" Name with "ZOO" Name
Then I change "Živali pa so se odpravile dalje po svetu." Text field with "Vse to pa zaradi botra petelina!" Text field
And I click on "Update text result" button
Then I should see "Vse to pa zaradi botra petelina!" Text field
Scenario: Successful add comment to a Text task result
Given RESULTS page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
Then I add "I was on Triglav one summer." in comment field
And I click to "+" sign in comment field of a "ZOO" Text result
Then I should see "I was on Triglav one summer." in Comments list of "ZOO" Text result
Scenario: Unsuccessful add comment to a Text task result
Given RESULTS page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to "+" sign in comment field of a "ZOO" Text result
Then I should see "can't be blank" red error message under comment field in Comments list of a "ZOO" Text result
Scenario: Successful edit comment to a Text task result
Given RESULTS page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to down arrow of a "ZOO" comment
And I click to "Edit" in Comment options modal window
Then I change "I was on Triglav one summer." comment with "I was on Triglav one summer and I do not have plans to go once more." comment
And I click to "OK" sign
Then I should see "I was on Triglav one summer and I do not have plans to go once more." in Comments list of a "ZOO" Text result
Scenario: Unsuccessful edit comment to a Text task result
Given RESULTS page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to down arrow of a "ZOO" comment
And I click to "Edit" in Comment options modal window
Then I change "I was on Triglav one summer." comment with "I was on Triglav one summer and I do not have plans to go once more." comment
And I click to "Cancel" sign
Then I should see "I was on Triglav one summer." in Comments list of a "ZOO" Text result
Scenario: Unsuccessful delete comment to a Text task result
Given RESULTS page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to down arrow of a "I was on Triglav one summer." comment
And I click to "Delete" in Comment options modal window
And I click to "Cancel" button in "Are you sure you wish to delete this comment" modal window
Then I should see "I was on Triglav one summer." in Comments list of a "ZOO" Text result
Scenario: Successful delete comment to a Text task result
Given RESULTS page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to down arrow of a "I was on Triglav one summer." comment
And I click to "Delete" in Comment options modal window
And I click to "OK" button in "Are you sure you wish to delete this comment" modal window
Then "I was on Triglav one summer." comment is removed from Comments list of a "ZOO" Text result
Scenario: Successful archive text result with Text name
Given RESULTS page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to "Archive result" icon of a "ZOO" Text task result
And I click to "OK" button in "Are you sure to archive result?" modal window
Then I should see "Successfully archived text result in task Control." flash message
Scenario: Unsuccessful add Table result
Given RESULTS page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to "Table" button
And I click on "Add Table result" button
Then I should see Text "can't be blank" red error message
And I click to "Cancel" button
Scenario: Successful add table result with Table name
Given RESULTS page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to "Table" button
Then I fill in "ZOO" to Name field
Then I fill in "Živali pa so se odpravile dalje po svetu." to "A1" Table field
And I click on "Add table result" button
Then I should see "ZOO" Table Result
Scenario: Successful add Table result
Given RESULTS page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to "Table" button
Then I fill in "Vse to pa zaradi botra petelina, bog mu daj zdravje!" to "A1" Table field
And I click on "Add table result" button
Then I should see "Vse to pa zaradi botra petelina, bog mu daj zdravje!" in "A1" Table field
Scenario: Successful edit Table task result
Given RESULTS page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to "Edit result" icon of a "LJ ZOO" Table task result
Then I change "LJ ZOO" Name with "ZOO" Name
Then I change "Živali pa so se odpravile dalje po svetu." Table field with "Vse to pa zaradi botra petelina!" Table field
Then I fill in "I was on Triglav one summer" to "B2" Table field
And I click on "Update table result" button
Then I should see "I was on Triglav one summer" in "B2" Table field
Scenario: Successful add comment to a Table task result
Given RESULTS page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
Then I add "I was on Triglav one summer." in comment field
And I click to "+" sign in comment field of a "ZOO" Table result
Then I should see "I was on Triglav one summer." in Comments list of "ZOO" Table result
Scenario: Successful edit comment to a Table task result
Given RESULTS page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to down arrow of a "ZOO" comment
And I click to "Edit" in Comment options modal window
Then I change "I was on Triglav one summer." comment with "I was on Triglav one summer and I do not have plans to go once more." comment
And I click to "OK" sign
Then I should see "I was on Triglav one summer and I do not have plans to go once more." in Comments list of a "ZOO" Table result
Scenario: Unsuccessful edit comment to a Table task result
Given RESULTS page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to down arrow of a "ZOO" comment
And I click to "Edit" in Comment options modal window
Then I change "I was on Triglav one summer." comment with "I was on Triglav one summer and I do not have plans to go once more." comment
And I click to "Cancel" sign
Then I should see "I was on Triglav one summer." in Comments list of a "ZOO" Table result
Scenario: Unsuccessful delete comment to a Table task result
Given RESULTS page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to down arrow of a "I was on Triglav one summer." comment
And I click to "Delete" in Comment options modal window
And I click to "Cancel" button in "Are you sure you wish to delete this comment" modal window
Then I should see "I was on Triglav one summer." in Comments list of a "ZOO" Table result
Scenario: Successful delete comment to a Table task result
Given RESULTS page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to down arrow of a "I was on Triglav one summer." comment
And I click to "Delete" in Comment options modal window
And I click to "OK" button in "Are you sure you wish to delete this comment" modal window
Then "I was on Triglav one summer." comment is removed from Comments list of a "ZOO" Table result
Scenario: Successful archive Table result with Table name
Given RESULTS page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to "Archive result" icon of a "ZOO" Table task result
And I click to "OK" button in "Are you sure to archive result?" modal window
Then I should see "Successfully archived table result in task Control." flash message
Scenario: Unsuccessful add File result
Given RESULTS page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to "File" button
And I click on "Add file result" button
Then I should see File "can't be blank" red error message
And I click to "Cancel" button
Scenario: Successful add File result with File name
Given RESULTS page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to "File" button
Then I click to "Browse to add" button
And "Open" window is opened
And I click to "Moon.png" File
And I click to "Open" button
Then I fill in "LJ ZOO" to Name field
And I click on "Add file result" button
Then I should see "ZOO" File Result
Scenario: Successful add File result
Given RESULTS page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to "File" button
Then I click to "Browse to add" button
And "Open" window is opened
And I click to "Moon.png" File
And I click to "Open" button
And I click on "Add file result" button
Then I should see "Moon.png" File Result
Scenario: Successful edit File result with File name
Given RESULTS page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to "Edit result" icon of a "LJ ZOO" File task result
Then I click to "Choose Fie" button
And "Open" window is opened
And I click to "Star.png" File
And I click to "Open" button
Then I change "LJ ZOO" Name with "ZOO" Name
And I click on "Update file result" button
Then I should see "LJ ZOO" File Result
Scenario: Successful add comment to a File task result
Given RESULTS page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
Then I add "I was on Triglav one summer." in comment field
And I click to "+" sign in comment field of a "ZOO" File result
Then I should see "I was on Triglav one summer." in Comments list of "ZOO" File result
Scenario: Successful edit comment to a File task result
Given RESULTS page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to down arrow of a "ZOO" comment
And I click to "Edit" in Comment options modal window
Then I change "I was on Triglav one summer." comment with "I was on Triglav one summer and I do not have plans to go once more." comment
And I click to "OK" sign
Then I should see "I was on Triglav one summer and I do not have plans to go once more." in Comments list of a "ZOO" File result
Scenario: Unsuccessful edit comment to a File task result
Given RESULTS page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to down arrow of a "ZOO" comment
And I click to "Edit" in Comment options modal window
Then I change "I was on Triglav one summer." comment with "I was on Triglav one summer and I do not have plans to go once more." comment
And I click to "Cancel" sign
Then I should see "I was on Triglav one summer." in Comments list of a "ZOO" File result
Scenario: Unsuccessful delete comment to a File task result
Given RESULTS page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to down arrow of a "I was on Triglav one summer." comment
And I click to "Delete" in Comment options modal window
And I click to "Cancel" button in "Are you sure you wish to delete this comment" modal window
Then I should see "I was on Triglav one summer." in Comments list of a "ZOO" File result
Scenario: Successful delete comment to a File task result
Given RESULTS page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to down arrow of a "I was on Triglav one summer." comment
And I click to "Delete" in Comment options modal window
And I click to "OK" button in "Are you sure you wish to delete this comment" modal window
Then "I was on Triglav one summer." comment is removed from Comments list of a "ZOO" File result
Scenario: Successful archive File result with File name
Given RESULTS page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to "Archive result" icon of a "ZOO" File task result
And I click to "OK" button in "Are you sure to archive result?" modal window
Then I should see "Successfully archived file result in task Control." flash message
Scenario: Download archived Text result
Given RESULTS page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to "Archive" icon
Then I should see "ZOO" Text result
And I click to down arrow of a "ZOO" Text result
And I click to "Download" of a Options modal window
Then I should see "ZOO" Text result is dowloaded
Scenario: Download archived Table result
Given RESULTS page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to "Archive" icon
Then I should see "ZOO" Table result
And I click to down arrow of a "ZOO" Table result
And I click to "Download" of a Options modal window
Then I should see "ZOO" Table result is dowloaded
Scenario: Download archived File result
Given RESULTS page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to "Archive" icon
Then I should see "ZOO" File result
And I click to down arrow of a "ZOO" File result
And I click to "Download" of a Options modal window
Then I should see "ZOO" File result is dowloaded
Scenario: Delete archived Text result
Given RESULTS page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to "Archive" icon
Then I should see "ZOO" Text result
And I click to down arrow of a "ZOO" Text result
And I click to "Delete" of a Options modal window
And I click to "OK" button in "Are you sure to permanently delete result?" modal window
Then I should see "Sucessfully removed result from task Control." flash message
Scenario: Delete archived Table result
Given RESULTS page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to "Archive" icon
Then I should see "ZOO" Table result
And I click to down arrow of a "ZOO" Table result
And I click to "Delete" of a Options modal window
And I click to "OK" button in "Are you sure to permanently delete result?" modal window
Then I should see "Sucessfully removed result from task Control." flash message
Scenario: Delete archived File result
Given RESULTS page of a "Control" task of "qPCR" experiment of a "Protein" project of a Karli Novak user
And I click to "Archive" icon
Then I should see "ZOO" File result
And I click to down arrow of a "ZOO" File result
And I click to "Delete" of a Options modal window
And I click to "OK" button in "Are you sure to permanently delete result?" modal window
Then I should see "Sucessfully removed result from task Control." flash message

View file

@ -1,108 +1,108 @@
Feature: Settings
As a user
I want to be able to change Profile data for my account
So that I have a my prefered settings
Background:
Given the "BioSistemika Process" team exists
Given the following users are registered
| email | password | password_confirmation | full_name | initials |
| nonadmin@myorg.com | mypassword1234 | mypassword1234 | Karli Novak | KN |
And "nonadmin@myorg.com" is in "BioSistemika Process" team as a "normal_user"
And "nonadmin@myorg.com" is signed in with "mypassword1234"
@javascript @wip
Scenario: Successful navigate to profile page
Given I'm on the home page of "BioSistemika Process" team
And I click on Avatar
And I click "Settings" link within "#user-account-dropdown"
Then I should see "My profile"
@javascript
Scenario: Unsuccessful avatar image upload, file is too big
Given I'm on the profile page
Then I click on image within ".avatar-container" element
And I attach a "Moon.png" file to "user_raw_avatar" field
And I trigger click '#user-avatar-field .btn-success'
And I should see "Your avatar file cannot be larger than 0.2 MB. (Please try again with a smaller file.)" error message
@javascript
Scenario: Successful upload avatar image
Given I'm on the profile page
Then I click on image within ".avatar-container" element
And I attach a "Star.png" file to "user_raw_avatar" field
Then I click "Upload" button
And I should see "Your account has been updated successfully" flash message
@javascript
Scenario: Successfully changes user full name
Given I'm on the profile page
Then I click on Edit on ".settings-page-full-name" input field
And I fill in "Karli Novak Novakovic" in ".settings-page-full-name" input field
Then I click "Save" button
And I should see "Karli Novak Novakovic" in ".settings-page-full-name" input field
@javascript
Scenario: Unsuccessfully changes user initials, text is too long
Given I'm on the profile page
Then I click on Edit on ".settings-page-initials" input field
And I fill in "KNOCK" in ".settings-page-initials" input field
Then I click "Save" button
And I should see "is too long (maximum is 4 characters)" error message
@javascript
Scenario: Successfully changes user initials
Given I'm on the profile page
Then I click on Edit on ".settings-page-initials" input field
And I fill in "KN" in ".settings-page-initials" input field
Then I click "Save" button
And I should see "KN" in ".settings-page-initials" input field
@javascript
Scenario: Successfully changes user email
Given I'm on the profile page
Then I click on Edit on ".settings-page-email" input field
And I change "nonadmin@myorg.com" with "user@myorg.com" email
And I fill in "mypassword1234" in "#edit-email-current-password" field of ".settings-page-email" form
Then I click "Save" button
And I should see "user@myorg.com" in ".settings-page-email" input field
@javascript
Scenario: Unsuccessful Password Change, password is too short
Given I'm on the profile page
Then I click on Edit on ".settings-page-change-password" input field
And I fill in "mypassword1234" in "#edit-password-current-password" field of ".settings-page-change-password" form
And I fill in "mypass" in "#user_password" field of ".settings-page-change-password" form
And I fill in "mypass" in "#user_password_confirmation" field of ".settings-page-change-password" form
Then I click "Save" button
And I should see "is too short (minimum is 8 characters)"
@javascript
Scenario: Unsuccessful Password Change, passwords does not match
Given I'm on the profile page
Then I click on Edit on ".settings-page-change-password" input field
And I fill in "mypassword1234" in "#edit-password-current-password" field of ".settings-page-change-password" form
And I fill in "mypassword5678" in "#user_password" field of ".settings-page-change-password" form
And I fill in "mypassword56788" in "#user_password_confirmation" field of ".settings-page-change-password" form
Then I click "Save" button
And I should see "doesn't match"
@javascript
Scenario: Unsuccessful Password Change, current password is invalid
Given I'm on the profile page
Then I click on Edit on ".settings-page-change-password" input field
And I fill in "mypassword123" in "#edit-password-current-password" field of ".settings-page-change-password" form
And I fill in "mypassword5678" in "#user_password" field of ".settings-page-change-password" form
And I fill in "mypassword5678" in "#user_password_confirmation" field of ".settings-page-change-password" form
Then I click "Save" button
And I should see "is invalid"
@javascript
Scenario: Successful Password Change
Given I'm on the profile page
Then I click on Edit on ".settings-page-change-password" input field
And I fill in "mypassword1234" in "#edit-password-current-password" field of ".settings-page-change-password" form
And I fill in "mypassword5678" in "#user_password" field of ".settings-page-change-password" form
And I fill in "mypassword5678" in "#user_password_confirmation" field of ".settings-page-change-password" form
Then I click "Save" button
And I should see "Password successfully updated." flash message
Feature: Settings
As a user
I want to be able to change Profile data for my account
So that I have a my prefered settings
Background:
Given the "BioSistemika Process" team exists
Given the following users are registered
| email | password | password_confirmation | full_name | initials |
| nonadmin@myorg.com | mypassword1234 | mypassword1234 | Karli Novak | KN |
And "nonadmin@myorg.com" is in "BioSistemika Process" team as a "normal_user"
And "nonadmin@myorg.com" is signed in with "mypassword1234"
@javascript @wip
Scenario: Successful navigate to profile page
Given I'm on the home page of "BioSistemika Process" team
And I click on Avatar
And I click "Settings" link within "#user-account-dropdown"
Then I should see "My profile"
@javascript
Scenario: Unsuccessful avatar image upload, file is too big
Given I'm on the profile page
Then I click on image within ".avatar-container" element
And I attach a "Moon.png" file to "#user_raw_avatar" field
And I trigger click '#user-avatar-field .btn-success'
And I should see "Your avatar file cannot be larger than 0.2 MB. (Please try again with a smaller file.)" error message
@javascript
Scenario: Successful upload avatar image
Given I'm on the profile page
Then I click on image within ".avatar-container" element
And I attach a "Star.png" file to "#user_raw_avatar" field
Then I click "Upload" button
And I should see "Your account has been updated successfully" flash message
@javascript
Scenario: Successfully changes user full name
Given I'm on the profile page
Then I click on Edit on ".settings-page-full-name" input field
And I fill in "Karli Novak Novakovic" in ".settings-page-full-name" input field
Then I click "Save" button
And I should see "Karli Novak Novakovic" in ".settings-page-full-name" input field
@javascript
Scenario: Unsuccessfully changes user initials, text is too long
Given I'm on the profile page
Then I click on Edit on ".settings-page-initials" input field
And I fill in "KNOCK" in ".settings-page-initials" input field
Then I click "Save" button
And I should see "is too long (maximum is 4 characters)" error message
@javascript
Scenario: Successfully changes user initials
Given I'm on the profile page
Then I click on Edit on ".settings-page-initials" input field
And I fill in "KN" in ".settings-page-initials" input field
Then I click "Save" button
And I should see "KN" in ".settings-page-initials" input field
@javascript
Scenario: Successfully changes user email
Given I'm on the profile page
Then I click on Edit on ".settings-page-email" input field
And I change "nonadmin@myorg.com" with "user@myorg.com" email
And I fill in "mypassword1234" in "#edit-email-current-password" field of ".settings-page-email" form
Then I click "Save" button
And I should see "user@myorg.com" in ".settings-page-email" input field
@javascript
Scenario: Unsuccessful Password Change, password is too short
Given I'm on the profile page
Then I click on Edit on ".settings-page-change-password" input field
And I fill in "mypassword1234" in "#edit-password-current-password" field of ".settings-page-change-password" form
And I fill in "mypass" in "#user_password" field of ".settings-page-change-password" form
And I fill in "mypass" in "#user_password_confirmation" field of ".settings-page-change-password" form
Then I click "Save" button
And I should see "is too short (minimum is 8 characters)"
@javascript
Scenario: Unsuccessful Password Change, passwords does not match
Given I'm on the profile page
Then I click on Edit on ".settings-page-change-password" input field
And I fill in "mypassword1234" in "#edit-password-current-password" field of ".settings-page-change-password" form
And I fill in "mypassword5678" in "#user_password" field of ".settings-page-change-password" form
And I fill in "mypassword56788" in "#user_password_confirmation" field of ".settings-page-change-password" form
Then I click "Save" button
And I should see "doesn't match"
@javascript
Scenario: Unsuccessful Password Change, current password is invalid
Given I'm on the profile page
Then I click on Edit on ".settings-page-change-password" input field
And I fill in "mypassword123" in "#edit-password-current-password" field of ".settings-page-change-password" form
And I fill in "mypassword5678" in "#user_password" field of ".settings-page-change-password" form
And I fill in "mypassword5678" in "#user_password_confirmation" field of ".settings-page-change-password" form
Then I click "Save" button
And I should see "is invalid"
@javascript
Scenario: Successful Password Change
Given I'm on the profile page
Then I click on Edit on ".settings-page-change-password" input field
And I fill in "mypassword1234" in "#edit-password-current-password" field of ".settings-page-change-password" form
And I fill in "mypassword5678" in "#user_password" field of ".settings-page-change-password" form
And I fill in "mypassword5678" in "#user_password_confirmation" field of ".settings-page-change-password" form
Then I click "Save" button
And I should see "Password successfully updated." flash message

View file

@ -0,0 +1,9 @@
Given(/^I'm on the Protocols page of a "([^"]*)" task$/) do |task_name|
task = MyModule.find_by_name(task_name)
visit protocols_my_module_path(task)
end
Then(/^I should see "([^"]*)" attachment on "([^"]*)" step$/) do |file, step_name|
wait_for_ajax
expect(find('.step', text: step_name)).to have_content(file)
end

View file

@ -0,0 +1,8 @@
Given(/^I'm on the Results page of a "([^"]*)" task$/) do |task_name|
task = MyModule.find_by_name(task_name)
visit results_my_module_path(task)
end
Given(/^I click edit "(.+)" result icon$/) do |result_name|
find('.panel-heading', text: result_name).find('.edit-result-asset').click
end

View file

@ -18,6 +18,10 @@ Given(/^I click "(.+)" link$/) do |link|
click_link link
end
Given(/^I click first "(.+)" link$/) do |link_text|
first(:link, link_text).click
end
Given(/^I click "(.+)" link within "(.+)"$/) do |link, element|
within(element) do
click_link link
@ -43,6 +47,12 @@ Given(/^the "([^"]*)" team exists$/) do |team_name|
FactoryBot.create(:team, name: team_name)
end
Given(/^Demo project exists for the "([^"]*)" team$/) do |team_name|
team = Team.find_by_name(team_name)
user = team.user_teams.where(role: :admin).take.user
seed_demo_data(user, team)
end
Given(/^I'm on the home page of "([^"]*)" team$/) do |team_name|
team = Team.find_by_name(team_name)
@current_user.update_attribute(:current_team_id, team.id)
@ -59,7 +69,7 @@ end
Then(/^I attach a "([^"]*)" file to "([^"]*)" field$/) do |file, field_id|
wait_for_ajax
attach_file(field_id, Rails.root.join('features', 'assets', file))
find(field_id).attach_file(Rails.root.join('features', 'assets', file))
# "expensive" operation needs some time :=)
sleep(0.5)
end
@ -97,6 +107,12 @@ Then(/^I fill in "([^"]*)" in "([^"]*)" input field$/) do |text, input_id|
page.find("#{input_id} input[type=\"text\"]").set(text)
end
Then(/^I fill in "([^"]*)" in "([^"]*)" rich text editor field$/) do |text, input_id|
within_frame(find(input_id + '_ifr')) do
find('#tinymce').set(text)
end
end
Then(/^I fill in "([^"]*)" in "([^"]*)" field$/) do |text, input_id|
page.find(input_id).set(text)
end
@ -114,6 +130,10 @@ Then(/^(?:|I )click on "([^"]*)" element$/) do |selector|
find(selector).click
end
Then(/^I attach file "([^"]*)" to the drag-n-drop field$/) do |file_name|
find('#drag-n-drop-assets', visible: false).send_keys(Rails.root.join('features', 'assets', file_name))
end
Then(/^I change "([^"]*)" with "([^"]*)" in "([^"]*)" input field$/) do |old_text, new_text, container_id|
wait_for_ajax
container = page.find_by_id(container_id)

View file

@ -8,6 +8,9 @@ require 'cucumber/rails'
require 'capybara'
require 'capybara/cucumber'
require 'capybara/email'
include FirstTimeDataGenerator
Capybara.default_max_wait_time = 30
# Capybara.asset_host = 'http://localhost:3001'
Capybara.server_port = 3000

View file

@ -16,4 +16,4 @@ def wait_for_ajax
Timeout.timeout(Capybara.default_max_wait_time) do
loop until page.evaluate_script('jQuery.active').zero?
end
end
end