summaryrefslogtreecommitdiff
path: root/features
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2017-09-11 13:10:50 +0000
committerRémy Coutable <remy@rymai.me>2017-09-11 13:10:50 +0000
commitb22a48d5371887eaa32f286dced8cc8f16d29b55 (patch)
treecc6f5a30356632fc6c262ce5cd01c56a1deb8717 /features
parentc20c6982655a8e245fe15e48bc39baa311bd26f2 (diff)
parent3525d5df65d2b1215bb08d5efa4aec86c4a26dc1 (diff)
downloadgitlab-ce-b22a48d5371887eaa32f286dced8cc8f16d29b55.tar.gz
Merge branch 'replace_emails.feature' into 'master'
Replace the 'profile/emails.feature' spinach test with an rspec analog See merge request !14172
Diffstat (limited to 'features')
-rw-r--r--features/profile/emails.feature26
-rw-r--r--features/steps/profile/emails.rb48
2 files changed, 0 insertions, 74 deletions
diff --git a/features/profile/emails.feature b/features/profile/emails.feature
deleted file mode 100644
index 19ed949f6ae..00000000000
--- a/features/profile/emails.feature
+++ /dev/null
@@ -1,26 +0,0 @@
-@profile
-Feature: Profile Emails
- Background:
- Given I sign in as a user
- And I visit profile emails page
-
- Scenario: I should see emails
- Then I should see my emails
-
- Scenario: Add new email
- Given I submit new email "my@email.com"
- Then I should see new email "my@email.com"
- And I should see my emails
-
- Scenario: Add duplicate email
- Given I submit duplicate email @user.email
- Then I should not have @user.email added
- And I should see my emails
-
- Scenario: Remove email
- Given I submit new email "my@email.com"
- Then I should see new email "my@email.com"
- And I should see my emails
- Then I click link "Remove" for "my@email.com"
- Then I should not see email "my@email.com"
- And I should see my emails
diff --git a/features/steps/profile/emails.rb b/features/steps/profile/emails.rb
deleted file mode 100644
index 4f44f932a6d..00000000000
--- a/features/steps/profile/emails.rb
+++ /dev/null
@@ -1,48 +0,0 @@
-class Spinach::Features::ProfileEmails < Spinach::FeatureSteps
- include SharedAuthentication
-
- step 'I visit profile emails page' do
- visit profile_emails_path
- end
-
- step 'I should see my emails' do
- expect(page).to have_content(@user.email)
- @user.emails.each do |email|
- expect(page).to have_content(email.email)
- end
- end
-
- step 'I submit new email "my@email.com"' do
- fill_in "email_email", with: "my@email.com"
- click_button "Add"
- end
-
- step 'I should see new email "my@email.com"' do
- email = @user.emails.find_by(email: "my@email.com")
- expect(email).not_to be_nil
- expect(page).to have_content("my@email.com")
- end
-
- step 'I should not see email "my@email.com"' do
- email = @user.emails.find_by(email: "my@email.com")
- expect(email).to be_nil
- expect(page).not_to have_content("my@email.com")
- end
-
- step 'I click link "Remove" for "my@email.com"' do
- # there should only be one remove button at this time
- click_link "Remove"
- # force these to reload as they have been cached
- @user.emails.reload
- end
-
- step 'I submit duplicate email @user.email' do
- fill_in "email_email", with: @user.email
- click_button "Add"
- end
-
- step 'I should not have @user.email added' do
- email = @user.emails.find_by(email: @user.email)
- expect(email).to be_nil
- end
-end