Skip to content

Commit

Permalink
Notification settings: fix cucumber tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cmrd-senya committed Jul 23, 2022
1 parent 1c4a897 commit dede976
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions features/desktop/change_settings.feature
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ Feature: Change settings
And my "email" should be "new_email@newplac.es"

Scenario: Change my email preferences
When I uncheck "user_email_preferences_mentioned"
When I uncheck "user_email_preferences_mentioned_mail"
And I scroll to "change_email_preferences"
And I press "change_email_preferences"
Then I should see "Email notifications changed"
And the "user_email_preferences_mentioned" checkbox should not be checked
When I uncheck "user_email_preferences_mentioned_in_comment"
And the "user_email_preferences_mentioned_mail" checkbox should not be checked
When I uncheck "user_email_preferences_mentioned_in_comment_mail"
And I scroll to "change_email_preferences"
And I press "change_email_preferences"
Then I should see "Email notifications changed"
And the "user_email_preferences_mentioned_in_comment" checkbox should not be checked
And the "user_email_preferences_mentioned_in_comment_mail" checkbox should not be checked

Scenario: Change my preferred language
When I select "polski" from "user_language"
Expand Down
4 changes: 2 additions & 2 deletions features/step_definitions/web_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def with_scope(locator)

When /^(?:|I )uncheck "([^"]*)"(?: within "([^"]*)")?$/ do |field, selector|
with_scope(selector) do
uncheck(field)
find("label[for='#{field}']").click
end
end

Expand Down Expand Up @@ -153,7 +153,7 @@ def with_scope(locator)

Then /^the "([^"]*)" checkbox(?: within "([^"]*)")? should not be checked$/ do |label, selector|
with_scope(selector) do
expect(find_field(label)["checked"]).to be_falsey
expect(find_field(label, visible: false)["checked"]).to be_falsey
end
end

Expand Down

0 comments on commit dede976

Please sign in to comment.