From e58d3cf169a9f23fbca9cb81bb7a287d8607ca7c Mon Sep 17 00:00:00 2001
From: Oleksii Kriuchykhin <okriuchykhin@biosistemika.com>
Date: Tue, 3 Sep 2019 15:14:37 +0200
Subject: [PATCH] Implement Cucumber tests for direct upload [SCI-3771]

---
 config/environments/development.rb          |   6 +
 config/environments/test.rb                 |   5 -
 features/protocol_step.feature              | 187 +++++++++++
 features/protocol_step.feature.pending      | 167 ----------
 features/result.feature                     | 329 ++++++++++++++++++++
 features/result.feature.pending             | 297 ------------------
 features/settings_page/profile.feature      | 216 ++++++-------
 features/step_definitions/protocol_steps.rb |   9 +
 features/step_definitions/result_steps.rb   |   8 +
 features/step_definitions/shared_steps.rb   |  22 +-
 features/support/env.rb                     |   3 +
 features/support/wait.rb                    |   2 +-
 12 files changed, 672 insertions(+), 579 deletions(-)
 create mode 100644 features/protocol_step.feature
 delete mode 100644 features/protocol_step.feature.pending
 create mode 100644 features/result.feature
 delete mode 100644 features/result.feature.pending
 create mode 100644 features/step_definitions/protocol_steps.rb
 create mode 100644 features/step_definitions/result_steps.rb

diff --git a/config/environments/development.rb b/config/environments/development.rb
index daa7bdf8a..76d5f1fef 100644
--- a/config/environments/development.rb
+++ b/config/environments/development.rb
@@ -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.
diff --git a/config/environments/test.rb b/config/environments/test.rb
index a55824d4e..163000877 100644
--- a/config/environments/test.rb
+++ b/config/environments/test.rb
@@ -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
diff --git a/features/protocol_step.feature b/features/protocol_step.feature
new file mode 100644
index 000000000..ad419ebc1
--- /dev/null
+++ b/features/protocol_step.feature
@@ -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
diff --git a/features/protocol_step.feature.pending b/features/protocol_step.feature.pending
deleted file mode 100644
index af58d4e08..000000000
--- a/features/protocol_step.feature.pending
+++ /dev/null
@@ -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
diff --git a/features/result.feature b/features/result.feature
new file mode 100644
index 000000000..941362957
--- /dev/null
+++ b/features/result.feature
@@ -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
diff --git a/features/result.feature.pending b/features/result.feature.pending
deleted file mode 100644
index dfe0c9ae5..000000000
--- a/features/result.feature.pending
+++ /dev/null
@@ -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
diff --git a/features/settings_page/profile.feature b/features/settings_page/profile.feature
index d5fe1e975..bd357ac1f 100644
--- a/features/settings_page/profile.feature
+++ b/features/settings_page/profile.feature
@@ -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
diff --git a/features/step_definitions/protocol_steps.rb b/features/step_definitions/protocol_steps.rb
new file mode 100644
index 000000000..a8aab5584
--- /dev/null
+++ b/features/step_definitions/protocol_steps.rb
@@ -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
diff --git a/features/step_definitions/result_steps.rb b/features/step_definitions/result_steps.rb
new file mode 100644
index 000000000..b829d3e27
--- /dev/null
+++ b/features/step_definitions/result_steps.rb
@@ -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
diff --git a/features/step_definitions/shared_steps.rb b/features/step_definitions/shared_steps.rb
index a52119521..4c500532a 100644
--- a/features/step_definitions/shared_steps.rb
+++ b/features/step_definitions/shared_steps.rb
@@ -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)
diff --git a/features/support/env.rb b/features/support/env.rb
index f16274539..cc28ab162 100644
--- a/features/support/env.rb
+++ b/features/support/env.rb
@@ -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
diff --git a/features/support/wait.rb b/features/support/wait.rb
index 4a23a498d..0fb73d2e2 100644
--- a/features/support/wait.rb
+++ b/features/support/wait.rb
@@ -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