Commit 5fcf475b authored by Phil Hughes's avatar Phil Hughes

Updated tests

parent d10d32a3
...@@ -7,6 +7,7 @@ Feature: Dashboard ...@@ -7,6 +7,7 @@ Feature: Dashboard
And project "Shop" has CI enabled And project "Shop" has CI enabled
And project "Shop" has CI build And project "Shop" has CI build
And project "Shop" has labels: "bug", "feature", "enhancement" And project "Shop" has labels: "bug", "feature", "enhancement"
And project "Shop" has issue: "bug report"
And I visit dashboard page And I visit dashboard page
Scenario: I should see projects list Scenario: I should see projects list
......
...@@ -88,13 +88,6 @@ Feature: Project Merge Requests ...@@ -88,13 +88,6 @@ Feature: Project Merge Requests
And I visit project "Shop" merge requests page And I visit project "Shop" merge requests page
Then The list should be sorted by "Oldest updated" Then The list should be sorted by "Oldest updated"
@javascript
Scenario: Visiting Issues after being sorted the list
Given I visit project "Shop" merge requests page
And I sort the list by "Oldest updated"
And I visit project "Shop" issues page
Then The list should be sorted by "Oldest updated"
@javascript @javascript
Scenario: Visiting Merge Requests from a differente Project after sorting Scenario: Visiting Merge Requests from a differente Project after sorting
Given I visit project "Shop" merge requests page Given I visit project "Shop" merge requests page
......
...@@ -223,6 +223,11 @@ module SharedProject ...@@ -223,6 +223,11 @@ module SharedProject
create(:label, project: project, title: 'enhancement') create(:label, project: project, title: 'enhancement')
end end
step 'project "Shop" has issue: "bug report"' do
project = Project.find_by(name: "Shop")
create(:issue, project: project, title: "bug report")
end
step 'project "Shop" has CI enabled' do step 'project "Shop" has CI enabled' do
project = Project.find_by(name: "Shop") project = Project.find_by(name: "Shop")
project.enable_ci project.enable_ci
......
...@@ -7,6 +7,7 @@ describe 'Filter issues', feature: true do ...@@ -7,6 +7,7 @@ describe 'Filter issues', feature: true do
let!(:user) { create(:user)} let!(:user) { create(:user)}
let!(:milestone) { create(:milestone, project: project) } let!(:milestone) { create(:milestone, project: project) }
let!(:label) { create(:label, project: project) } let!(:label) { create(:label, project: project) }
let!(:issue1) { create(:issue, project: project) }
before do before do
project.team << [user, :master] project.team << [user, :master]
...@@ -196,6 +197,7 @@ describe 'Filter issues', feature: true do ...@@ -196,6 +197,7 @@ describe 'Filter issues', feature: true do
page.within '.labels-filter' do page.within '.labels-filter' do
click_link 'bug' click_link 'bug'
end end
find('.dropdown-menu-close-icon').click
page.within '.issues-list' do page.within '.issues-list' do
expect(page).to have_selector('.issue', count: 1) expect(page).to have_selector('.issue', count: 1)
...@@ -287,7 +289,7 @@ describe 'Filter issues', feature: true do ...@@ -287,7 +289,7 @@ describe 'Filter issues', feature: true do
wait_for_ajax wait_for_ajax
page.within '.issues-list' do page.within '.issues-list' do
expect(first('.issue')).to have_content('Frontend') expect(page).to have_content('Frontend')
end end
end end
end end
......
...@@ -3,6 +3,8 @@ require 'spec_helper' ...@@ -3,6 +3,8 @@ require 'spec_helper'
describe "Search", feature: true do describe "Search", feature: true do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:project) { create(:project, namespace: user.namespace) } let(:project) { create(:project, namespace: user.namespace) }
let!(:issue) { create(:issue, project: project, assignee: user) }
let!(:issue2) { create(:issue, project: project, author: user) }
before do before do
login_with(user) login_with(user)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment