Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCiro Santilli <ciro.santilli@gmail.com>2014-09-22 01:40:22 +0400
committerCiro Santilli <ciro.santilli@gmail.com>2014-09-22 12:01:50 +0400
commitef6e94e37e0fce23acf32992476aeb63405be0c1 (patch)
tree3cfce6b15bab68f2213850672872de2ce420bae3 /features/steps/profile
parentfda61a047ffb9b04bc4dd38e897088fde17fb3c1 (diff)
Replace old spinach step definitions with step.
Diffstat (limited to 'features/steps/profile')
-rw-r--r--features/steps/profile/active_tab.rb10
-rw-r--r--features/steps/profile/emails.rb16
-rw-r--r--features/steps/profile/ssh_keys.rb18
3 files changed, 22 insertions, 22 deletions
diff --git a/features/steps/profile/active_tab.rb b/features/steps/profile/active_tab.rb
index 1924a6fa785..f903d73c2ec 100644
--- a/features/steps/profile/active_tab.rb
+++ b/features/steps/profile/active_tab.rb
@@ -3,23 +3,23 @@ class ProfileActiveTab < Spinach::FeatureSteps
include SharedPaths
include SharedActiveTab
- Then 'the active main tab should be Home' do
+ step 'the active main tab should be Home' do
ensure_active_main_tab('Profile')
end
- Then 'the active main tab should be Account' do
+ step 'the active main tab should be Account' do
ensure_active_main_tab('Account')
end
- Then 'the active main tab should be SSH Keys' do
+ step 'the active main tab should be SSH Keys' do
ensure_active_main_tab('SSH Keys')
end
- Then 'the active main tab should be Design' do
+ step 'the active main tab should be Design' do
ensure_active_main_tab('Design')
end
- Then 'the active main tab should be History' do
+ step 'the active main tab should be History' do
ensure_active_main_tab('History')
end
end
diff --git a/features/steps/profile/emails.rb b/features/steps/profile/emails.rb
index 99588c85991..d4fb1ecc79c 100644
--- a/features/steps/profile/emails.rb
+++ b/features/steps/profile/emails.rb
@@ -1,47 +1,47 @@
class ProfileEmails < Spinach::FeatureSteps
include SharedAuthentication
- Then 'I visit profile emails page' do
+ step 'I visit profile emails page' do
visit profile_emails_path
end
- Then 'I should see my emails' do
+ step 'I should see my emails' do
page.should have_content(@user.email)
@user.emails.each do |email|
page.should have_content(email.email)
end
end
- And 'I submit new email "my@email.com"' do
+ step 'I submit new email "my@email.com"' do
fill_in "email_email", with: "my@email.com"
click_button "Add"
end
- Then 'I should see new email "my@email.com"' do
+ step 'I should see new email "my@email.com"' do
email = @user.emails.find_by(email: "my@email.com")
email.should_not be_nil
page.should have_content("my@email.com")
end
- Then 'I should not see email "my@email.com"' do
+ step 'I should not see email "my@email.com"' do
email = @user.emails.find_by(email: "my@email.com")
email.should be_nil
page.should_not have_content("my@email.com")
end
- Then 'I click link "Remove" for "my@email.com"' do
+ 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
- And 'I submit duplicate email @user.email' do
+ step 'I submit duplicate email @user.email' do
fill_in "email_email", with: @user.email
click_button "Add"
end
- Then 'I should not have @user.email added' do
+ step 'I should not have @user.email added' do
email = @user.emails.find_by(email: @user.email)
email.should be_nil
end
diff --git a/features/steps/profile/ssh_keys.rb b/features/steps/profile/ssh_keys.rb
index 65ca824bb5b..8522d131b1e 100644
--- a/features/steps/profile/ssh_keys.rb
+++ b/features/steps/profile/ssh_keys.rb
@@ -1,48 +1,48 @@
class ProfileSshKeys < Spinach::FeatureSteps
include SharedAuthentication
- Then 'I should see my ssh keys' do
+ step 'I should see my ssh keys' do
@user.keys.each do |key|
page.should have_content(key.title)
end
end
- Given 'I click link "Add new"' do
+ step 'I click link "Add new"' do
click_link "Add SSH Key"
end
- And 'I submit new ssh key "Laptop"' do
+ step 'I submit new ssh key "Laptop"' do
fill_in "key_title", with: "Laptop"
fill_in "key_key", with: "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAzrEJUIR6Y03TCE9rIJ+GqTBvgb8t1jI9h5UBzCLuK4VawOmkLornPqLDrGbm6tcwM/wBrrLvVOqi2HwmkKEIecVO0a64A4rIYScVsXIniHRS6w5twyn1MD3sIbN+socBDcaldECQa2u1dI3tnNVcs8wi77fiRe7RSxePsJceGoheRQgC8AZ510UdIlO+9rjIHUdVN7LLyz512auAfYsgx1OfablkQ/XJcdEwDNgi9imI6nAXhmoKUm1IPLT2yKajTIC64AjLOnE0YyCh6+7RFMpiMyu1qiOCpdjYwTgBRiciNRZCH8xIedyCoAmiUgkUT40XYHwLuwiPJICpkAzp7Q== user@laptop"
click_button "Add key"
end
- Then 'I should see new ssh key "Laptop"' do
+ step 'I should see new ssh key "Laptop"' do
key = Key.find_by(title: "Laptop")
page.should have_content(key.title)
page.should have_content(key.key)
current_path.should == profile_key_path(key)
end
- Given 'I click link "Work"' do
+ step 'I click link "Work"' do
click_link "Work"
end
- And 'I click link "Remove"' do
+ step 'I click link "Remove"' do
click_link "Remove"
end
- Then 'I visit profile keys page' do
+ step 'I visit profile keys page' do
visit profile_keys_path
end
- And 'I should not see "Work" ssh key' do
+ step 'I should not see "Work" ssh key' do
within "#keys-table" do
page.should_not have_content "Work"
end
end
- And 'I have ssh key "ssh-rsa Work"' do
+ step 'I have ssh key "ssh-rsa Work"' do
create(:key, user: @user, title: "ssh-rsa Work", key: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC+L3TbFegm3k8QjejSwemk4HhlRh+DuN679Pc5ckqE/MPhVtE/+kZQDYCTB284GiT2aIoGzmZ8ee9TkaoejAsBwlA+Wz2Q3vhz65X6sMgalRwpdJx8kSEUYV8ZPV3MZvPo8KdNg993o4jL6G36GDW4BPIyO6FPZhfsawdf6liVD0Xo5kibIK7B9VoE178cdLQtLpS2YolRwf5yy6XR6hbbBGQR+6xrGOdP16eGZDb1CE2bMvvJijjloFqPscGktWOqW+nfh5txwFfBzlfARDTBsS8WZtg3Yoj1kn33kPsWRlgHfNutFRAIynDuDdQzQq8tTtVwm+Yi75RfcPHW8y3P Work")
end
end