diff options
Diffstat (limited to 'spec/features/dashboard/issues_spec.rb')
-rw-r--r-- | spec/features/dashboard/issues_spec.rb | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/spec/features/dashboard/issues_spec.rb b/spec/features/dashboard/issues_spec.rb index 9957bec0f0b..b168cd5f7c5 100644 --- a/spec/features/dashboard/issues_spec.rb +++ b/spec/features/dashboard/issues_spec.rb @@ -1,6 +1,6 @@ -require 'spec_helper' +require "spec_helper" -RSpec.describe 'Dashboard Issues' do +RSpec.describe "Dashboard Issues" do include FilteredSearchHelpers let(:current_user) { create :user } @@ -19,14 +19,14 @@ RSpec.describe 'Dashboard Issues' do visit issues_dashboard_path(assignee_username: current_user.username) end - describe 'issues' do - it 'shows issues assigned to current user' do + describe "issues" do + it "shows issues assigned to current user" do expect(page).to have_content(assigned_issue.title) expect(page).not_to have_content(authored_issue.title) expect(page).not_to have_content(other_issue.title) end - it 'shows issues when current user is author', :js do + it "shows issues when current user is author", :js do reset_filters input_filtered_search("author:#{current_user.to_reference}") @@ -36,45 +36,45 @@ RSpec.describe 'Dashboard Issues' do expect(page).not_to have_content(other_issue.title) end - it 'state filter tabs work' do - find('#state-closed').click - expect(page).to have_current_path(issues_dashboard_url(assignee_username: current_user.username, state: 'closed'), url: true) + it "state filter tabs work" do + find("#state-closed").click + expect(page).to have_current_path(issues_dashboard_url(assignee_username: current_user.username, state: "closed"), url: true) end it_behaves_like "it has an RSS button with current_user's feed token" it_behaves_like "an autodiscoverable RSS feed with current_user's feed token" end - describe 'new issue dropdown' do - it 'shows projects only with issues feature enabled', :js do - find('.new-project-item-select-button').click + describe "new issue dropdown" do + it "shows projects only with issues feature enabled", :js do + find(".new-project-item-select-button").click - page.within('.select2-results') do + page.within(".select2-results") do expect(page).to have_content(project.full_name) expect(page).not_to have_content(project_with_issues_disabled.full_name) end end - it 'shows the new issue page', :js do - find('.new-project-item-select-button').click + it "shows the new issue page", :js do + find(".new-project-item-select-button").click wait_for_requests project_path = "/#{project.full_path}" - project_json = { name: project.full_name, url: project_path }.to_json + project_json = {name: project.full_name, url: project_path}.to_json # simulate selection, and prevent overlap by dropdown menu - first('.project-item-select', visible: false) + first(".project-item-select", visible: false) execute_script("$('.project-item-select').val('#{project_json}').trigger('change');") - find('#select2-drop-mask', visible: false) + find("#select2-drop-mask", visible: false) execute_script("$('#select2-drop-mask').remove();") - find('.new-project-item-link').click + find(".new-project-item-link").click expect(page).to have_current_path("#{project_path}/issues/new") - page.within('#content-body') do - expect(page).to have_selector('.issue-form') + page.within("#content-body") do + expect(page).to have_selector(".issue-form") end end end |