Commit 63fa8c0d authored by Sanad Liaquat's avatar Sanad Liaquat

Merge branch 'qa/issue-boards-navigation' into 'master'

Update issue boards tests with navigation step

Closes gitlab-org/quality/testcases#190

See merge request gitlab-org/gitlab-ee!15653
parents c11d2935 6575ff6e
...@@ -115,7 +115,7 @@ ...@@ -115,7 +115,7 @@
= _('List') = _('List')
= nav_link(controller: :boards) do = nav_link(controller: :boards) do
= link_to project_boards_path(@project), title: boards_link_text do = link_to project_boards_path(@project), title: boards_link_text, data: { qa_selector: "issue_boards_link" } do
%span %span
= boards_link_text = boards_link_text
......
...@@ -10,6 +10,7 @@ module QA ...@@ -10,6 +10,7 @@ module QA
def self.included(base) def self.included(base)
base.class_eval do base.class_eval do
view 'app/views/layouts/nav/sidebar/_project.html.haml' do view 'app/views/layouts/nav/sidebar/_project.html.haml' do
element :issue_boards_link
element :issues_item element :issues_item
element :labels_link element :labels_link
element :milestones_link element :milestones_link
...@@ -29,6 +30,14 @@ module QA ...@@ -29,6 +30,14 @@ module QA
end end
end end
def go_to_boards
hover_issues do
within_submenu do
click_element(:issue_boards_link)
end
end
end
def go_to_labels def go_to_labels
hover_issues do hover_issues do
within_submenu do within_submenu do
......
...@@ -23,11 +23,12 @@ module QA ...@@ -23,11 +23,12 @@ module QA
issue.title = issue_title issue.title = issue_title
issue.labels = [label] issue.labels = [label]
end end
label_board_list.project.visit!
Page::Project::Menu.perform(&:go_to_boards)
end end
it 'shows the just created board with a "Doing" (label) list, and an issue on it' do it 'shows the just created board with a "Doing" (label) list, and an issue on it' do
page.visit("#{label_board_list.project.web_url}/-/boards")
EE::Page::Project::Issue::Board::Show.perform do |show| EE::Page::Project::Issue::Board::Show.perform do |show|
expect(show.boards_dropdown).to have_content(label_board_list.board.name) expect(show.boards_dropdown).to have_content(label_board_list.board.name)
expect(show.boards_list_header_with_index(1)).to have_content(label) expect(show.boards_list_header_with_index(1)).to have_content(label)
...@@ -48,11 +49,12 @@ module QA ...@@ -48,11 +49,12 @@ module QA
issue.title = issue_title issue.title = issue_title
issue.milestone = milestone_board_list.project_milestone issue.milestone = milestone_board_list.project_milestone
end end
milestone_board_list.project.visit!
Page::Project::Menu.perform(&:go_to_boards)
end end
it 'shows the just created board with a "1.0" (milestone) list, and an issue on it' do it 'shows the just created board with a "1.0" (milestone) list, and an issue on it' do
page.visit("#{milestone_board_list.project.web_url}/-/boards")
EE::Page::Project::Issue::Board::Show.perform do |show| EE::Page::Project::Issue::Board::Show.perform do |show|
expect(show.boards_dropdown).to have_content(milestone_board_list.board.name) expect(show.boards_dropdown).to have_content(milestone_board_list.board.name)
expect(show.boards_list_header_with_index(1)).to have_content('1.0') expect(show.boards_list_header_with_index(1)).to have_content('1.0')
......
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