diaspora/features/desktop/change_settings.feature
Sage Ross df4504979e
Refactor "I scroll" web step to avoid using execute_script
The apparition driver does not support "scroll_by" without going through "execute_script", but we can better express the intention of this test and make the scrolling action a bit more general by replacing "scroll a bit" with "scroll to [some element]" — in this case, we need to scroll until the "Change" button is visible so that we can press it.

This change_settings.feature spec is the only place that used "I scroll a bit".
2022-06-19 19:29:57 +02:00

62 lines
2.3 KiB
Gherkin

@javascript
Feature: Change settings
Background:
Given I am signed in
And I have following aspects:
| Friends |
| Family |
When I go to the edit user page
Scenario: Change my email
When I fill in the following:
| user_email | new_email@newplac.es |
And I press "Change email"
Then I should see "Email changed"
And I follow the "confirm_email" link from the last sent email
Then I should see "activated"
And my "email" should be "new_email@newplac.es"
Scenario: Change my email preferences
When I uncheck "user_email_preferences_mentioned"
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 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
Scenario: Change my preferred language
When I select "polski" from "user_language"
And I press "Change language"
Then I should see "Język został zmieniony"
And "polski" should be selected from "user_language"
Scenario: Change my post default aspects
When I go to the stream page
And I expand the publisher
Then I should see "All aspects" within ".aspect-dropdown"
When I go to the edit user page
And I press the aspect dropdown
And I toggle the aspect "Family"
And I press the aspect dropdown
And I press "Change" within "#post-default-aspects"
And I go to the stream page
And I expand the publisher
Then I should see "Family" within ".aspect-dropdown"
Scenario: Change my post default to public
When I press the aspect dropdown
And I toggle the aspect "Public"
And I press "Change" within "#post-default-aspects"
And I go to the stream page
And I expand the publisher
Then I should see "Public" within ".aspect-dropdown"
Scenario: exporting profile data
When I click on the first selector ".account-data a"
Then I should see "Download my profile"
And I should have 1 email delivery