edit_profile.feature
3.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
Feature: edit profile
  Background:
    Given the following users
      | login   |
      | joao    |
    Given I am logged in as "joao"
  Scenario: Warn about invalid birth date when active
    Given the following person fields are active fields
      | display_name |
      | birth_date |
    When I go to joao's control panel
    And I follow "Edit Profile"
    And I select "November" from "profile_data_birth_date_2i"
    And I select "15" from "profile_data_birth_date_3i"
    And I press "Save"
    Then I should see "Birth date is invalid"
    And I should not see "Birth date can't be blank"
  Scenario: Warn about invalid birth date when required
    Given the following person fields are required fields
      | display_name |
      | birth_date |
    When I go to joao's control panel
    And I follow "Edit Profile"
    And I select "November" from "profile_data_birth_date_2i"
    And I select "15" from "profile_data_birth_date_3i"
    And I press "Save"
    Then I should see "Birth date is invalid"
    And I should not see "Birth date can't be blank"
  Scenario: Not warn if birth date is valid when active
    Given the following person fields are active fields
      | display_name |
      | birth_date |
    When I go to joao's control panel
    And I follow "Edit Profile"
    And I select "November" from "profile_data_birth_date_2i"
    And I select "15" from "profile_data_birth_date_3i"
    And I select "1980" from "profile_data_birth_date_1i"
    And I press "Save"
    Then I should not see "Birth date is invalid"
    And I should not see "Birth date is mandatory"
  Scenario: Not warn if birth date is valid when required
    Given the following person fields are required fields
      | display_name |
      | birth_date |
    When I go to joao's control panel
    And I follow "Edit Profile"
    And I select "November" from "profile_data_birth_date_2i"
    And I select "15" from "profile_data_birth_date_3i"
    And I select "1980" from "profile_data_birth_date_1i"
    And I press "Save"
    Then I should not see "Birth date is invalid"
    And I should not see "Birth date is mandatory"
  @selenium
  Scenario: Alert about url change
    Given the following community
      | identifier | name | owner |
      | o-rappa | O Rappa | joao  |
    And feature "enable_organization_url_change" is enabled on environment
    When I go to o-rappa's control panel
    And I follow "Community Info and settings"
    And I should not see "identifier-change-confirmation"
    When I fill in "Address" with "banda-o-rappa"
    And I should see "identifier-change-confirmation"
  @selenium
  Scenario: Confirm url change
    Given the following community
      | identifier | name | owner |
      | o-rappa | O Rappa | joao  |
    And feature "enable_organization_url_change" is enabled on environment
    When I go to o-rappa's control panel
    And I follow "Community Info and settings"
    When I fill in "Address" with "banda-o-rappa"
    Then I should see "identifier-change-confirmation"
    When I follow "Yes"
    Then "identifier-change-confirmation" should not be visible within "profile-identifier-formitem"
  @selenium
  Scenario: Cancel url change
    Given the following community
      | identifier | name | owner |
      | o-rappa | O Rappa | joao  |
    And feature "enable_organization_url_change" is enabled on environment
    When I go to o-rappa's control panel
    And I follow "Community Info and settings"
    When I fill in "Address" with "banda-o-rappa"
    Then I should see "identifier-change-confirmation"
    When I follow "No"
    Then "identifier-change-confirmation" should not be visible within "profile-identifier-formitem"