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:
authorRobert Schilling <rschilling@student.tugraz.at>2014-08-21 12:14:31 +0400
committerRobert Schilling <rschilling@student.tugraz.at>2014-09-01 13:49:17 +0400
commit0cbc19f9449ffc6e624c0b7e22ea837468658377 (patch)
treee48375611c09c38a14f45adecbe31309f308798b /features/steps/shared
parent174c00cf2c026a3bdc61d94b45195a5e5c99202f (diff)
Awesome shortcuts for GitLab
Diffstat (limited to 'features/steps/shared')
-rw-r--r--features/steps/shared/active_tab.rb20
-rw-r--r--features/steps/shared/project_tab.rb44
-rw-r--r--features/steps/shared/shortcuts.rb18
3 files changed, 82 insertions, 0 deletions
diff --git a/features/steps/shared/active_tab.rb b/features/steps/shared/active_tab.rb
index e3cd5fcfe85..c776af14e04 100644
--- a/features/steps/shared/active_tab.rb
+++ b/features/steps/shared/active_tab.rb
@@ -24,4 +24,24 @@ module SharedActiveTab
And 'no other sub navs should be active' do
page.should have_selector('div.content ul.nav-stacked-menu li.active', count: 1)
end
+
+ step 'the active main tab should be Home' do
+ ensure_active_main_tab('Activity')
+ end
+
+ step 'the active main tab should be Projects' do
+ ensure_active_main_tab('Projects')
+ end
+
+ step 'the active main tab should be Issues' do
+ ensure_active_main_tab('Issues')
+ end
+
+ step 'the active main tab should be Merge Requests' do
+ ensure_active_main_tab('Merge Requests')
+ end
+
+ step 'the active main tab should be Help' do
+ ensure_active_main_tab('Help')
+ end
end
diff --git a/features/steps/shared/project_tab.rb b/features/steps/shared/project_tab.rb
new file mode 100644
index 00000000000..00630da83a3
--- /dev/null
+++ b/features/steps/shared/project_tab.rb
@@ -0,0 +1,44 @@
+module SharedProjectTab
+ include Spinach::DSL
+ include SharedActiveTab
+
+ step 'the active main tab should be Home' do
+ ensure_active_main_tab('Activity')
+ end
+
+ step 'the active main tab should be Files' do
+ ensure_active_main_tab('Files')
+ end
+
+ step 'the active main tab should be Commits' do
+ ensure_active_main_tab('Commits')
+ end
+
+ step 'the active main tab should be Network' do
+ ensure_active_main_tab('Network')
+ end
+
+ step 'the active main tab should be Graphs' do
+ ensure_active_main_tab('Graphs')
+ end
+
+ step 'the active main tab should be Issues' do
+ ensure_active_main_tab('Issues')
+ end
+
+ step 'the active main tab should be Merge Requests' do
+ ensure_active_main_tab('Merge Requests')
+ end
+
+ step 'the active main tab should be Snippets' do
+ ensure_active_main_tab('Snippets')
+ end
+
+ step 'the active main tab should be Wiki' do
+ ensure_active_main_tab('Wiki')
+ end
+
+ step 'the active main tab should be Settings' do
+ ensure_active_main_tab('Settings')
+ end
+end
diff --git a/features/steps/shared/shortcuts.rb b/features/steps/shared/shortcuts.rb
new file mode 100644
index 00000000000..bbb7afec0ad
--- /dev/null
+++ b/features/steps/shared/shortcuts.rb
@@ -0,0 +1,18 @@
+module SharedActiveTab
+ include Spinach::DSL
+
+ step 'I press "g" and "p"' do
+ find('body').native.send_key('g')
+ find('body').native.send_key('p')
+ end
+
+ step 'I press "g" and "i"' do
+ find('body').native.send_key('g')
+ find('body').native.send_key('i')
+ end
+
+ step 'I press "g" and "m"' do
+ find('body').native.send_key('g')
+ find('body').native.send_key('m')
+ end
+end