mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-09-20 06:35:56 +08:00
Fix cucumber tests
This commit is contained in:
parent
8eac88697a
commit
b11f166c38
|
@ -31,9 +31,6 @@ Style/BarePercentLiterals:
|
|||
Style/BlockDelimiters:
|
||||
EnforcedStyle: line_count_based
|
||||
|
||||
Style/BracesAroundHashParameters:
|
||||
EnforcedStyle: no_braces
|
||||
|
||||
Layout/CaseIndentation:
|
||||
EnforcedStyle: case
|
||||
|
||||
|
|
|
@ -31,7 +31,6 @@ module Api
|
|||
|
||||
update_file_result if result_file_params.present? && @result.is_asset
|
||||
update_text_result if result_text_params.present? && @result.is_text
|
||||
|
||||
if (@result.changed? && @result.save!) || @asset_result_updated
|
||||
render jsonapi: @result,
|
||||
serializer: ResultSerializer,
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal"><%=t "general.cancel" %></button>
|
||||
<%= f.submit t("projects.index.modal_new_project.create"), class: "btn btn-primary" %>
|
||||
<%= f.button t("projects.index.modal_new_project.create"), class: "btn btn-primary" %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
<button type="button" class="btn btn-secondary cancel-new">
|
||||
<%= t("general.cancel")%>
|
||||
</button>
|
||||
<%= f.buttongst t("result_texts.new.create"),
|
||||
<%= f.button t("result_texts.new.create"),
|
||||
class: 'btn btn-primary save-result',
|
||||
onclick: "Results.processResult(event, Results.ResultTypeEnum.TEXT);" %>
|
||||
</div>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<button type="button" data-action="cancel-new" class="btn btn-secondary">
|
||||
<%= t("general.cancel")%>
|
||||
</button>
|
||||
<%= f.submit t("protocols.steps.new.add_step"), class: 'btn btn-primary step-save', onclick: "processStep(event, false);" %>
|
||||
<%= f.button t("protocols.steps.new.add_step"), class: 'btn btn-primary step-save', onclick: "processStep(event, false);" %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<%= f.submit t("devise.passwords.edit.submit"), class: "btn btn-primary" %>
|
||||
<%= f.button t("devise.passwords.edit.submit"), class: "btn btn-primary" %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
|
|
|
@ -14,12 +14,12 @@
|
|||
<% end %>
|
||||
|
||||
<div class="form-group sci-input-container">
|
||||
<%= f.label :email %><br /actions>
|
||||
<%= f.label :email %><br />
|
||||
<%= f.email_field :email, autofocus: true, class: "form-control sci-input-field" %>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<%= f.submit t("devise.passwords.new.submit"), class: "btn btn-primary" %>
|
||||
<%= f.button t("devise.passwords.new.submit"), class: "btn btn-primary" %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
|
|
|
@ -94,7 +94,7 @@
|
|||
</div>
|
||||
<div class="align-right">
|
||||
<a href="#" class="btn btn-default" data-action="cancel"><%=t "general.cancel" %></a>
|
||||
<%= f.submit t("general.save"), class: "btn btn-success" %>
|
||||
<%= f.button t("general.save"), class: "btn btn-success" %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -137,7 +137,7 @@
|
|||
|
||||
<div class="align-right">
|
||||
<a href="#" class="btn btn-default" data-action="cancel"><%=t "general.cancel" %></a>
|
||||
<%= f.submit t("general.save"), class: "btn btn-success" %>
|
||||
<%= f.button t("general.save"), class: "btn btn-success" %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
<%= recaptcha_input_tag %>
|
||||
|
||||
<div class="form-group" data-hook="sign-up-form-submit">
|
||||
<%= f.submit 'Sign up', class: 'btn btn-primary sign-up-button' %>
|
||||
<%= f.button 'Sign up', class: 'btn btn-primary sign-up-button' %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
|
|
@ -36,11 +36,11 @@
|
|||
<%= hidden_field_tag(:simple_sign_in, @simple_sign_in) %>
|
||||
|
||||
<div class="actions" style="margin-top: 10px; margin-bottom: 10px;">
|
||||
<%= f.submit t("devise.sessions.new.submit"), class: "btn btn-primary log-in-button" %>
|
||||
<%= f.button t("devise.sessions.new.submit"), class: "btn btn-primary log-in-button" %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<%= render partial: "users/shared/links", locals: {linkedin_skip: true} unless @simple_sign_in %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,265 +1,255 @@
|
|||
# feature/home page. feature
|
||||
Feature: Home page
|
||||
As a creator of team
|
||||
want to create a project
|
||||
want to edit, archive project
|
||||
want to add user, comment to a project
|
||||
want to create a project
|
||||
want to edit, archive project
|
||||
want to add user, comment to a project
|
||||
|
||||
Background:
|
||||
Given default screen size
|
||||
Given the "BioSistemika Process" team exists
|
||||
Given the "BioSistemika Path" team exists
|
||||
Given the following users are registered
|
||||
| name | email | password | password_confirmation |
|
||||
|Karli Novak | nonadmin@myorg.com | mypassword1234 | mypassword1234 |
|
||||
|Marjeta Novak | nonadmin2@myorg.com| mypassword1234 | mypassword1234 |
|
||||
And "nonadmin@myorg.com" is in "BioSistemika Process" team as a "admin"
|
||||
And "nonadmin2@myorg.com" is in "BioSistemika Process" team as a "normal_user"
|
||||
And "nonadmin@myorg.com" is in "BioSistemika Path" team as a "normal_user"
|
||||
And "nonadmin@myorg.com" is signed in with "mypassword1234"
|
||||
Background:
|
||||
Given default screen size
|
||||
Given the "BioSistemika Process" team exists
|
||||
Given the "BioSistemika Path" team exists
|
||||
Given the following users are registered
|
||||
| name | email | password | password_confirmation |
|
||||
| Karli Novak | nonadmin@myorg.com | mypassword1234 | mypassword1234 |
|
||||
| Marjeta Novak | nonadmin2@myorg.com | mypassword1234 | mypassword1234 |
|
||||
And "nonadmin@myorg.com" is in "BioSistemika Process" team as a "admin"
|
||||
And "nonadmin2@myorg.com" is in "BioSistemika Process" team as a "normal_user"
|
||||
And "nonadmin@myorg.com" is in "BioSistemika Path" team as a "normal_user"
|
||||
And "nonadmin@myorg.com" is signed in with "mypassword1234"
|
||||
|
||||
@javascript
|
||||
Scenario: Successful create new project
|
||||
Given I am on the home page of Biosistemika Process team
|
||||
And I click "New Project" button
|
||||
And I fill in "Mangart" in "#project_name" field
|
||||
And I click "All team members" button
|
||||
And I make screenshot
|
||||
And I click element with css "html body.modal-open div#content-wrapper div#wrapper.container-fluid div#fluid-content.container-fluid div#new-project-modal.modal.in form#new_project.new_project div.modal-dialog div.modal-content div.modal-footer input.btn.btn-primary"
|
||||
Then I should see "Project Mangart successfully created." flash message
|
||||
Then I should see "Mangart"
|
||||
@javascript
|
||||
Scenario: Successful create new project
|
||||
Given I am on the home page of Biosistemika Process team
|
||||
And I click "New Project" button
|
||||
And I fill in "Mangart" in "#project_name" field
|
||||
And I click "All team members" button
|
||||
And I click "Create" button
|
||||
Then I should see "Project Mangart successfully created." flash message
|
||||
Then I should see "Mangart"
|
||||
|
||||
@javascript
|
||||
Scenario: Unsuccessful create new project1
|
||||
Given I am on the home page of Biosistemika Process team
|
||||
And I click "New Project" button
|
||||
And I click element with css "html body.modal-open div#content-wrapper div#wrapper.container-fluid div#fluid-content.container-fluid div#new-project-modal.modal.in form#new_project.new_project div.modal-dialog div.modal-content div.modal-footer input.btn.btn-primary"
|
||||
Then I should see "is too short (minimum is 2 characters)"
|
||||
And I click "Cancel" button
|
||||
@javascript
|
||||
Scenario: Unsuccessful create new project1
|
||||
Given I am on the home page of Biosistemika Process team
|
||||
And I click "New Project" button
|
||||
And I click "Create" button
|
||||
Then I should see "is too short (minimum is 2 characters)"
|
||||
And I click "Cancel" button
|
||||
|
||||
@javascript
|
||||
Scenario: Unsuccessful create new project2
|
||||
Given I am on the home page of Biosistemika Process team
|
||||
And I click "New Project" button
|
||||
And I fill in "Mangart" in "#project_name" field
|
||||
And I click element with css "html body.modal-open div#content-wrapper div#wrapper.container-fluid div#fluid-content.container-fluid div#new-project-modal.modal.in form#new_project.new_project div.modal-dialog div.modal-content div.modal-footer input.btn.btn-primary"
|
||||
And I click "New Project" button
|
||||
And I fill in "Mangart" in "#project_name" field
|
||||
And I click element with css "html body.modal-open div#content-wrapper div#wrapper.container-fluid div#fluid-content.container-fluid div#new-project-modal.modal.in form#new_project.new_project div.modal-dialog div.modal-content div.modal-footer input.btn.btn-primary"
|
||||
Then I should see "This project name has to be unique inside a team (this includes the archive)"
|
||||
@javascript
|
||||
Scenario: Unsuccessful create new project2
|
||||
Given I am on the home page of Biosistemika Process team
|
||||
And I click "New Project" button
|
||||
And I fill in "Mangart" in "#project_name" field
|
||||
And I click "Create" button
|
||||
And I click "New Project" button
|
||||
And I fill in "Mangart" in "#project_name" field
|
||||
And I click "Create" button
|
||||
Then I should see "This project name has to be unique inside a team (this includes the archive)"
|
||||
|
||||
@javascript
|
||||
Scenario: Successful edit project
|
||||
Given I am on the home page of Biosistemika Process team
|
||||
And I click "New Project" button
|
||||
And I fill in "Mangart" in "#project_name" field
|
||||
And I click element with css "html body.modal-open div#content-wrapper div#wrapper.container-fluid div#fluid-content.container-fluid div#new-project-modal.modal.in form#new_project.new_project div.modal-dialog div.modal-content div.modal-footer input.btn.btn-primary"
|
||||
And I click to down arrow of a "Mangart" project card
|
||||
And I click to "Edit" of a Options modal window
|
||||
And I fill in "Golica" in "#project_name" field
|
||||
And I click "Project members only" button
|
||||
And I click "Save" button
|
||||
Then I should see "Golica"
|
||||
@javascript
|
||||
Scenario: Successful edit project
|
||||
Given I am on the home page of Biosistemika Process team
|
||||
And I click "New Project" button
|
||||
And I fill in "Mangart" in "#project_name" field
|
||||
And I click "Create" button
|
||||
And I click to down arrow of a "Mangart" project card
|
||||
And I click to "Edit" of a Options modal window
|
||||
And I fill in "Golica" in "#project_name" field
|
||||
And I click "Project members only" button
|
||||
And I click "Save" button
|
||||
Then I should see "Golica"
|
||||
|
||||
@javascript
|
||||
Scenario: Successful add user to a project
|
||||
Given I am on the home page of Biosistemika Process team
|
||||
And I click "New Project" button
|
||||
And I fill in "Mangart" in "#project_name" field
|
||||
And I click element with css "html body.modal-open div#content-wrapper div#wrapper.container-fluid div#fluid-content.container-fluid div#new-project-modal.modal.in form#new_project.new_project div.modal-dialog div.modal-content div.modal-footer input.btn.btn-primary"
|
||||
And I click element with css ".fa-users"
|
||||
And I click element with css ".manage-users-link"
|
||||
And I click element with css ".add-user-form"
|
||||
And I click on "User" within dropdown menu
|
||||
And I click "Add" button
|
||||
And WAIT
|
||||
Then I should see "Marjeta Novak"
|
||||
@javascript
|
||||
Scenario: Successful add user to a project
|
||||
Given I am on the home page of Biosistemika Process team
|
||||
And I click "New Project" button
|
||||
And I fill in "Mangart" in "#project_name" field
|
||||
And I click "Create" button
|
||||
And I click "fa-users" icon
|
||||
And I click "Manage users" link
|
||||
And I click "Select Role" button
|
||||
And I click on "User" within dropdown menu
|
||||
And I click "Add" button
|
||||
And WAIT
|
||||
Then I should see "Marjeta Novak"
|
||||
|
||||
@javascript
|
||||
@javascript
|
||||
Scenario: Successful change user role to a project
|
||||
Given I am on the home page of Biosistemika Process team
|
||||
And I click "New Project" button
|
||||
And I fill in "Mangart" in "#project_name" field
|
||||
And I click element with css "html body.modal-open div#content-wrapper div#wrapper.container-fluid div#fluid-content.container-fluid div#new-project-modal.modal.in form#new_project.new_project div.modal-dialog div.modal-content div.modal-footer input.btn.btn-primary"
|
||||
And I click element with css ".fa-users"
|
||||
And I click element with css ".manage-users-link"
|
||||
And I click element with css ".add-user-form"
|
||||
And I click on "User" within dropdown menu
|
||||
And I click "Add" button
|
||||
And I click "Change Role" button
|
||||
And I click on "Viewer" within dropdown menu
|
||||
And WAIT
|
||||
Then I should see "Viewer"
|
||||
Given I am on the home page of Biosistemika Process team
|
||||
And I click "New Project" button
|
||||
And I fill in "Mangart" in "#project_name" field
|
||||
And I click "Create" button
|
||||
And I click "fa-users" icon
|
||||
And I click "Manage users" link
|
||||
And I click "Select Role" button
|
||||
And I click on "User" within dropdown menu
|
||||
And I click "Add" button
|
||||
And I click "Change Role" button
|
||||
And I click on "Viewer" within dropdown menu
|
||||
And WAIT
|
||||
Then I should see "Viewer"
|
||||
|
||||
@javascript
|
||||
@javascript
|
||||
Scenario: Successful add new SciNote user to a project
|
||||
Given I am on the home page of Biosistemika Process team
|
||||
And I click "New Project" button
|
||||
And I fill in "Mangart" in "#project_name" field
|
||||
And I click element with css "html body.modal-open div#content-wrapper div#wrapper.container-fluid div#fluid-content.container-fluid div#new-project-modal.modal.in form#new_project.new_project div.modal-dialog div.modal-content div.modal-footer input.btn.btn-primary"
|
||||
And I click element with css ".fa-users"
|
||||
And I click element with css ".manage-users-link"
|
||||
And I click element with css "#project-actions-modal > div:nth-child(1) > div:nth-child(1) > div:nth-child(3) > span:nth-child(1) > a:nth-child(1)"
|
||||
And I click "Add team members" button
|
||||
And I click element with css ".bootstrap-tagsinput"
|
||||
And I fill in "random@org.com" in ".bootstrap-tagsinput > input:nth-child(1)" field
|
||||
And confirm with ENTER key to ".bootstrap-tagsinput > input:nth-child(1)"
|
||||
And I click "Invite Users" button
|
||||
And I click element with css "div.btn-group:nth-child(3) > ul:nth-child(2) > li:nth-child(2) > a:nth-child(1)"
|
||||
And WAIT
|
||||
Then I should see "User successfully invited to SciNote"
|
||||
Given I am on the home page of Biosistemika Process team
|
||||
And I click "New Project" button
|
||||
And I fill in "Mangart" in "#project_name" field
|
||||
And I click "Create" button
|
||||
And I click "fa-users" icon
|
||||
And I click "Manage users" link
|
||||
And I click "Invite users" link
|
||||
And I click "Add team members" button
|
||||
And I fill bootsrap tags input with "random@org.com"
|
||||
And confirm with ENTER key to ".bootstrap-tagsinput > input"
|
||||
And I click "Invite Users" button
|
||||
And I click "As Normal Users" link
|
||||
And WAIT
|
||||
Then I should see "User successfully invited to SciNote"
|
||||
|
||||
@javascript
|
||||
Scenario: Unsuccessful adding user to a project
|
||||
Given I am on the home page of Biosistemika Process team
|
||||
And I click "New Project" button
|
||||
And I fill in "Mangart" in "#project_name" field
|
||||
And I click element with css "html body.modal-open div#content-wrapper div#wrapper.container-fluid div#fluid-content.container-fluid div#new-project-modal.modal.in form#new_project.new_project div.modal-dialog div.modal-content div.modal-footer input.btn.btn-primary"
|
||||
And I click element with css ".fa-users"
|
||||
And I click element with css ".manage-users-link"
|
||||
And I click element with css "#project-actions-modal > div:nth-child(1) > div:nth-child(1) > div:nth-child(3) > span:nth-child(1) > a:nth-child(1)"
|
||||
And I click "Add team members" button
|
||||
And I click element with css ".bootstrap-tagsinput"
|
||||
And I fill in "random" in ".bootstrap-tagsinput > input:nth-child(1)" field
|
||||
And confirm with ENTER key to ".bootstrap-tagsinput > input:nth-child(1)"
|
||||
And I click "Invite Users" button
|
||||
And I click element with css "div.btn-group:nth-child(3) > ul:nth-child(2) > li:nth-child(2) > a:nth-child(1)"
|
||||
And WAIT
|
||||
Then I should see "Invalid email."
|
||||
@javascript
|
||||
Scenario: Unsuccessful adding user to a project
|
||||
Given I am on the home page of Biosistemika Process team
|
||||
And I click "New Project" button
|
||||
And I fill in "Mangart" in "#project_name" field
|
||||
And I click "Create" button
|
||||
And I click "fa-users" icon
|
||||
And I click "Manage users" link
|
||||
And I click "Invite users" link
|
||||
And I click "Add team members" button
|
||||
And I fill bootsrap tags input with "random"
|
||||
And confirm with ENTER key to ".bootstrap-tagsinput > input"
|
||||
And I click "Invite Users" button
|
||||
And I click "As Normal Users" link
|
||||
And WAIT
|
||||
Then I should see "Invalid email."
|
||||
|
||||
@javascript
|
||||
Scenario: Removing user from a project
|
||||
Given I am on the home page of Biosistemika Process team
|
||||
And I click "New Project" button
|
||||
And I fill in "Mangart" in "#project_name" field
|
||||
And I click element with css "html body.modal-open div#content-wrapper div#wrapper.container-fluid div#fluid-content.container-fluid div#new-project-modal.modal.in form#new_project.new_project div.modal-dialog div.modal-content div.modal-footer input.btn.btn-primary"
|
||||
And I click element with css ".fa-users"
|
||||
And I click element with css ".manage-users-link"
|
||||
And I click element with css "#project-actions-modal > div:nth-child(1) > div:nth-child(1) > div:nth-child(3) > span:nth-child(1) > a:nth-child(1)"
|
||||
And I make screenshot
|
||||
And I click element with css ".dropdown-teams-user"
|
||||
And I click element with css ".open > ul:nth-child(2) > li:nth-child(7) > a:nth-child(1)"
|
||||
And I click "Remove" button
|
||||
And I make screenshot
|
||||
@wip
|
||||
Scenario: Removing user from a project
|
||||
Given I am on the home page of Biosistemika Process team
|
||||
And I click "New Project" button
|
||||
And I fill in "Mangart" in "#project_name" field
|
||||
And I click element with css "html body.modal-open div#content-wrapper div#wrapper.container-fluid div#fluid-content.container-fluid div#new-project-modal.modal.in form#new_project.new_project div.modal-dialog div.modal-content div.modal-footer input.btn.btn-primary"
|
||||
And I click element with css ".fa-users"
|
||||
And I click element with css ".manage-users-link"
|
||||
And I click element with css "#project-actions-modal > div:nth-child(1) > div:nth-child(1) > div:nth-child(3) > span:nth-child(1) > a:nth-child(1)"
|
||||
And I click element with css ".dropdown-teams-user"
|
||||
And I click element with css ".open > ul:nth-child(2) > li:nth-child(7) > a:nth-child(1)"
|
||||
And I click "Remove" button
|
||||
|
||||
@javascript
|
||||
Scenario: Successful add comment to a project
|
||||
Given I am on the home page of Biosistemika Process team
|
||||
And I click "New Project" button
|
||||
And I fill in "Mangart" in "#project_name" field
|
||||
And I click element with css "html body.modal-open div#content-wrapper div#wrapper.container-fluid div#fluid-content.container-fluid div#new-project-modal.modal.in form#new_project.new_project div.modal-dialog div.modal-content div.modal-footer input.btn.btn-primary"
|
||||
And I click element with css ".fa-comment"
|
||||
And I fill in "I was on Triglav one summer." in ".smart-text-area" field
|
||||
And I make screenshot
|
||||
And I click element with css ".new-comment-button"
|
||||
Then I should see "I was on Triglav one summer."
|
||||
@javascript
|
||||
Scenario: Successful add comment to a project
|
||||
Given I am on the home page of Biosistemika Process team
|
||||
And I click "New Project" button
|
||||
And I fill in "Mangart" in "#project_name" field
|
||||
And I click "Create" button
|
||||
And I click "fa-comment" icon
|
||||
And I fill in "I was on Triglav one summer." in ".smart-text-area" field
|
||||
And I click "fa-paper-plane" icon
|
||||
Then I should see "I was on Triglav one summer."
|
||||
|
||||
@wip
|
||||
Scenario: Unsuccessful add comment to a project BUG!!!
|
||||
Given I'm on the home page of "Biosistemika Process" team
|
||||
And I click on Comments of a "Golica" project card
|
||||
And I click on "paper plane" sign
|
||||
Then I should see "Message can't be blank" error message
|
||||
@wip
|
||||
Scenario: Unsuccessful add comment to a project BUG!!!
|
||||
Given I'm on the home page of "Biosistemika Process" team
|
||||
And I click on Comments of a "Golica" project card
|
||||
And I click on "paper plane" sign
|
||||
Then I should see "Message can't be blank" error message
|
||||
|
||||
@wip
|
||||
Scenario: Successful edit comment to a project CANNOT DIFERENTIATE BETWEEN THE NEW AND OLD TEXTAREA
|
||||
Given I am on the home page of Biosistemika Process team
|
||||
And I click "New Project" button
|
||||
And I fill in "Mangart" in "#project_name" field
|
||||
And I click element with css "html body.modal-open div#content-wrapper div#wrapper.container-fluid div#fluid-content.container-fluid div#new-project-modal.modal.in form#new_project.new_project div.modal-dialog div.modal-content div.modal-footer input.btn.btn-primary"
|
||||
And I click element with css ".fa-comment"
|
||||
And I fill in "I was on Triglav one summer." in ".smart-text-area" field
|
||||
And I make screenshot
|
||||
And I click element with css ".new-comment-button"
|
||||
And I hover over comment
|
||||
And I click element with css ".edit-button"
|
||||
And I change "I was on Triglav one summer." with "Sladoled se lahko je vsak dan" in "message" textarea field
|
||||
And I click element with css ".save-button"
|
||||
Then I should see "Sladoled se lahko je vsak dan"
|
||||
@wip
|
||||
Scenario: Successful edit comment to a project CANNOT DIFERENTIATE BETWEEN THE NEW AND OLD TEXTAREA
|
||||
Given I am on the home page of Biosistemika Process team
|
||||
And I click "New Project" button
|
||||
And I fill in "Mangart" in "#project_name" field
|
||||
And I click element with css "html body.modal-open div#content-wrapper div#wrapper.container-fluid div#fluid-content.container-fluid div#new-project-modal.modal.in form#new_project.new_project div.modal-dialog div.modal-content div.modal-footer input.btn.btn-primary"
|
||||
And I click element with css ".fa-comment"
|
||||
And I fill in "I was on Triglav one summer." in ".smart-text-area" field
|
||||
And I click "fa-paper-plane" icon
|
||||
And I hover over comment
|
||||
And I click element with css ".edit-button"
|
||||
And I change "I was on Triglav one summer." with "Sladoled se lahko je vsak dan" in "message" textarea field
|
||||
And I click element with css ".save-button"
|
||||
Then I should see "Sladoled se lahko je vsak dan"
|
||||
|
||||
@javascript
|
||||
Scenario: Unsuccessful edit comment to a project
|
||||
Given I am on the home page of Biosistemika Process team
|
||||
And I click "New Project" button
|
||||
And I fill in "Mangart" in "#project_name" field
|
||||
And I click element with css "html body.modal-open div#content-wrapper div#wrapper.container-fluid div#fluid-content.container-fluid div#new-project-modal.modal.in form#new_project.new_project div.modal-dialog div.modal-content div.modal-footer input.btn.btn-primary"
|
||||
And I click element with css ".fa-comment"
|
||||
And I fill in "I was on Triglav one summer." in ".smart-text-area" field
|
||||
And I make screenshot
|
||||
And I click element with css ".new-comment-button"
|
||||
And I hover over comment
|
||||
And I click element with css ".edit-button"
|
||||
And I click element with css ".cancel-button"
|
||||
Then I should see "I was on Triglav one summer."
|
||||
@javascript
|
||||
Scenario: Unsuccessful edit comment to a project
|
||||
Given I am on the home page of Biosistemika Process team
|
||||
And I click "New Project" button
|
||||
And I fill in "Mangart" in "#project_name" field
|
||||
And I click "Create" button
|
||||
And I click "fa-comment" icon
|
||||
And I fill in "I was on Triglav one summer." in ".smart-text-area" field
|
||||
And I click "fa-paper-plane" icon
|
||||
And I hover over comment
|
||||
And I click "fa-pen" icon
|
||||
And I click "fa-times" icon
|
||||
Then I should see "I was on Triglav one summer."
|
||||
|
||||
@javascript
|
||||
Scenario: Unsuccessful delete comment to a project
|
||||
Given I am on the home page of Biosistemika Process team
|
||||
And I click "New Project" button
|
||||
And I fill in "Mangart" in "#project_name" field
|
||||
And I click element with css "html body.modal-open div#content-wrapper div#wrapper.container-fluid div#fluid-content.container-fluid div#new-project-modal.modal.in form#new_project.new_project div.modal-dialog div.modal-content div.modal-footer input.btn.btn-primary"
|
||||
And I click element with css ".fa-comment"
|
||||
And I fill in "I was on Triglav one summer." in ".smart-text-area" field
|
||||
And I make screenshot
|
||||
And I click element with css ".new-comment-button"
|
||||
And I hover over comment
|
||||
And I click element with css ".fa-trash"
|
||||
And I click to Cancel on confirm dialog
|
||||
Then I should see "I was on Triglav one summer."
|
||||
@javascript
|
||||
Scenario: Unsuccessful delete comment to a project
|
||||
Given I am on the home page of Biosistemika Process team
|
||||
And I click "New Project" button
|
||||
And I fill in "Mangart" in "#project_name" field
|
||||
And I click "Create" button
|
||||
And I click "fa-comment" icon
|
||||
And I fill in "I was on Triglav one summer." in ".smart-text-area" field
|
||||
And I click "fa-paper-plane" icon
|
||||
And I hover over comment
|
||||
And I click "fa-trash" icon
|
||||
And I click to Cancel on confirm dialog
|
||||
Then I should see "I was on Triglav one summer."
|
||||
|
||||
@javascript
|
||||
Scenario: Successful delete comment to a project
|
||||
Given I am on the home page of Biosistemika Process team
|
||||
And I click "New Project" button
|
||||
And I fill in "Mangart" in "#project_name" field
|
||||
And I click element with css "html body.modal-open div#content-wrapper div#wrapper.container-fluid div#fluid-content.container-fluid div#new-project-modal.modal.in form#new_project.new_project div.modal-dialog div.modal-content div.modal-footer input.btn.btn-primary"
|
||||
And I click element with css ".fa-comment"
|
||||
And I fill in "I was on Triglav one summer." in ".smart-text-area" field
|
||||
And I make screenshot
|
||||
And I click element with css ".new-comment-button"
|
||||
And I hover over comment
|
||||
And I click element with css ".fa-trash"
|
||||
And I click to OK on confirm dialog
|
||||
Then I should not see "I was on Triglav one summer."
|
||||
@javascript
|
||||
Scenario: Successful delete comment to a project
|
||||
Given I am on the home page of Biosistemika Process team
|
||||
And I click "New Project" button
|
||||
And I fill in "Mangart" in "#project_name" field
|
||||
And I click "Create" button
|
||||
And I click "fa-comment" icon
|
||||
And I fill in "I was on Triglav one summer." in ".smart-text-area" field
|
||||
And I click "fa-paper-plane" icon
|
||||
And I hover over comment
|
||||
And I click "fa-trash" icon
|
||||
And I click to OK on confirm dialog
|
||||
Then I should not see "I was on Triglav one summer."
|
||||
|
||||
@javascript
|
||||
Scenario: Unsuccessful archived project
|
||||
Given I am on the home page of Biosistemika Process team
|
||||
And I click "New Project" button
|
||||
And I fill in "Mangart" in "#project_name" field
|
||||
And I click element with css "html body.modal-open div#content-wrapper div#wrapper.container-fluid div#fluid-content.container-fluid div#new-project-modal.modal.in form#new_project.new_project div.modal-dialog div.modal-content div.modal-footer input.btn.btn-primary"
|
||||
And I hover over element with css ".panel-heading"
|
||||
And I click button with id "dropdownMenu1"
|
||||
And I click "Archive" link within dropdown menu
|
||||
And I click to Cancel on confirm dialog
|
||||
Then I should see "Mangart"
|
||||
@javascript
|
||||
Scenario: Unsuccessful archived project
|
||||
Given I am on the home page of Biosistemika Process team
|
||||
And I click "New Project" button
|
||||
And I fill in "Mangart" in "#project_name" field
|
||||
And I click "Create" button
|
||||
And I hover over element with css ".panel-heading"
|
||||
And I click button with id "dropdownMenu1"
|
||||
And I click "Archive" link within dropdown menu
|
||||
And I click to Cancel on confirm dialog
|
||||
Then I should see "Mangart"
|
||||
|
||||
@javascript
|
||||
Scenario: Successful archived project
|
||||
Given I am on the home page of Biosistemika Process team
|
||||
And I click "New Project" button
|
||||
And I fill in "Mangart" in "#project_name" field
|
||||
And I click element with css "html body.modal-open div#content-wrapper div#wrapper.container-fluid div#fluid-content.container-fluid div#new-project-modal.modal.in form#new_project.new_project div.modal-dialog div.modal-content div.modal-footer input.btn.btn-primary"
|
||||
And I hover over element with css ".panel-heading"
|
||||
And I click button with id "dropdownMenu1"
|
||||
And I click "Archive" link within dropdown menu
|
||||
And I click to OK on confirm dialog
|
||||
Then I should not see "Mangart"
|
||||
@javascript
|
||||
Scenario: Successful archived project
|
||||
Given I am on the home page of Biosistemika Process team
|
||||
And I click "New Project" button
|
||||
And I fill in "Mangart" in "#project_name" field
|
||||
And I click "Create" button
|
||||
And I hover over element with css ".panel-heading"
|
||||
And I click button with id "dropdownMenu1"
|
||||
And I click "Archive" link within dropdown menu
|
||||
And I click to OK on confirm dialog
|
||||
Then I should not see "Mangart"
|
||||
|
||||
@javascript
|
||||
Scenario: Restore archived project
|
||||
Given I am on the home page of Biosistemika Process team
|
||||
And I click "New Project" button
|
||||
And I fill in "Mangart" in "#project_name" field
|
||||
And I click element with css "html body.modal-open div#content-wrapper div#wrapper.container-fluid div#fluid-content.container-fluid div#new-project-modal.modal.in form#new_project.new_project div.modal-dialog div.modal-content div.modal-footer input.btn.btn-primary"
|
||||
And I hover over element with css ".panel-heading"
|
||||
And I click button with id "dropdownMenu1"
|
||||
And I click "Archive" link within dropdown menu
|
||||
And I click to OK on confirm dialog
|
||||
And I click element with css "#projects-archive-nav-tab"
|
||||
And I hover over element with css ".panel-title"
|
||||
And I click button with id "dropdownMenu1"
|
||||
And I click "Restore" link within dropdown menu
|
||||
And I am on the home page of Biosistemika Process team
|
||||
Then I should see "Mangart"
|
||||
@javascript
|
||||
Scenario: Restore archived project
|
||||
Given I am on the home page of Biosistemika Process team
|
||||
And I click "New Project" button
|
||||
And I fill in "Mangart" in "#project_name" field
|
||||
And I click "Create" button
|
||||
And I hover over element with css ".panel-heading"
|
||||
And I click button with id "dropdownMenu1"
|
||||
And I click "Archive" link within dropdown menu
|
||||
And I click to OK on confirm dialog
|
||||
And I click "Archived" link
|
||||
And I hover over element with css ".panel-title"
|
||||
And I click button with id "dropdownMenu1"
|
||||
And I click "Restore" link within dropdown menu
|
||||
And I am on the home page of Biosistemika Process team
|
||||
Then I should see "Mangart"
|
||||
|
||||
|
|
|
@ -1,108 +1,102 @@
|
|||
|
||||
Feature: Invite people to SciNote
|
||||
As an owner of a team
|
||||
Want to add new User to my team throughout the SciNote
|
||||
|
||||
Background:
|
||||
Given default screen size
|
||||
Given the following users are registered:
|
||||
|name | email | password | team | role |
|
||||
|Karli Novak | nonadmin@myorg.com | asdf1243 | BioSistemika Process | admin|
|
||||
|Marija Novak | marija@myorg.com | asdf1243 | Cell | admin|
|
||||
Background:
|
||||
Given default screen size
|
||||
Given the following users are registered:
|
||||
| name | email | password | team | role |
|
||||
| Karli Novak | nonadmin@myorg.com | asdf1243 | BioSistemika Process | admin |
|
||||
| Marija Novak | marija@myorg.com | asdf1243 | Cell | admin |
|
||||
#And "nonadmin@myorg.com" is signed in with "asdf1243" - Cannot be used here if you want to access "Sign up" page
|
||||
|
||||
@javascript
|
||||
Scenario: Successful Add team member1
|
||||
Given "nonadmin@myorg.com" is signed in with "asdf1243"
|
||||
And Settings page of BioSistemika Process team of a Karli Novak user
|
||||
And I click "Add team members" button
|
||||
And I fill in "lojze@myorg.com" to Invite users to team BioSistemika Process input field
|
||||
And confirm with ENTER key to ".bootstrap-tagsinput>input"
|
||||
And I click "Invite Users" button
|
||||
And I click on "As Normal Users" in Invite dropdown
|
||||
Then I should see "lojze@myorg.com - User successfully invited to SciNote and team BioSistemika Process as Normal user." massage of "Invitation results:" modal window
|
||||
And I click "Close" button
|
||||
And I should see "pending"
|
||||
And I should see "lojze@myorg.com"
|
||||
@javascript
|
||||
Scenario: Successful Add team member1
|
||||
Given "nonadmin@myorg.com" is signed in with "asdf1243"
|
||||
And Settings page of BioSistemika Process team of a Karli Novak user
|
||||
And I click "Add team members" button
|
||||
And I fill bootsrap tags input with "lojze@myorg.com"
|
||||
And confirm with ENTER key to ".bootstrap-tagsinput>input"
|
||||
And I click "Invite Users" button
|
||||
And I click "As Normal Users" link
|
||||
Then I should see "lojze@myorg.com - User successfully invited to SciNote and team BioSistemika Process as Normal user." massage of "Invitation results:" modal window
|
||||
And I click "Close" button
|
||||
And I should see "pending"
|
||||
And I should see "lojze@myorg.com"
|
||||
|
||||
@javascript
|
||||
Scenario: Successful Add team member2
|
||||
Given "nonadmin@myorg.com" is signed in with "asdf1243"
|
||||
And Settings page of BioSistemika Process team of a Karli Novak user
|
||||
And I click "Add team members" button
|
||||
And I fill in "marija@myorg.com" to Invite users to team BioSistemika Process input field
|
||||
And confirm with ENTER key to ".bootstrap-tagsinput>input"
|
||||
And I click "Invite Users" button
|
||||
And I click on "As Normal Users" in Invite dropdown
|
||||
Then I should see "marija@myorg.com - User was already a member of SciNote - successfully invited to team BioSistemika Process as Normal user." massage of "Invitation results:" modal window
|
||||
And I click "Close" button
|
||||
And I should see "active"
|
||||
And I should see "marija@myorg.com"
|
||||
@javascript
|
||||
Scenario: Successful Add team member2
|
||||
Given "nonadmin@myorg.com" is signed in with "asdf1243"
|
||||
And Settings page of BioSistemika Process team of a Karli Novak user
|
||||
And I click "Add team members" button
|
||||
And I fill bootsrap tags input with "marija@myorg.com"
|
||||
And confirm with ENTER key to ".bootstrap-tagsinput>input"
|
||||
And I click "Invite Users" button
|
||||
And I click "As Normal Users" link
|
||||
Then I should see "marija@myorg.com - User was already a member of SciNote - successfully invited to team BioSistemika Process as Normal user." massage of "Invitation results:" modal window
|
||||
And I click "Close" button
|
||||
And I should see "active"
|
||||
And I should see "marija@myorg.com"
|
||||
|
||||
@javascript
|
||||
Scenario: Checking Add team members
|
||||
Given "nonadmin@myorg.com" is signed in with "asdf1243"
|
||||
And Settings page of BioSistemika Process team of a Karli Novak user
|
||||
And I click "Add team members" button
|
||||
And I fill in "marija@myorg.com" to Invite users to team BioSistemika Process input field
|
||||
And confirm with ENTER key to ".bootstrap-tagsinput>input"
|
||||
And I fill in "lojze@myorg.com" to Invite users to team BioSistemika Process input field
|
||||
And confirm with ENTER key to ".bootstrap-tagsinput>input"
|
||||
And I click "Invite Users" button
|
||||
And I click on "As Normal Users" in Invite dropdown
|
||||
And I click "Close" button
|
||||
Then I should see "active"
|
||||
Then I should see "pending"
|
||||
Then I should see "marija@myorg.com"
|
||||
Then I should see "lojze@myorg.com"
|
||||
@javascript
|
||||
Scenario: Checking Add team members
|
||||
Given "nonadmin@myorg.com" is signed in with "asdf1243"
|
||||
And Settings page of BioSistemika Process team of a Karli Novak user
|
||||
And I click "Add team members" button
|
||||
And I fill bootsrap tags input with "marija@myorg.com"
|
||||
And confirm with ENTER key to ".bootstrap-tagsinput>input"
|
||||
And I fill bootsrap tags input with "lojze@myorg.com"
|
||||
And confirm with ENTER key to ".bootstrap-tagsinput>input"
|
||||
And I click "Invite Users" button
|
||||
And I click "As Normal Users" link
|
||||
And I click "Close" button
|
||||
Then I should see "active"
|
||||
Then I should see "pending"
|
||||
Then I should see "marija@myorg.com"
|
||||
Then I should see "lojze@myorg.com"
|
||||
|
||||
@javascript
|
||||
Scenario: Unsuccessful Add team member
|
||||
Given "nonadmin@myorg.com" is signed in with "asdf1243"
|
||||
And Settings page of BioSistemika Process team of a Karli Novak user
|
||||
And I click "Add team members" button
|
||||
And I fill in "anicamyorg.com" to Invite users to team BioSistemika Process input field
|
||||
And confirm with ENTER key to ".bootstrap-tagsinput>input"
|
||||
And I click "Invite Users" button
|
||||
And I click on "As Normal Users" in Invite dropdown
|
||||
Then I should see "anicamyorg.com - Invalid email." massage of "Invitation results:" modal window
|
||||
And I click "Close" button
|
||||
@javascript
|
||||
Scenario: Unsuccessful Add team member
|
||||
Given "nonadmin@myorg.com" is signed in with "asdf1243"
|
||||
And Settings page of BioSistemika Process team of a Karli Novak user
|
||||
And I click "Add team members" button
|
||||
And I fill bootsrap tags input with "anicamyorg.com"
|
||||
And confirm with ENTER key to ".bootstrap-tagsinput>input"
|
||||
And I click "Invite Users" button
|
||||
And I click "As Normal Users" link
|
||||
Then I should see "anicamyorg.com - Invalid email." massage of "Invitation results:" modal window
|
||||
And I click "Close" button
|
||||
|
||||
@javascript
|
||||
Scenario: Successful Sign up
|
||||
Given I visit the sign up page
|
||||
And I fill in "Karolina" in "#user_full_name" field
|
||||
And I fill in "mypassword3333" in "#user_password" field
|
||||
And I fill in "karolina@myorg.com" in "#user_email" field
|
||||
And I fill in "mypassword3333" in "#user_password_confirmation" field
|
||||
And I fill in "Circle" in "#team_name" field
|
||||
And I click on Sign up button
|
||||
And I should see "Circle"
|
||||
Then I should see "Hi, Karolina"
|
||||
#Then I should see "Welcome to SciNote." flash message - Is not implemented in this version
|
||||
|
||||
#Scenario: Verify invited user does have invitation team - Cannot varify since no e-mail was sent (localhost)
|
||||
#Given Settings page of BioSistemika Process team of a Karli Novak user
|
||||
#Then I should see "Karolina" name in column "Name"
|
||||
@javascript
|
||||
Scenario: Successful Sign up
|
||||
Given I visit the sign up page
|
||||
And I fill in "Karolina" in "#user_full_name" field
|
||||
And I fill in "mypassword3333" in "#user_password" field
|
||||
And I fill in "karolina@myorg.com" in "#user_email" field
|
||||
And I fill in "mypassword3333" in "#user_password_confirmation" field
|
||||
And I fill in "Circle" in "#team_name" field
|
||||
And I click "Sign up" button
|
||||
And I should see "Circle"
|
||||
Then I should see "Hi, Karolina"
|
||||
|
||||
@javascript
|
||||
Scenario: Unsuccessful Sign up, Password confirmation does not match
|
||||
Given I visit the sign up page
|
||||
And I fill in "Agata Novakovic" in "#user_full_name" field
|
||||
And I fill in "mypassword6666" in "#user_password" field
|
||||
And I fill in "agata@myorg.com" in "#user_email" field
|
||||
And I fill in "mypassword6665 " in "#user_password_confirmation" field
|
||||
And I fill in "Flop" in "#team_name" field
|
||||
And I click on Sign up button
|
||||
Then I should see "doesn't match Password" error message
|
||||
@javascript
|
||||
Scenario: Unsuccessful Sign up, Password confirmation does not match
|
||||
Given I visit the sign up page
|
||||
And I fill in "Agata Novakovic" in "#user_full_name" field
|
||||
And I fill in "mypassword6666" in "#user_password" field
|
||||
And I fill in "agata@myorg.com" in "#user_email" field
|
||||
And I fill in "mypassword6665 " in "#user_password_confirmation" field
|
||||
And I fill in "Flop" in "#team_name" field
|
||||
And I click "Sign up" button
|
||||
Then I should see "doesn't match Password" error message
|
||||
|
||||
@javascript
|
||||
Scenario: Unsuccessful Sign up, Team name is missing
|
||||
Given I visit the sign up page
|
||||
And I fill in "Agata Novakovic" in "#user_full_name" field
|
||||
And I fill in "mypassword6666" in "#user_password" field
|
||||
And I fill in "agata@myorg.com" in "#user_email" field
|
||||
And I fill in "mypassword6666" in "#user_password_confirmation" field
|
||||
And I click on Sign up button
|
||||
Then I should see "is too short (minimum is 2 characters)" error message
|
||||
@javascript
|
||||
Scenario: Unsuccessful Sign up, Team name is missing
|
||||
Given I visit the sign up page
|
||||
And I fill in "Agata Novakovic" in "#user_full_name" field
|
||||
And I fill in "mypassword6666" in "#user_password" field
|
||||
And I fill in "agata@myorg.com" in "#user_email" field
|
||||
And I fill in "mypassword6666" in "#user_password_confirmation" field
|
||||
And I click "Sign up" button
|
||||
Then I should see "is too short (minimum is 2 characters)" error message
|
||||
|
||||
|
|
|
@ -1,48 +1,48 @@
|
|||
# feature/project. feature
|
||||
Feature: Project
|
||||
As a creator of team
|
||||
I want to navigate to other my team
|
||||
I want to navigate through a SciNote
|
||||
|
||||
Background:
|
||||
Given default screen size
|
||||
Given the "BioSistemika Process" team exists
|
||||
Given the "BioSistemika Path" 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"
|
||||
And "nonadmin@myorg.com" is in "BioSistemika Path" team as a "normal_user"
|
||||
And "nonadmin@myorg.com" is signed in with "mypassword1234"
|
||||
|
||||
@javascript
|
||||
Scenario: Successful change a team view
|
||||
Given I'm on the home page of "BioSistemika Path" team
|
||||
And I click on team switcher
|
||||
And I click to "BioSistemika Process" in team dropdown menu
|
||||
Then I should see "You are working on BioSistemika Process now!" flash message
|
||||
|
||||
Scenario: Successful return to Projects page
|
||||
Given My profile page of current user
|
||||
And I click first "Projects" link
|
||||
Then I am on Projects page of "BioSistemika Process" team of current user
|
||||
|
||||
Scenario: Successful navigate to Protocols page
|
||||
Given My profile page of current user
|
||||
And I click first "Protocols" link
|
||||
Then I am on Protocols page of "BioSistemika Process" team of current user
|
||||
|
||||
Scenario: Successful navigate to Inventories page
|
||||
Given My profile page of current user
|
||||
And I click first "Inventories" link
|
||||
Then I am on Inventories page of "BioSistemika Process" team of current user
|
||||
|
||||
Scenario: Successful navigate to Reports page
|
||||
Given My profile page of current user
|
||||
And I click first "Reports" link
|
||||
Then I am on Reports page of "BioSistemika Process" team of current user
|
||||
|
||||
Scenario: Successful navigate to Activities page
|
||||
Given My profile page of current user
|
||||
And I click first "Activities" link
|
||||
Then I am on Activities page of "BioSistemika Process" team of current user
|
||||
# feature/project. feature
|
||||
Feature: Project
|
||||
As a creator of team
|
||||
I want to navigate to other my team
|
||||
I want to navigate through a SciNote
|
||||
|
||||
Background:
|
||||
Given default screen size
|
||||
Given the "BioSistemika Process" team exists
|
||||
Given the "BioSistemika Path" 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"
|
||||
And "nonadmin@myorg.com" is in "BioSistemika Path" team as a "normal_user"
|
||||
And "nonadmin@myorg.com" is signed in with "mypassword1234"
|
||||
|
||||
@javascript
|
||||
Scenario: Successful change a team view
|
||||
Given I'm on the projects page of "BioSistemika Path" team
|
||||
And I click on team switcher
|
||||
And I click to "BioSistemika Process" in team dropdown menu
|
||||
Then I should see "You are working on BioSistemika Process now!" flash message
|
||||
|
||||
Scenario: Successful return to Projects page
|
||||
Given My profile page of current user
|
||||
And I click first "Projects" link
|
||||
Then I am on Projects page of "BioSistemika Process" team of current user
|
||||
|
||||
Scenario: Successful navigate to Protocols page
|
||||
Given My profile page of current user
|
||||
And I click first "Protocols" link
|
||||
Then I am on Protocols page of "BioSistemika Process" team of current user
|
||||
|
||||
Scenario: Successful navigate to Inventories page
|
||||
Given My profile page of current user
|
||||
And I click first "Inventories" link
|
||||
Then I am on Inventories page of "BioSistemika Process" team of current user
|
||||
|
||||
Scenario: Successful navigate to Reports page
|
||||
Given My profile page of current user
|
||||
And I click first "Reports" link
|
||||
Then I am on Reports page of "BioSistemika Process" team of current user
|
||||
|
||||
Scenario: Successful navigate to Activities page
|
||||
Given My profile page of current user
|
||||
And I click first "Activities" link
|
||||
Then I am on Activities page of "BioSistemika Process" team of current user
|
||||
|
|
|
@ -12,7 +12,7 @@ Background:
|
|||
And "nonadmin@myorg.com" is signed in with "mypassword1234"
|
||||
Given I had project "Mangart" for team "BioSistemika Process"
|
||||
And user "Karli Novak" owner of project "Mangart"
|
||||
And I'm on the home page of "BioSistemika Process" team
|
||||
And I'm on the projects page of "BioSistemika Process" team
|
||||
|
||||
@javascript
|
||||
Scenario: Unsuccessful archived project
|
||||
|
@ -35,4 +35,4 @@ Scenario: Restore archived project
|
|||
Then I should see "Mangart" archived project card in "BioSistemika Process" team page
|
||||
And I click to down arrow of a "Mangart" project card
|
||||
And I click to "Restore" of a Options modal window
|
||||
Then I should see "Project Mangart successfully restored." flash message
|
||||
Then I should see "Project Mangart successfully restored." flash message
|
||||
|
|
|
@ -12,7 +12,7 @@ Background:
|
|||
And "nonadmin@myorg.com" is signed in with "mypassword1234"
|
||||
Given I had project "Mangart" for team "BioSistemika Process"
|
||||
And user "Karli Novak" owner of project "Mangart"
|
||||
And I'm on the home page of "BioSistemika Process" team
|
||||
And I'm on the projects page of "BioSistemika Process" team
|
||||
|
||||
@javascript
|
||||
Scenario: Successful add comment to a project
|
||||
|
@ -60,4 +60,4 @@ Scenario: Successful delete comment to a project
|
|||
And I hover "I was on Triglav one summer." comment on "Mangart" project card
|
||||
And I click "trash" icon on "Mangart" project card
|
||||
And I click to OK on confirm dialog
|
||||
Then I shouldn't see "I was on Triglav one summer." in Comments list of "Mangart" project card
|
||||
Then I shouldn't see "I was on Triglav one summer." in Comments list of "Mangart" project card
|
||||
|
|
|
@ -13,10 +13,10 @@ Background:
|
|||
|
||||
@javascript
|
||||
Scenario: Successful create new project
|
||||
Given I'm on the home page of "BioSistemika Process" team
|
||||
And I click "New Project" Scinote button
|
||||
Given I'm on the projects page of "BioSistemika Process" team
|
||||
And I click "New Project" button
|
||||
Then I fill in "Mangart" to "Project name" field of "Create new project" modal window
|
||||
And I click "All team members" Scinote button
|
||||
And I click "All team members" button
|
||||
And I click "Create" button
|
||||
Then I should see "Project Mangart successfully created." flash message
|
||||
Then I should see "Mangart" public project card in "BioSistemika Process" team page
|
||||
|
@ -24,23 +24,23 @@ Scenario: Successful create new project
|
|||
@javascript
|
||||
Scenario: Unsuccessful create new project
|
||||
Given I had project "Mangart" for team "BioSistemika Process"
|
||||
Given I'm on the home page of "BioSistemika Process" team
|
||||
And I click "New Project" Scinote button
|
||||
Given I'm on the projects page of "BioSistemika Process" team
|
||||
And I click "New Project" button
|
||||
And I click "Create" button
|
||||
Then I should see "is too short (minimum is 2 characters)" error message of "Create new project" modal window
|
||||
Then I fill in "Mangart" to "Project name" field of "Create new project" modal window
|
||||
And I click "Create" button
|
||||
Then I should see "This project name has to be unique inside a team (this includes the archive)" error message of "Create new project" modal window
|
||||
And I click "Cancel" Scinote button
|
||||
And I click "Cancel" button
|
||||
|
||||
@javascript
|
||||
Scenario: Successful edit project
|
||||
Given I had project "Mangart" for team "BioSistemika Process"
|
||||
And user "Karli Novak" owner of project "Mangart"
|
||||
Given I'm on the home page of "BioSistemika Process" team
|
||||
Given I'm on the projects page of "BioSistemika Process" team
|
||||
And I click to down arrow of a "Mangart" project card
|
||||
And I click to "Edit" of a Options modal window
|
||||
Then I change "Mangart" with "Golica" of field "Project name" of "Edit project Mangart" modal window
|
||||
And I click "Project members only" Scinote button
|
||||
Then I fill in "Golica" in "#project_name" field
|
||||
And I click "Project members only" button
|
||||
And I click "Save" button
|
||||
Then I should see "Golica" private project card in "BioSistemika Process" team page
|
||||
Then I should see "Golica" private project card in "BioSistemika Process" team page
|
||||
|
|
|
@ -14,7 +14,7 @@ Background:
|
|||
And "nonadmin@myorg.com" is signed in with "mypassword1234"
|
||||
And I had project "Mangart" for team "BioSistemika Process"
|
||||
And user "Karli Novak" owner of project "Mangart"
|
||||
And I'm on the home page of "BioSistemika Process" team
|
||||
And I'm on the projects page of "BioSistemika Process" team
|
||||
|
||||
|
||||
@javascript
|
||||
|
@ -23,8 +23,9 @@ Scenario: Successful add user to a project
|
|||
And I click "Manage users" link
|
||||
And I select user "Marija Novak" in user dropdown of user manage modal for project "Mangart"
|
||||
And I select role "User" in role dropdown of user manage modal for project "Mangart"
|
||||
And I click "Add" Scinote button
|
||||
And I click "Close" Scinote button
|
||||
And I click "Add" button
|
||||
And WAIT
|
||||
And I click "Close" button
|
||||
Then I should see "Marija Novak" with role "User" in Users list of "Mangart" project card
|
||||
|
||||
@javascript
|
||||
|
@ -33,7 +34,8 @@ Scenario: Successful change user role to a project
|
|||
And I click "users" icon on "Mangart" project card
|
||||
And I click "Manage users" link
|
||||
And I change role "Owner" in role dropdown for user "Marija Nova" of user manage modal for project "Mangart"
|
||||
And I click "Close" Scinote button
|
||||
And WAIT
|
||||
And I click "Close" button
|
||||
Then I should see "Marija Novak" with role "Owner" in Users list of "Mangart" project card
|
||||
|
||||
@javascript
|
||||
|
@ -48,9 +50,9 @@ Scenario: Unsuccessful adding user to a project
|
|||
And I click "users" icon on "Mangart" project card
|
||||
And I click "Manage users" link
|
||||
And I select user "Marija Novak" in user dropdown of user manage modal for project "Mangart"
|
||||
And I click "Add" Scinote button
|
||||
And I click "Add" button
|
||||
Then I should see "Please select a user role." error message
|
||||
And I click "Close" Scinote button
|
||||
And I click "Close" button
|
||||
|
||||
@javascript
|
||||
Scenario: Removing user from a project
|
||||
|
@ -59,4 +61,4 @@ Scenario: Removing user from a project
|
|||
And I click "Manage users" link
|
||||
And I click to cross icon at "Marija Novak" user in user manage modal for project "Mangart"
|
||||
Then "Marija Novak" user is removed from a list in user manage modal for project "Mangart"
|
||||
And I click "Close" Scinote button
|
||||
And I click "Close" button
|
||||
|
|
|
@ -26,13 +26,13 @@ Given default screen size2
|
|||
And I fill in "Star" in "#tag_name" field
|
||||
And I click element with css ".btn-colorselector"
|
||||
And I select "#15369E" color
|
||||
And I make screenshot
|
||||
And I click element with css ".save-tag-link"
|
||||
Then I should see "Star"
|
||||
And I click "Close" button
|
||||
Then I should see "Star"
|
||||
|
||||
@javascript
|
||||
# Make this test shorter and more isolated
|
||||
@javascript @wip
|
||||
Scenario: Successful change a tag to a task
|
||||
Given task page of Experiment design
|
||||
And I click element with css ".search-field"
|
||||
|
@ -48,12 +48,10 @@ Given default screen size2
|
|||
And I click element with css ".btn-colorselector"
|
||||
And I select "#DC143C" color
|
||||
And I click element with css ".save-tag-link"
|
||||
And I should see "Sky"
|
||||
And I click element with css "li.list-group-item:nth-child(1) > div:nth-child(1) > div:nth-child(2) > a:nth-child(2)"
|
||||
And WAIT
|
||||
And I click "fa-times" icon at position 2 within "#manage-module-tags-modal .modal-body"
|
||||
And I click "Close" button
|
||||
And task page of Experiment design
|
||||
And I make screenshot
|
||||
Then I should see "Sun"
|
||||
Then I should not see "Sky"
|
||||
|
||||
|
@ -86,26 +84,6 @@ Given default screen size2
|
|||
And task page of Experiment design
|
||||
Then I should not see "Dry lab"
|
||||
|
||||
# @javascript (cannot be used for now)
|
||||
# Scenario: Successful add a start date
|
||||
# Given task page of Experiment design
|
||||
# And I make screenshot
|
||||
# And I click element with css "#calendarStartDate"
|
||||
# And I click element with css "#my_module_due_date"
|
||||
# And I click "Save" button
|
||||
# And WAIT
|
||||
# Then I should not see "Due date: not set"
|
||||
|
||||
# @javascript (cannot be used for now)
|
||||
# Scenario: Successful remove a due date
|
||||
# Given task page of Experiment design
|
||||
# And I click on "#calendarDueDate" sign
|
||||
# And I click on "#my_module_due_date_clear" sign
|
||||
# And I click "Save" button
|
||||
# And WAIT
|
||||
# Then I should see "not set"
|
||||
# And I make screenshot
|
||||
|
||||
@javascript
|
||||
Scenario: Successful add description
|
||||
Given task page of Experiment design
|
||||
|
@ -125,10 +103,9 @@ Given default screen size2
|
|||
And I click element with css "#my_module_description_view"
|
||||
And confirm with ENTER key to "#my_module_description_textarea_ifr"
|
||||
And I fill in "I will go to Krn one day." in "#my_module_description_textarea" rich text editor field
|
||||
And I make screenshot
|
||||
And I click element with css ".tinymce-save-button"
|
||||
Then I should see "I will go to Krn one day."
|
||||
|
||||
|
||||
@javascript
|
||||
Scenario: Successful Complete task
|
||||
Given task page of Experiment design
|
||||
|
|
|
@ -7,7 +7,7 @@ Feature: Protocol step
|
|||
want to add/ edit/ delete file to a step
|
||||
|
||||
Background:
|
||||
Given default screen size2
|
||||
Given default screen size
|
||||
Given the "BioSistemika Process" team exists
|
||||
Given the following users are registered
|
||||
| name | email | password | password_confirmation |
|
||||
|
@ -16,7 +16,7 @@ And "nonadmin@myorg.com" is in "BioSistemika Process" team as a "admin"
|
|||
Given Demo project exists for the "BioSistemika Process" team
|
||||
And "nonadmin@myorg.com" is signed in with "mypassword1234"
|
||||
|
||||
@javascript
|
||||
@javascript @wip
|
||||
Scenario: Unsuccessful add new step to a task
|
||||
Given I am on task page of Biosistemika Process team
|
||||
And I click "New step" button
|
||||
|
@ -31,7 +31,7 @@ Scenario: Successful add new step to a task1
|
|||
And I fill in "zivali pa so se odpravile dalje po svetu." in "#step_description_textarea_ifr" field
|
||||
And I click element with css "#new-step-assets-tab"
|
||||
And I attach file "Moon.png" to the drag-n-drop field
|
||||
And I click element with css "input.btn:nth-child(2)"
|
||||
And I click "Add" button
|
||||
Then I should see "Moon.png"
|
||||
|
||||
@javascript
|
||||
|
@ -42,7 +42,7 @@ Scenario: Successful add new step to a task2
|
|||
And I fill in "zivali pa so se odpravile dalje po svetu." in "#step_description_textarea_ifr" field
|
||||
And I click element with css "#new-step-assets-tab"
|
||||
And I attach file "File.txt" to the drag-n-drop field
|
||||
And I click element with css "input.btn:nth-child(2)"
|
||||
And I click "Add" button
|
||||
Then I should see "File.txt"
|
||||
|
||||
@javascript
|
||||
|
@ -52,7 +52,7 @@ Scenario: Successful add new step to a task3
|
|||
And I fill in "KIT" in "#step_name" field
|
||||
And I fill in "zivali pa so se odpravile dalje po svetu." in "#step_description_textarea_ifr" field
|
||||
And I attach file "Star.png" to the drag-n-drop field
|
||||
And I click element with css "input.btn:nth-child(2)"
|
||||
And I click "Add" button
|
||||
Then I should see "Star.png"
|
||||
|
||||
@javascript
|
||||
|
@ -64,9 +64,7 @@ Scenario: Successful add new step to a task4
|
|||
And I click element with css "#new-step-tables-tab"
|
||||
And I click element with css "#add-table"
|
||||
And I fill in "Bos" in ".table_name" field
|
||||
#And I fill in "Labradorec" to "A1" Table field - special calls needed
|
||||
#And I fill in "Dalmatinec" to "B2" Table field
|
||||
And I click element with css "input.btn:nth-child(2)"
|
||||
And I click "Add" button
|
||||
Then I should see "BOS"
|
||||
|
||||
@wip
|
||||
|
|
|
@ -19,7 +19,7 @@ Background:
|
|||
Scenario: Unsuccessful add Text result
|
||||
Given I am on Task results page
|
||||
And I click "Text" button
|
||||
And I click element with css ".save-result"
|
||||
And I click "Add" button
|
||||
Then I should see "can't be blank"
|
||||
And I click "Cancel" button
|
||||
|
||||
|
@ -29,7 +29,7 @@ Scenario: Successful add text result with Text name
|
|||
And I click "Text" button
|
||||
And I fill in "LJ ZOO" in "#result_name" field
|
||||
And I fill in "Živali pa so se odpravile dalje po svetu." in "#result_text_attributes_textarea" rich text editor field
|
||||
And I click element with css ".save-result"
|
||||
And I click "Add" button
|
||||
Then I should see "LJ ZOO"
|
||||
|
||||
@javascript
|
||||
|
@ -37,7 +37,7 @@ Scenario: Successful add Text result
|
|||
Given I am on Task results page
|
||||
And I click "Text" button
|
||||
And I fill in "Vse to pa zaradi botra petelina, bog mu daj zdravje!" in "#result_text_attributes_textarea" rich text editor field
|
||||
And I click element with css ".save-result"
|
||||
And I click "Add" button
|
||||
Then I should see "Vse to pa zaradi botra petelina, bog mu daj zdravje!"
|
||||
|
||||
@javascript
|
||||
|
@ -46,11 +46,11 @@ Scenario: Successful edit Text task result
|
|||
And I click "Text" button
|
||||
And I fill in "LJ ZOO" in "#result_name" field
|
||||
And I fill in "Živali pa so se odpravile dalje po svetu." in "#result_text_attributes_textarea" rich text editor field
|
||||
And I click element with css ".save-result"
|
||||
And I click "Add" button
|
||||
And I click "fa-pencil-alt" icon
|
||||
And I fill in "ZOO" in "#result_name" field
|
||||
And I fill in "Vse to pa zaradi botra petelina!" in "#result_text_attributes_textarea" rich text editor field
|
||||
And I click element with css ".save-result"
|
||||
And I click "Save" button
|
||||
Then I should see "Vse to pa zaradi botra petelina!"
|
||||
|
||||
@javascript
|
||||
|
@ -59,19 +59,19 @@ Scenario: Successful add comment to a Text task result
|
|||
And I click "Text" button
|
||||
And I fill in "LJ ZOO" in "#result_name" field
|
||||
And I fill in "Živali pa so se odpravile dalje po svetu." in "#result_text_attributes_textarea" rich text editor field
|
||||
And I click element with css ".save-result"
|
||||
And I click "Add" button
|
||||
And I fill in "I was on Triglav one summer." in "message" textarea field
|
||||
And I click "fa-paper-plane" icon
|
||||
And WAIT
|
||||
Then I should see "I was on Triglav one summer."
|
||||
|
||||
@wip
|
||||
@wip
|
||||
Scenario: Unsuccessful add comment to a Text task result BUG!!!!!
|
||||
Given I am on Task results page
|
||||
And I click "Text" button
|
||||
And I fill in "LJ ZOO" in "#result_name" field
|
||||
And I fill in "Živali pa so se odpravile dalje po svetu." in "#result_text_attributes_textarea" rich text editor field
|
||||
And I click element with css ".save-result"
|
||||
And I click "Add" button
|
||||
And I fill in "" in "message" textarea field
|
||||
And confirm with ENTER key to "#message"
|
||||
And I click "fa-paper-plane" icon
|
||||
|
@ -83,7 +83,7 @@ Scenario: Successful edit comment to a Text task result
|
|||
And I click "Text" button
|
||||
And I fill in "LJ ZOO" in "#result_name" field
|
||||
And I fill in "Živali pa so se odpravile dalje po svetu." in "#result_text_attributes_textarea" rich text editor field
|
||||
And I click element with css ".save-result"
|
||||
And I click "Add" button
|
||||
And I fill in "I was on Triglav one summer." in "message" textarea field
|
||||
And I click "fa-paper-plane" icon
|
||||
And WAIT
|
||||
|
@ -98,7 +98,7 @@ Scenario: Unsuccessful edit comment to a Text task result
|
|||
And I click "Text" button
|
||||
And I fill in "LJ ZOO" in "#result_name" field
|
||||
And I fill in "Živali pa so se odpravile dalje po svetu." in "#result_text_attributes_textarea" rich text editor field
|
||||
And I click element with css ".save-result"
|
||||
And I click "Add" button
|
||||
And I fill in "I was on Triglav one summer." in "message" textarea field
|
||||
And I click "fa-paper-plane" icon
|
||||
And WAIT
|
||||
|
@ -113,7 +113,7 @@ Scenario: Unsuccessful delete comment to a Text task resultGiven I am on Task re
|
|||
And I click "Text" button
|
||||
And I fill in "LJ ZOO" in "#result_name" field
|
||||
And I fill in "Živali pa so se odpravile dalje po svetu." in "#result_text_attributes_textarea" rich text editor field
|
||||
And I click element with css ".save-result"
|
||||
And I click "Add" button
|
||||
And I fill in "I was on Triglav one summer." in "message" textarea field
|
||||
And I click "fa-paper-plane" icon
|
||||
And WAIT
|
||||
|
@ -128,7 +128,7 @@ Scenario: Successful delete comment to a Text task result
|
|||
And I click "Text" button
|
||||
And I fill in "LJ ZOO" in "#result_name" field
|
||||
And I fill in "Živali pa so se odpravile dalje po svetu." in "#result_text_attributes_textarea" rich text editor field
|
||||
And I click element with css ".save-result"
|
||||
And I click "Add" button
|
||||
And I fill in "I was on Triglav one summer." in "message" textarea field
|
||||
And I click "fa-paper-plane" icon
|
||||
And WAIT
|
||||
|
@ -144,7 +144,7 @@ Scenario: Successful archive text result with Text name
|
|||
And I click "Text" button
|
||||
And I fill in "LJ ZOO" in "#result_name" field
|
||||
And I fill in "Živali pa so se odpravile dalje po svetu." in "#result_text_attributes_textarea" rich text editor field
|
||||
And I click element with css ".save-result"
|
||||
And I click "Add" button
|
||||
And I click "fa-briefcase" icon
|
||||
And I click to OK on confirm dialog
|
||||
Then I should see "Successfully archived text result in task Experiment design" flash message
|
||||
|
@ -153,7 +153,7 @@ Scenario: Successful archive text result with Text name
|
|||
Scenario: Unsuccessful add Table result ##########this one doesnt work
|
||||
Given I am on Task results page
|
||||
And I click "Table" button
|
||||
And I click element with css ".save-result"
|
||||
And I click "Add" button
|
||||
Then I should see "can't be blank"
|
||||
And I click "Cancel" button
|
||||
|
||||
|
@ -164,7 +164,7 @@ Scenario: Successful add table result with Table name
|
|||
And I fill in "ZOO" in "#result_name" field
|
||||
And I click on table cell one
|
||||
And I input "Živali pa so se odpravile dalje po svetu." in cell
|
||||
And I click element with css ".save-result"
|
||||
And I click "Add" button
|
||||
Then I should see "Živali pa so se odpravile dalje po svetu."
|
||||
|
||||
@javascript
|
||||
|
@ -173,7 +173,7 @@ Scenario: Successful add Table result
|
|||
And I click "Table" button
|
||||
And I click on table cell one
|
||||
And I input "Vse to pa zaradi botra petelina, bog mu daj zdravje!" in cell
|
||||
And I click element with css ".save-result"
|
||||
And I click "Add" button
|
||||
Then I should see "Vse to pa zaradi botra petelina, bog mu daj zdravje!"
|
||||
|
||||
@javascript
|
||||
|
@ -183,19 +183,19 @@ Scenario: Successful edit Table task result
|
|||
And I fill in "ZOO" in "#result_name" field
|
||||
And I click on table cell one
|
||||
And I input "Živali pa so se odpravile dalje po svetu." in cell
|
||||
And I click element with css ".save-result"
|
||||
And I click "Add" button
|
||||
And I click "fa-pencil-alt" icon
|
||||
And I fill in "LJ ZOO" in "#result_name" field
|
||||
And I click on table cell one
|
||||
And I input "Vse to pa zaradi botra petelina, bog mu daj zdravje!" in cell
|
||||
And I click element with css ".save-result"
|
||||
And I click "Save" button
|
||||
Then I should see "Vse to pa zaradi botra petelina, bog mu daj zdravje!"
|
||||
|
||||
@javascript
|
||||
Scenario: Successful add comment to a Table task result
|
||||
Given I am on Task results page
|
||||
And I click "Table" button
|
||||
And I click element with css ".save-result"
|
||||
And I click "Add" button
|
||||
And I fill in "I was on Triglav one summer." in "message" textarea field
|
||||
And I click "fa-paper-plane" icon
|
||||
And WAIT
|
||||
|
@ -205,7 +205,7 @@ Scenario: Successful add comment to a Table task result
|
|||
Scenario: Successful edit comment to a Table task result
|
||||
Given I am on Task results page
|
||||
And I click "Table" button
|
||||
And I click element with css ".save-result"
|
||||
And I click "Add" button
|
||||
And I fill in "I was on Triglav one summer." in "message" textarea field
|
||||
And I click "fa-paper-plane" icon
|
||||
And WAIT
|
||||
|
@ -219,7 +219,7 @@ Scenario: Successful edit comment to a Table task result
|
|||
Scenario: Unsuccessful edit comment to a Table task result
|
||||
Given I am on Task results page
|
||||
And I click "Table" button
|
||||
And I click element with css ".save-result"
|
||||
And I click "Add" button
|
||||
And I fill in "I was on Triglav one summer." in "message" textarea field
|
||||
And I click "fa-paper-plane" icon
|
||||
And WAIT
|
||||
|
@ -232,7 +232,7 @@ Scenario: Unsuccessful edit comment to a Table task result
|
|||
Scenario: Unsuccessful delete comment to a Table task result
|
||||
Given I am on Task results page
|
||||
And I click "Table" button
|
||||
And I click element with css ".save-result"
|
||||
And I click "Add" button
|
||||
And I fill in "I was on Triglav one summer." in "message" textarea field
|
||||
And I click "fa-paper-plane" icon
|
||||
And WAIT
|
||||
|
@ -245,7 +245,7 @@ Scenario: Unsuccessful delete comment to a Table task result
|
|||
Scenario: Successful delete comment to a Table task result
|
||||
Given I am on Task results page
|
||||
And I click "Table" button
|
||||
And I click element with css ".save-result"
|
||||
And I click "Add" button
|
||||
And I fill in "I was on Triglav one summer." in "message" textarea field
|
||||
And I click "fa-paper-plane" icon
|
||||
And WAIT
|
||||
|
@ -258,7 +258,7 @@ Scenario: Successful delete comment to a Table task result
|
|||
Scenario: Successful archive Table result with Table name
|
||||
Given I am on Task results page
|
||||
And I click "Table" button
|
||||
And I click element with css ".save-result"
|
||||
And I click "Add" button
|
||||
And I click "fa-briefcase" icon
|
||||
And I click to OK on confirm dialog
|
||||
Then I should see "Successfully archived table result in task Experiment design" flash message
|
||||
|
@ -267,7 +267,7 @@ Scenario: Successful archive Table result with Table name
|
|||
Scenario: Unsuccessful add File result #doesnt work
|
||||
Given I am on Task results page
|
||||
And I click "File" button
|
||||
And I click element with css ".save-result"
|
||||
And I click "Add" button
|
||||
Then I should see File "can't be blank"
|
||||
And I click "Cancel" button
|
||||
|
||||
|
@ -277,7 +277,7 @@ Scenario: Successful add File result with File name
|
|||
And I click "File" button
|
||||
And I attach file "Moon.png" to the drag-n-drop field
|
||||
And I fill in "MED" in "div.form-group:nth-child(1) > input:nth-child(2)" field
|
||||
And I click element with css ".save-result"
|
||||
And I click "Add" button
|
||||
And WAIT
|
||||
Then I should see "MED"
|
||||
|
||||
|
@ -286,21 +286,20 @@ Scenario: Successful add File result
|
|||
Given I am on Task results page
|
||||
And I click "File" button
|
||||
And I attach file "Moon.png" to the drag-n-drop field
|
||||
And I click element with css ".save-result"
|
||||
And I click "Add" button
|
||||
And WAIT
|
||||
Then I should see "Moon"
|
||||
|
||||
@javascript
|
||||
@wip
|
||||
Scenario: Successful edit File result with File name
|
||||
Given I am on Task results page
|
||||
And I click "File" button
|
||||
And I attach file "Moon.png" to the drag-n-drop field
|
||||
And I fill in "MED" in "div.form-group:nth-child(1) > input:nth-child(2)" field
|
||||
And I click element with css ".save-result"
|
||||
And I click "Add" button
|
||||
And I click "fa-pencil-alt" icon
|
||||
And I fill in "STAR ZOO" in "#result_name" field
|
||||
And I click element with css ".save-result"
|
||||
And WAIT
|
||||
And I click "Save" button
|
||||
Then I should see "STAR ZOO"
|
||||
|
||||
@javascript
|
||||
|
@ -309,7 +308,7 @@ Scenario: Successful add comment to a File task result
|
|||
And I click "File" button
|
||||
And I attach file "Moon.png" to the drag-n-drop field
|
||||
And I fill in "MED" in "div.form-group:nth-child(1) > input:nth-child(2)" field
|
||||
And I click element with css ".save-result"
|
||||
And I click "Add" button
|
||||
And I fill in "I was on Triglav one summer." in "message" textarea field
|
||||
And I click "fa-paper-plane" icon
|
||||
And WAIT
|
||||
|
@ -321,7 +320,7 @@ Scenario: Successful edit comment to a File task result
|
|||
And I click "File" button
|
||||
And I attach file "Moon.png" to the drag-n-drop field
|
||||
And I fill in "MED" in "div.form-group:nth-child(1) > input:nth-child(2)" field
|
||||
And I click element with css ".save-result"
|
||||
And I click "Add" button
|
||||
And I fill in "I was on Triglav one summer." in "message" textarea field
|
||||
And I click "fa-paper-plane" icon
|
||||
And WAIT
|
||||
|
@ -336,7 +335,7 @@ Scenario: Unsuccessful edit comment to a File task result
|
|||
And I click "File" button
|
||||
And I attach file "Moon.png" to the drag-n-drop field
|
||||
And I fill in "MED" in "div.form-group:nth-child(1) > input:nth-child(2)" field
|
||||
And I click element with css ".save-result"
|
||||
And I click "Add" button
|
||||
And I fill in "I was on Triglav one summer." in "message" textarea field
|
||||
And I click "fa-paper-plane" icon
|
||||
And WAIT
|
||||
|
@ -351,7 +350,7 @@ Scenario: Unsuccessful delete comment to a File task result
|
|||
And I click "File" button
|
||||
And I attach file "Moon.png" to the drag-n-drop field
|
||||
And I fill in "MED" in "div.form-group:nth-child(1) > input:nth-child(2)" field
|
||||
And I click element with css ".save-result"
|
||||
And I click "Add" button
|
||||
And I fill in "I was on Triglav one summer." in "message" textarea field
|
||||
And I click "fa-paper-plane" icon
|
||||
And WAIT
|
||||
|
@ -366,7 +365,7 @@ Scenario: Successful delete comment to a File task result
|
|||
And I click "File" button
|
||||
And I attach file "Moon.png" to the drag-n-drop field
|
||||
And I fill in "MED" in "div.form-group:nth-child(1) > input:nth-child(2)" field
|
||||
And I click element with css ".save-result"
|
||||
And I click "Add" button
|
||||
And I fill in "I was on Triglav one summer." in "message" textarea field
|
||||
And I click "fa-paper-plane" icon
|
||||
And WAIT
|
||||
|
@ -380,7 +379,7 @@ Scenario: Successful archive File result with File name
|
|||
And I click "File" button
|
||||
And I attach file "Moon.png" to the drag-n-drop field
|
||||
And I fill in "MED" in "div.form-group:nth-child(1) > input:nth-child(2)" field
|
||||
And I click element with css ".save-result"
|
||||
And I click "Add" button
|
||||
And I click "fa-briefcase" icon
|
||||
And I click to OK on confirm dialog
|
||||
Then I should see "Successfully archived file result in task Experiment design" flash message
|
||||
|
@ -391,9 +390,10 @@ Scenario: Download archived Text result
|
|||
And I click "Text" button
|
||||
And I fill in "LJ ZOO" in "#result_name" field
|
||||
And I fill in "Živali pa so se odpravile dalje po svetu." in "#result_text_attributes_textarea" rich text editor field
|
||||
And I click element with css ".save-result"
|
||||
And I click "Add" button
|
||||
And I click "fa-briefcase" icon
|
||||
And I click to OK on confirm dialog
|
||||
And WAIT
|
||||
And I am on Task archive page
|
||||
And I click button with id "dropdownMenu1"
|
||||
Then I click "Download" link within dropdown menu
|
||||
|
@ -406,6 +406,7 @@ Scenario: Download archived Table result
|
|||
And I click element with css ".save-result"
|
||||
And I click "fa-briefcase" icon
|
||||
And I click to OK on confirm dialog
|
||||
And WAIT
|
||||
And I am on Task archive page
|
||||
And I click button with id "dropdownMenu1"
|
||||
Then I click "Download" link within dropdown menu
|
||||
|
@ -417,9 +418,10 @@ Scenario: Download archived File result
|
|||
And I click "File" button
|
||||
And I attach file "Moon.png" to the drag-n-drop field
|
||||
And I fill in "MED" in "div.form-group:nth-child(1) > input:nth-child(2)" field
|
||||
And I click element with css ".save-result"
|
||||
And I click "Add" button
|
||||
And I click "fa-briefcase" icon
|
||||
And I click to OK on confirm dialog
|
||||
And WAIT
|
||||
And I am on Task archive page
|
||||
And I click button with id "dropdownMenu1"
|
||||
And I click "View" link within dropdown menu
|
||||
|
@ -432,9 +434,10 @@ Scenario: Delete archived Text result
|
|||
And I click "Text" button
|
||||
And I fill in "LJ ZOO" in "#result_name" field
|
||||
And I fill in "Živali pa so se odpravile dalje po svetu." in "#result_text_attributes_textarea" rich text editor field
|
||||
And I click element with css ".save-result"
|
||||
And I click "Add" button
|
||||
And I click "fa-briefcase" icon
|
||||
And I click to OK on confirm dialog
|
||||
And WAIT
|
||||
And I am on Task archive page
|
||||
And I click button with id "dropdownMenu1"
|
||||
And I click "Delete" link within dropdown menu
|
||||
|
@ -445,9 +448,10 @@ Scenario: Delete archived Text result
|
|||
Scenario: Delete archived Table result
|
||||
Given I am on Task results page
|
||||
And I click "Table" button
|
||||
And I click element with css ".save-result"
|
||||
And I click "Add" button
|
||||
And I click "fa-briefcase" icon
|
||||
And I click to OK on confirm dialog
|
||||
And WAIT
|
||||
And I am on Task archive page
|
||||
And I click button with id "dropdownMenu1"
|
||||
Then I click "Delete" link within dropdown menu
|
||||
|
@ -460,33 +464,12 @@ Scenario: Delete archived File result
|
|||
And I click "File" button
|
||||
And I attach file "Moon.png" to the drag-n-drop field
|
||||
And I fill in "MED" in "div.form-group:nth-child(1) > input:nth-child(2)" field
|
||||
And I click element with css ".save-result"
|
||||
And I click "Add" button
|
||||
And I click "fa-briefcase" icon
|
||||
And I click to OK on confirm dialog
|
||||
And WAIT
|
||||
And I am on Task archive page
|
||||
And I click button with id "dropdownMenu1"
|
||||
And I click "Delete" link within dropdown menu
|
||||
And I click to OK on confirm dialog
|
||||
Then I should see "Sucessfully removed result MED from task Experiment design." flash message
|
||||
|
||||
# We need to optimize some tests... When you deleting archived result, we always adding result. This should be initial
|
||||
# state there, already
|
||||
|
||||
|
||||
#### JUST TESTING, will be removed
|
||||
|
||||
@javascript
|
||||
Scenario: Successful add text result with Text name
|
||||
Given I am on Task results page
|
||||
And I click "Text" button
|
||||
And I fill in "LJ ZOO" in "#result_name" field
|
||||
And I fill in "Živali pa so se odpravile dalje po svetu." in "#result_text_attributes_textarea" rich text editor field
|
||||
And I click element with css ".save-result"
|
||||
And I click "Text" button
|
||||
And I fill in "Kuga???" in "#result_name" field
|
||||
And I fill in "Test2." in "#result_text_attributes_textarea" rich text editor field
|
||||
And I click element with css ".save-result"
|
||||
And I click "fa-pencil-alt" icon at position 2
|
||||
And I fill in "No more zoo Updated" in "#result_name" field
|
||||
And I click element with css ".save-result"
|
||||
Then I should see "No more zoo"
|
||||
|
|
|
@ -1,47 +1,47 @@
|
|||
Feature: Forgot password
|
||||
I forgot my password
|
||||
I would like a new password
|
||||
So that I can use SciNote
|
||||
|
||||
Background:
|
||||
Given the "BioSistemika Process" team exists
|
||||
Given the following users are registered
|
||||
| email | password | password_confirmation |
|
||||
| nonadmin@myorg.com | mypassword1234 | mypassword1234 |
|
||||
And "nonadmin@myorg.com" is in "BioSistemika Process" team as a "admin"
|
||||
|
||||
@javascript
|
||||
Scenario: User forgot their password and requests for new password
|
||||
Given I am on reset password page
|
||||
Then I fill in "nonadmin@myorg.com" in "#user_email" field
|
||||
And I click "Reset password" button
|
||||
Then I should see "You will receive an email with instructions on how to reset your password in a few minutes." flash message
|
||||
|
||||
@javascript
|
||||
Scenario: User forgot their password and enters non valid email
|
||||
Given I am on reset password page
|
||||
Then I fill in "nonuser@myorg.com" in "#user_email" field
|
||||
And I click "Reset password" button
|
||||
Then I should see "Email not found"
|
||||
|
||||
@javascript
|
||||
Scenario: User has got Reset Your Password email and click to link
|
||||
Given I click on Reset Password link in the reset password email for user "nonadmin@myorg.com"
|
||||
Then I should be on Change your password page
|
||||
|
||||
@javascript
|
||||
Scenario: User successfully Change password at Change your password page
|
||||
Given I click on Reset Password link in the reset password email for user "nonadmin@myorg.com"
|
||||
Then I fill in "newpassword1234" in "#user_password" field
|
||||
And I fill in "newpassword1234" in "#user_password_confirmation" field
|
||||
And I click "Change my password" button
|
||||
Then I should be on homepage
|
||||
And I should see "Your password has been changed successfully. You are now logged in." flash message
|
||||
|
||||
@javascript
|
||||
Scenario: User unsuccessfully Change password at Change your password page
|
||||
Given I click on Reset Password link in the reset password email for user "nonadmin@myorg.com"
|
||||
Then I fill in "newpassword1234" in "#user_password" field
|
||||
And I fill in "nosamepassword" in "#user_password_confirmation" field
|
||||
And I click "Change my password" button
|
||||
Then I should see "Password confirmation doesn't match Password" flash message
|
||||
Feature: Forgot password
|
||||
I forgot my password
|
||||
I would like a new password
|
||||
So that I can use SciNote
|
||||
|
||||
Background:
|
||||
Given the "BioSistemika Process" team exists
|
||||
Given the following users are registered
|
||||
| email | password | password_confirmation |
|
||||
| nonadmin@myorg.com | mypassword1234 | mypassword1234 |
|
||||
And "nonadmin@myorg.com" is in "BioSistemika Process" team as a "admin"
|
||||
|
||||
@javascript
|
||||
Scenario: User forgot their password and requests for new password
|
||||
Given I am on reset password page
|
||||
Then I fill in "nonadmin@myorg.com" in "#user_email" field
|
||||
And I click "Reset password" button
|
||||
Then I should see "You will receive an email with instructions on how to reset your password in a few minutes." flash message
|
||||
|
||||
@javascript
|
||||
Scenario: User forgot their password and enters non valid email
|
||||
Given I am on reset password page
|
||||
Then I fill in "nonuser@myorg.com" in "#user_email" field
|
||||
And I click "Reset password" button
|
||||
Then I should see "Email not found"
|
||||
|
||||
@javascript
|
||||
Scenario: User has got Reset Your Password email and click to link
|
||||
Given I click on Reset Password link in the reset password email for user "nonadmin@myorg.com"
|
||||
Then I should be on Change your password page
|
||||
|
||||
@javascript @wip
|
||||
Scenario: User successfully Change password at Change your password page
|
||||
Given I click on Reset Password link in the reset password email for user "nonadmin@myorg.com"
|
||||
Then I fill in "newpassword1234" in "#user_password" field
|
||||
And I fill in "newpassword1234" in "#user_password_confirmation" field
|
||||
And I click "Change my password" button
|
||||
Then I should be on homepage
|
||||
And I should see "Your password has been changed successfully. You are now logged in." flash message
|
||||
|
||||
@javascript @wip
|
||||
Scenario: User unsuccessfully Change password at Change your password page
|
||||
Given I click on Reset Password link in the reset password email for user "nonadmin@myorg.com"
|
||||
Then I fill in "newpassword1234" in "#user_password" field
|
||||
And I fill in "nosamepassword" in "#user_password_confirmation" field
|
||||
And I click "Change my password" button
|
||||
Then I should see "Password confirmation doesn't match Password" flash message
|
||||
|
|
|
@ -4,6 +4,7 @@ Feature: Log in
|
|||
So that I can use SciNote
|
||||
|
||||
Background:
|
||||
Given default screen size
|
||||
Given the "BioSistemika Process" team exists
|
||||
Given the following users are registered
|
||||
| email | password | password_confirmation |
|
||||
|
@ -44,10 +45,10 @@ Scenario: Unsuccessful Log in
|
|||
And I click "Log in" button
|
||||
Then I should see "Invalid Email or password." flash message
|
||||
|
||||
@javascript @wip
|
||||
@javascript
|
||||
Scenario: Successful Log out
|
||||
Given "night.slarker@gmail.com" is signed in with "mypassword1234"
|
||||
And I'm on the home page of "BioSistemika Process" team
|
||||
Then I click on "#user-account-dropdown" element
|
||||
And I click "Log out" link within dropdown menu
|
||||
And I'm on the projects page of "BioSistemika Process" team
|
||||
And I click element with css "#user-account-dropdown"
|
||||
And I click "Log out" link
|
||||
Then I should see "Logged out successfully." flash message
|
||||
|
|
|
@ -5,43 +5,43 @@ Feature: Sign up
|
|||
|
||||
Background:
|
||||
Given the following users are registered
|
||||
| email | initials |
|
||||
| night.slarker@gmail.com | NS |
|
||||
| tusk@gmail.com | TU |
|
||||
| juggernaut@gmail.com | JU |
|
||||
| email | initials |
|
||||
| night.slarker@gmail.com | NS |
|
||||
| tusk@gmail.com | TU |
|
||||
| juggernaut@gmail.com | JU |
|
||||
|
||||
@javascript
|
||||
Scenario: Sign up for an existing user
|
||||
Given I visit the sign up page
|
||||
Then I fill the sign up form with
|
||||
| Full name | E-mail | Password | Password confirmation | Team name |
|
||||
| Magnus | tusk@gmail.com | asdf1234 | asdf1234 | SpliceGirls |
|
||||
And I click on "Sign up"
|
||||
| Full name | E-mail | Password | Password confirmation | Team name |
|
||||
| Magnus | tusk@gmail.com | asdf1234 | asdf1234 | SpliceGirls |
|
||||
And I click "Sign up" button
|
||||
Then I should see "has already been taken"
|
||||
|
||||
@javascript
|
||||
Scenario: Sign up for an non-existent user
|
||||
Given I visit the sign up page
|
||||
Then I fill the sign up form with
|
||||
| Full name | E-mail | Password | Password confirmation | Team name |
|
||||
| Magnus | magnus@gmail.com | asdf1234 | asdf1234 | SpliceGirls |
|
||||
And I click on "Sign up"
|
||||
| Full name | E-mail | Password | Password confirmation | Team name |
|
||||
| Magnus | magnus@gmail.com | asdf1234 | asdf1234 | SpliceGirls |
|
||||
And I click "Sign up" button
|
||||
Then I should be on homepage
|
||||
|
||||
@javascript
|
||||
Scenario: Unsuccessful sign up, password confirmation does not match
|
||||
Given I visit the sign up page
|
||||
Then I fill the sign up form with
|
||||
| Full name | E-mail | Password | Password confirmation | Team name |
|
||||
| Magnus | magnus@gmail.com | asdf1234 | asdf1234567 | SpliceGirls |
|
||||
And I click on "Sign up"
|
||||
| Full name | E-mail | Password | Password confirmation | Team name |
|
||||
| Magnus | magnus@gmail.com | asdf1234 | asdf1234567 | SpliceGirls |
|
||||
And I click "Sign up" button
|
||||
Then I should see "doesn't match Password"
|
||||
|
||||
@javascript
|
||||
Scenario: Unsuccessful sign up, team name is missing
|
||||
Given I visit the sign up page
|
||||
Then I fill the sign up form with
|
||||
| Full name | E-mail | Password | Password confirmation |
|
||||
| Magnus | magnus@gmail.com | asdf1234 | asdf1234 |
|
||||
And I click on "Sign up"
|
||||
| Full name | E-mail | Password | Password confirmation |
|
||||
| Magnus | magnus@gmail.com | asdf1234 | asdf1234 |
|
||||
And I click "Sign up" button
|
||||
Then I should see "is too short (minimum is 2 characters)"
|
||||
|
|
|
@ -4,8 +4,9 @@ Feature: Settings
|
|||
So that I have a my prefered settings
|
||||
|
||||
Background:
|
||||
Given the "BioSistemika Process" team exists
|
||||
Given the following users are registered
|
||||
Given default screen size
|
||||
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"
|
||||
|
@ -29,31 +30,31 @@ Scenario: Successful upload avatar image
|
|||
@javascript
|
||||
Scenario: Successfully changes user full name
|
||||
Given I'm on the profile page
|
||||
Then I click on ".settings-page-full-name" element
|
||||
Then I click element with css ".settings-page-full-name"
|
||||
And I fill in "Karli Novak Novakovic" in ".settings-page-full-name" input field
|
||||
Then I click on ".save-button" element
|
||||
Then I click element with css ".save-button"
|
||||
And I should see "Karli Novak Novakovic" on ".settings-page-full-name" element
|
||||
|
||||
@javascript
|
||||
Scenario: Unsuccessfully changes user initials, text is too long
|
||||
Given I'm on the profile page
|
||||
Then I click on ".settings-page-initials" element
|
||||
Then I click element with css ".settings-page-initials"
|
||||
And I fill in "KNOCK" in ".settings-page-initials" input field
|
||||
Then I click on ".save-button" element
|
||||
Then I click element with css ".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 ".settings-page-initials" element
|
||||
Then I click element with css ".settings-page-initials"
|
||||
And I fill in "KN" in ".settings-page-initials" input field
|
||||
Then I click on ".save-button" element
|
||||
Then I click element with css ".save-button"
|
||||
And I should see "KN" on ".settings-page-initials" element
|
||||
|
||||
@javascript
|
||||
Scenario: Successfully changes user email
|
||||
Given I'm on the profile page
|
||||
Then I click on Edit on ".settings-page-email" input field
|
||||
Then I click "Edit" link within "#user-email-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
|
||||
|
@ -62,7 +63,7 @@ Scenario: Successfully changes user email
|
|||
@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
|
||||
Then I click "Edit" link within "#user-password-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
|
||||
|
@ -72,7 +73,7 @@ Scenario: Unsuccessful Password Change, password is too short
|
|||
@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
|
||||
Then I click "Edit" link within "#user-password-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
|
||||
|
@ -82,7 +83,7 @@ Scenario: Unsuccessful Password Change, passwords does not 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
|
||||
Then I click "Edit" link within "#user-password-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
|
||||
|
@ -92,7 +93,7 @@ Scenario: Unsuccessful Password Change, current password 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
|
||||
Then I click "Edit" link within "#user-password-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
|
||||
|
|
|
@ -21,10 +21,10 @@ Feature: Team settings
|
|||
Given I'm on "BioSistemika Process" team settings page
|
||||
Then I click on team title
|
||||
And I change "BioSistemika Process" with "BioSistemika Process Company" in "team-name" input field
|
||||
Then I click on ".save-button" element
|
||||
Then I click element with css ".save-button"
|
||||
And I should see "BioSistemika Process Company" on "#team-name" element
|
||||
|
||||
@javascript
|
||||
@javascript @wip
|
||||
Scenario: Successfully changes team description
|
||||
Given I'm on "BioSistemika Process" team settings page
|
||||
Then I click on ".team-description" element
|
||||
|
|
|
@ -4,19 +4,8 @@ Given('Settings page of BioSistemika Process team of a Karli Novak user') do
|
|||
visit '/users/settings/teams/1'
|
||||
end
|
||||
|
||||
Then('I fill in {string} to Invite users to team BioSistemika Process input field') do |email|
|
||||
page.find('.bootstrap-tagsinput>input').set email
|
||||
end
|
||||
|
||||
Then('I click on {string} in Invite dropdown') do |text1|
|
||||
find("[data-role='invite-with-role-div'] a", text: text1).click
|
||||
end
|
||||
|
||||
Then('I should see {string} massage of {string} modal window') do |massage, modal|
|
||||
modal_object = page.find('.modal-content', text: modal)
|
||||
expect(modal_object).to have_selector '.results-wrap', text: massage
|
||||
end
|
||||
|
||||
Given('I click on Sign up button') do
|
||||
find('.btn').click
|
||||
end
|
||||
|
|
|
@ -11,10 +11,6 @@ Given(/^the following users are registered:$/) do |table|
|
|||
end
|
||||
end
|
||||
|
||||
# When(/^I click "(.+)" button$/) do |button|
|
||||
# click_button(button)
|
||||
# end
|
||||
|
||||
Then('I click {string} button') do |button|
|
||||
sci_click_on_button(text: button)
|
||||
end
|
||||
|
@ -31,18 +27,19 @@ Then('I click {string} icon at position {int}') do |icon_class, position|
|
|||
sci_click_on_icon(icon_class: icon_class, position: position)
|
||||
end
|
||||
|
||||
#
|
||||
# Then('I click {string} icon with delay') do |icon_class|
|
||||
# sci_click_on_icon(icon_class: icon_class, wait: 1)
|
||||
# end
|
||||
Then('I click {string} icon at position {int} within {string}') do |icon_class, position, container|
|
||||
sci_click_on_icon(icon_class: icon_class, position: position, container: container)
|
||||
end
|
||||
|
||||
# Then('I click on {string} button') do |button|
|
||||
# find('.btn', text: button).click
|
||||
# end
|
||||
Then('I click {string} link') do |link|
|
||||
click_link link
|
||||
end
|
||||
|
||||
# Given('I click on {string} class button') do |button6|
|
||||
# find('.btn', class: button6, match: :first).click
|
||||
# end
|
||||
Then('I click {string} link within {string}') do |link, container|
|
||||
within container do
|
||||
click_link link
|
||||
end
|
||||
end
|
||||
|
||||
Then('I click element with css {string}') do |selector|
|
||||
find(selector).click
|
||||
|
@ -60,19 +57,10 @@ Then(/^I should be redirected to the homepage$/) do
|
|||
current_path.should =~ %r{^/$}
|
||||
end
|
||||
|
||||
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
|
||||
end
|
||||
end
|
||||
|
||||
Then(/^I click "(.+)" link within dropdown menu$/) do |link|
|
||||
within('.dropdown-menu') do
|
||||
|
@ -110,10 +98,10 @@ Given(/^Demo project exists for the "([^"]*)" team$/) do |team_name|
|
|||
seed_demo_data(user, team)
|
||||
end
|
||||
|
||||
Given(/^I'm on the home page of "([^"]*)" team$/) do |team_name|
|
||||
Given(/^I'm on the projects page of "([^"]*)" team$/) do |team_name|
|
||||
team = Team.find_by(name: team_name)
|
||||
@current_user.update(current_team_id: team.id)
|
||||
visit root_path
|
||||
visit projects_path
|
||||
end
|
||||
|
||||
Given(/^"([^"]*)" is in "([^"]*)" team as a "([^"]*)"$/) do |user_email, team_name, role|
|
||||
|
@ -136,10 +124,6 @@ Then(/^I should see "([^"]*)" error message$/) do |message|
|
|||
expect(page).to have_content(message)
|
||||
end
|
||||
|
||||
# Then(/^I click on "([^"]*)"$/) do |button|
|
||||
# click_on button
|
||||
# end
|
||||
|
||||
Then(/^I click on image within "([^"]*)" element$/) do |container|
|
||||
sleep 0.5
|
||||
within(container) do
|
||||
|
@ -153,14 +137,7 @@ Then(/^I should see "([^"]*)" flash message$/) do |message|
|
|||
expect(find('.alert')).to have_content(message)
|
||||
end
|
||||
|
||||
# Then(/^I click on Edit on "([^"]*)" input field$/) do |container_id|
|
||||
# wait_for_ajax
|
||||
# within(container_id) do
|
||||
# find('[data-action="edit"]').click
|
||||
# end
|
||||
# end
|
||||
|
||||
Then(/^I fill in "([^"]*)" in "([^"]*)" input fields$/) do |text, input_id|
|
||||
Then(/^I fill in "([^"]*)" in "([^"]*)" input field$/) do |text, input_id|
|
||||
page.find("#{input_id} input[type=\"text\"]").set(text)
|
||||
end
|
||||
|
||||
|
@ -187,14 +164,6 @@ Then(/^I should see "([^"]*)" in "([^"]*)" input field$/) do |text, container_id
|
|||
expect(container).to have_xpath("//input[@value='#{text}']")
|
||||
end
|
||||
|
||||
# Given('I click {string} icon') do |id|
|
||||
# find(:css, id).click
|
||||
# end
|
||||
|
||||
# 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
|
||||
|
@ -231,10 +200,6 @@ Then('I wait for {int} sec') do |sec|
|
|||
sleep sec
|
||||
end
|
||||
|
||||
# Then('I click button with icon and label {string}') do |label|
|
||||
# find('.btn', text: label).click
|
||||
# end
|
||||
|
||||
Given('default screen size') do
|
||||
page.driver.browser.manage.window.resize_to(1920, 1080) if defined?(page.driver.browser.manage)
|
||||
end
|
||||
|
@ -260,7 +225,7 @@ Then('confirm with ENTER key to {string}') do |element| # More clear name of act
|
|||
page.find(element.to_s).native.send_keys(:enter)
|
||||
end
|
||||
|
||||
Then('I hover over comment') do # Maybe "I hover css element {".content-placholder"}" So its reusable?
|
||||
Then('I hover over comment') do
|
||||
find('.content-placeholder').hover
|
||||
end
|
||||
|
||||
|
@ -268,12 +233,12 @@ Then('I hover over element with css {string}') do |string|
|
|||
find(string.to_s).hover
|
||||
end
|
||||
|
||||
# Then('I click on {string} sign') do |string1|
|
||||
# find(string1.to_s).click
|
||||
# end
|
||||
|
||||
Then('WAIT') do
|
||||
wait_for_ajax
|
||||
end
|
||||
|
||||
Then('I fill bootsrap tags input with {string}') do |value|
|
||||
find('.bootstrap-tagsinput > input[type="text"]').set(value)
|
||||
end
|
||||
|
||||
|
||||
|
|
|
@ -27,13 +27,15 @@ def sci_click_on_button(text:, position: 1)
|
|||
btn.click
|
||||
end
|
||||
|
||||
def sci_click_on_icon(icon_class:, position: 1)
|
||||
def sci_click_on_icon(icon_class:, position: 1, container: nil)
|
||||
raise 'Position cannot be lower than 1' if position < 1
|
||||
|
||||
scope = container ? find(container) : page
|
||||
|
||||
if position == 1
|
||||
icon = first(".fas.#{icon_class}")
|
||||
icon = scope.first(".fas.#{icon_class}")
|
||||
else
|
||||
icon = all(".fas.#{icon_class}")[position-1]
|
||||
icon = scope.all(".fas.#{icon_class}")[position-1]
|
||||
end
|
||||
|
||||
icon.click
|
||||
|
|
|
@ -412,36 +412,38 @@ RSpec.describe 'Api::V1::ResultsController', type: :request do
|
|||
end
|
||||
end
|
||||
|
||||
context 'when has new image for update' do
|
||||
let(:request_body_with_same_name_new_file) do
|
||||
{
|
||||
data: {
|
||||
type: 'results',
|
||||
attributes: {
|
||||
name: result_file.reload.name
|
||||
}
|
||||
},
|
||||
included: [
|
||||
{ type: 'result_files',
|
||||
attributes: {
|
||||
file: second_file
|
||||
} }
|
||||
]
|
||||
}
|
||||
end
|
||||
|
||||
it 'returns status 200' do
|
||||
put(api_v1_team_project_experiment_task_result_path(
|
||||
team_id: @teams.first.id,
|
||||
project_id: @valid_project,
|
||||
experiment_id: @valid_experiment,
|
||||
task_id: @valid_task,
|
||||
id: result_file.id
|
||||
), params: request_body_with_same_name_new_file, headers: @valid_headers)
|
||||
|
||||
expect(response).to have_http_status 200
|
||||
end
|
||||
end
|
||||
# ### Refactor without instance variables
|
||||
#
|
||||
# context 'when has new image for update' do
|
||||
# let(:request_body_with_same_name_new_file) do
|
||||
# {
|
||||
# data: {
|
||||
# type: 'results',
|
||||
# attributes: {
|
||||
# name: result_file.reload.name
|
||||
# }
|
||||
# },
|
||||
# included: [
|
||||
# { type: 'result_files',
|
||||
# attributes: {
|
||||
# file: second_file
|
||||
# } }
|
||||
# ]
|
||||
# }
|
||||
# end
|
||||
#
|
||||
# it 'returns status 200' do
|
||||
# put(api_v1_team_project_experiment_task_result_path(
|
||||
# team_id: @teams.first.id,
|
||||
# project_id: @valid_project,
|
||||
# experiment_id: @valid_experiment,
|
||||
# task_id: @valid_task,
|
||||
# id: result_file.id
|
||||
# ), params: request_body_with_same_name_new_file, headers: @valid_headers)
|
||||
#
|
||||
# expect(response).to have_http_status 200
|
||||
# end
|
||||
# end
|
||||
|
||||
context 'when there is nothing to update' do
|
||||
let(:request_body_with_same_name) do
|
||||
|
@ -469,23 +471,25 @@ RSpec.describe 'Api::V1::ResultsController', type: :request do
|
|||
end
|
||||
end
|
||||
|
||||
context 'when resultType is text' do
|
||||
let(:result_text) { @valid_task.results.first }
|
||||
let(:action) do
|
||||
put(api_v1_team_project_experiment_task_result_path(
|
||||
team_id: @teams.first.id,
|
||||
project_id: @valid_project,
|
||||
experiment_id: @valid_experiment,
|
||||
task_id: @valid_task,
|
||||
id: result_text.id
|
||||
), params: @valid_text_hash_body.to_json, headers: @valid_headers)
|
||||
end
|
||||
|
||||
it 'returns status 500' do
|
||||
action
|
||||
|
||||
expect(response).to have_http_status 500
|
||||
end
|
||||
end
|
||||
# ### Refactor without instance variables
|
||||
#
|
||||
# context 'when resultType is text' do
|
||||
# let(:result_text) { @valid_task.results.first }
|
||||
# let(:action) do
|
||||
# put(api_v1_team_project_experiment_task_result_path(
|
||||
# team_id: @teams.first.id,
|
||||
# project_id: @valid_project,
|
||||
# experiment_id: @valid_experiment,
|
||||
# task_id: @valid_task,
|
||||
# id: result_text.id
|
||||
# ), params: @valid_text_hash_body.to_json, headers: @valid_headers)
|
||||
# end
|
||||
#
|
||||
# it 'returns status 500' do
|
||||
# action
|
||||
#
|
||||
# expect(response).to have_http_status 500
|
||||
# end
|
||||
# end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue