summaryrefslogtreecommitdiff
path: root/features/steps/shared
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2017-09-05 11:33:09 -0700
committerStan Hu <stanhu@gmail.com>2017-09-05 11:33:09 -0700
commit41e5ec8f74d9909050d54ae957b09a812a398c8e (patch)
tree8d07352840703d1421e53c2e8a595cd4da049842 /features/steps/shared
parentf045903541ace5cf4fd3c6e4a05ecfd264c1c621 (diff)
parent685066cd0e4bb9c2279c1ed43ae445d07c963743 (diff)
downloadgitlab-ce-41e5ec8f74d9909050d54ae957b09a812a398c8e.tar.gz
Merge branch 'master' into sh-headless-chrome-support
Diffstat (limited to 'features/steps/shared')
-rw-r--r--features/steps/shared/active_tab.rb8
-rw-r--r--features/steps/shared/group.rb4
-rw-r--r--features/steps/shared/note.rb7
-rw-r--r--features/steps/shared/project_tab.rb4
4 files changed, 13 insertions, 10 deletions
diff --git a/features/steps/shared/active_tab.rb b/features/steps/shared/active_tab.rb
index af5db05e9e8..2bb21a798aa 100644
--- a/features/steps/shared/active_tab.rb
+++ b/features/steps/shared/active_tab.rb
@@ -7,11 +7,11 @@ module SharedActiveTab
end
def ensure_active_main_tab(content)
- expect(find('.layout-nav li.active')).to have_content(content)
+ expect(find('.sidebar-top-level-items > li.active')).to have_content(content)
end
def ensure_active_sub_tab(content)
- expect(find('.sub-nav li.active')).to have_content(content)
+ expect(find('.sidebar-sub-level-items > li.active')).to have_content(content)
end
def ensure_active_sub_nav(content)
@@ -19,11 +19,11 @@ module SharedActiveTab
end
step 'no other main tabs should be active' do
- expect(page).to have_selector('.layout-nav .nav-links > li.active', count: 1)
+ expect(page).to have_selector('.sidebar-top-level-items > li.active', count: 1)
end
step 'no other sub tabs should be active' do
- expect(page).to have_selector('.sub-nav li.active', count: 1)
+ expect(page).to have_selector('.sidebar-sub-level-items > li.active', count: 1)
end
step 'no other sub navs should be active' do
diff --git a/features/steps/shared/group.rb b/features/steps/shared/group.rb
index de119f2c6c0..03bc7e798e0 100644
--- a/features/steps/shared/group.rb
+++ b/features/steps/shared/group.rb
@@ -36,14 +36,12 @@ module SharedGroup
protected
def is_member_of(username, groupname, role)
- @project_count ||= 0
user = User.find_by(name: username) || create(:user, name: username)
group = Group.find_by(name: groupname) || create(:group, name: groupname)
group.add_user(user, role)
- project ||= create(:project, :repository, namespace: group, path: "project#{@project_count}")
+ project ||= create(:project, :repository, namespace: group)
create(:closed_issue_event, project: project)
project.team << [user, :master]
- @project_count += 1
end
def owned_group
diff --git a/features/steps/shared/note.rb b/features/steps/shared/note.rb
index 92f442db646..95f0cd2156e 100644
--- a/features/steps/shared/note.rb
+++ b/features/steps/shared/note.rb
@@ -137,7 +137,7 @@ module SharedNote
step 'The comment with the header should not have an ID' do
page.within(".note-body > .note-text") do
- expect(page).to have_content("Comment with a header")
+ expect(page).to have_content("Comment with a header")
expect(page).not_to have_css("#comment-with-a-header")
end
end
@@ -150,15 +150,20 @@ module SharedNote
note.find('.js-note-edit').click
end
+ page.find('.current-note-edit-form textarea')
+
page.within(".current-note-edit-form") do
fill_in 'note[note]', with: '+1 Awesome!'
click_button 'Save comment'
end
+ wait_for_requests
end
step 'I should see +1 in the description' do
page.within(".note") do
expect(page).to have_content("+1 Awesome!")
end
+
+ wait_for_requests
end
end
diff --git a/features/steps/shared/project_tab.rb b/features/steps/shared/project_tab.rb
index 901f7f76ee9..5a516ee33bc 100644
--- a/features/steps/shared/project_tab.rb
+++ b/features/steps/shared/project_tab.rb
@@ -5,7 +5,7 @@ module SharedProjectTab
include SharedActiveTab
step 'the active main tab should be Project' do
- ensure_active_main_tab('Project')
+ ensure_active_main_tab('Overview')
end
step 'the active main tab should be Repository' do
@@ -53,7 +53,7 @@ module SharedProjectTab
end
step 'the active sub tab should be Home' do
- ensure_active_sub_tab('Home')
+ ensure_active_sub_tab('Details')
end
step 'the active sub tab should be Activity' do