diff options
author | Annabel Dunstone Gray <annabel.dunstone@gmail.com> | 2017-05-08 15:08:39 -0500 |
---|---|---|
committer | Annabel Dunstone Gray <annabel.dunstone@gmail.com> | 2017-05-12 09:27:05 -0500 |
commit | 0278b912038b1c70f289ab915c4d0752f9aff4b0 (patch) | |
tree | 421c38333ef5ed4256a531f0264abf75e0d6a86f /spec/features | |
parent | 94919b472425a7149f85cab0f3990e2f16d57c39 (diff) | |
download | gitlab-ce-0278b912038b1c70f289ab915c4d0752f9aff4b0.tar.gz |
Fix specs
Diffstat (limited to 'spec/features')
-rw-r--r-- | spec/features/dashboard/group_spec.rb | 2 | ||||
-rw-r--r-- | spec/features/profiles/preferences_spec.rb | 2 | ||||
-rw-r--r-- | spec/features/projects/wiki/markdown_preview_spec.rb | 8 | ||||
-rw-r--r-- | spec/features/projects/wiki/user_creates_wiki_page_spec.rb | 4 | ||||
-rw-r--r-- | spec/features/search_spec.rb | 4 | ||||
-rw-r--r-- | spec/features/todos/todos_spec.rb | 6 | ||||
-rw-r--r-- | spec/features/user_callout_spec.rb | 2 |
7 files changed, 14 insertions, 14 deletions
diff --git a/spec/features/dashboard/group_spec.rb b/spec/features/dashboard/group_spec.rb index 1d4b86ed4b4..8e20fdec8ad 100644 --- a/spec/features/dashboard/group_spec.rb +++ b/spec/features/dashboard/group_spec.rb @@ -7,7 +7,7 @@ RSpec.describe 'Dashboard Group', feature: true do it 'creates new group', js: true do visit dashboard_groups_path - click_link 'New group' + find('.btn-new').trigger('click') new_path = 'Samurai' new_description = 'Tokugawa Shogunate' diff --git a/spec/features/profiles/preferences_spec.rb b/spec/features/profiles/preferences_spec.rb index 15c8677fcd3..d368bc4d753 100644 --- a/spec/features/profiles/preferences_spec.rb +++ b/spec/features/profiles/preferences_spec.rb @@ -44,7 +44,7 @@ describe 'Profile > Preferences', feature: true do expect(page.current_path).to eq starred_dashboard_projects_path end - click_link 'Your projects' + find('.shortcuts-activity').trigger('click') expect(page).not_to have_content("You don't have starred projects yet") expect(page.current_path).to eq dashboard_projects_path diff --git a/spec/features/projects/wiki/markdown_preview_spec.rb b/spec/features/projects/wiki/markdown_preview_spec.rb index 43d8b45669e..49d7ef09e64 100644 --- a/spec/features/projects/wiki/markdown_preview_spec.rb +++ b/spec/features/projects/wiki/markdown_preview_spec.rb @@ -17,14 +17,14 @@ feature 'Projects > Wiki > User previews markdown changes', feature: true, js: t login_as(user) visit namespace_project_path(project.namespace, project) - click_link 'Wiki' + find('.shortcuts-wiki').trigger('click') WikiPages::CreateService.new(project, user, title: 'home', content: 'Home page').execute end context "while creating a new wiki page" do context "when there are no spaces or hyphens in the page name" do it "rewrites relative links as expected" do - click_link 'New page' + find('.add-new-wiki').trigger('click') page.within '#modal-new-wiki' do fill_in :new_wiki_path, with: 'a/b/c/d' click_button 'Create page' @@ -73,7 +73,7 @@ feature 'Projects > Wiki > User previews markdown changes', feature: true, js: t fill_in :new_wiki_path, with: 'a-page/b-page/c-page/d-page' click_button 'Create page' end - + page.within '.wiki-form' do fill_in :wiki_content, with: wiki_content click_on "Preview" @@ -91,7 +91,7 @@ feature 'Projects > Wiki > User previews markdown changes', feature: true, js: t context "while editing a wiki page" do def create_wiki_page(path) - click_link 'New page' + find('.add-new-wiki').trigger('click') page.within '#modal-new-wiki' do fill_in :new_wiki_path, with: path diff --git a/spec/features/projects/wiki/user_creates_wiki_page_spec.rb b/spec/features/projects/wiki/user_creates_wiki_page_spec.rb index 1ffac8cd542..5c502ce4fb5 100644 --- a/spec/features/projects/wiki/user_creates_wiki_page_spec.rb +++ b/spec/features/projects/wiki/user_creates_wiki_page_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -feature 'Projects > Wiki > User creates wiki page', feature: true do +feature 'Projects > Wiki > User creates wiki page', js: true, feature: true do let(:user) { create(:user) } background do @@ -8,7 +8,7 @@ feature 'Projects > Wiki > User creates wiki page', feature: true do login_as(user) visit namespace_project_path(project.namespace, project) - click_link 'Wiki' + find('.shortcuts-wiki').trigger('click') end context 'in the user namespace' do diff --git a/spec/features/search_spec.rb b/spec/features/search_spec.rb index f2866d071dc..3b04435e385 100644 --- a/spec/features/search_spec.rb +++ b/spec/features/search_spec.rb @@ -27,7 +27,7 @@ describe "Search", feature: true do end it 'shows group name after filtering' do - find('.js-search-group-dropdown').click + find('.js-search-group-dropdown').trigger('click') wait_for_ajax page.within '.search-holder' do @@ -57,7 +57,7 @@ describe "Search", feature: true do it 'shows project name after filtering' do page.within('.project-filter') do - find('.js-search-project-dropdown').click + find('.js-search-project-dropdown').trigger('click') wait_for_ajax click_link project.name_with_namespace diff --git a/spec/features/todos/todos_spec.rb b/spec/features/todos/todos_spec.rb index be5b3af417f..55b3e3d9424 100644 --- a/spec/features/todos/todos_spec.rb +++ b/spec/features/todos/todos_spec.rb @@ -251,7 +251,7 @@ describe 'Dashboard Todos', feature: true do describe 'mark all as done', js: true do before do visit dashboard_todos_path - click_link 'Mark all as done' + find('.js-todos-mark-all').trigger('click') end it 'shows "All done" message!' do @@ -308,9 +308,9 @@ describe 'Dashboard Todos', feature: true do end def mark_all_and_undo - click_link 'Mark all as done' + find('.js-todos-mark-all').trigger('click') wait_for_ajax - click_link 'Undo mark all as done' + find('.js-todos-undo-all').trigger('click') wait_for_ajax end end diff --git a/spec/features/user_callout_spec.rb b/spec/features/user_callout_spec.rb index 848af5e3a4d..b84f834ff1e 100644 --- a/spec/features/user_callout_spec.rb +++ b/spec/features/user_callout_spec.rb @@ -20,7 +20,7 @@ describe 'User Callouts', js: true do visit dashboard_projects_path within('.user-callout') do - find('.close').click + find('.close').trigger('click') end visit dashboard_projects_path |