|
29 | 29 | #++ |
30 | 30 |
|
31 | 31 | require "spec_helper" |
32 | | -require_relative "../../support/pages/backlogs" |
| 32 | +require_relative "../../support/pages/sprint_planning" |
33 | 33 | require_relative "../../../../boards/spec/features/support/board_page" |
34 | 34 |
|
35 | 35 | RSpec.describe "Start and finish sprints", |
|
47 | 47 | let(:user) do |
48 | 48 | create(:user, member_with_permissions: { project => permissions }) |
49 | 49 | end |
50 | | - let(:backlogs_page) { Pages::Backlogs.new(project) } |
| 50 | + let(:planning_page) { Pages::SprintPlanning.new(project) } |
51 | 51 | let(:task_statuses) { Type.find(Task.type).statuses } |
52 | 52 | let(:story_type) { create(:type_feature) } |
53 | 53 | let(:task_type) do |
|
89 | 89 |
|
90 | 90 | create(:workflow, type: task_type, old_status: default_status, new_status: default_status, role: create(:project_role)) |
91 | 91 |
|
92 | | - backlogs_page.visit! |
| 92 | + planning_page.visit! |
93 | 93 | end |
94 | 94 |
|
95 | 95 | it "starts the sprint and redirects to the board" do |
96 | | - backlogs_page.click_in_sprint_menu(first_sprint, "Start sprint") |
| 96 | + planning_page.click_in_sprint_menu(first_sprint, "Start sprint") |
97 | 97 |
|
98 | 98 | expect_and_dismiss_flash type: :success, message: "The sprint was started." |
99 | 99 |
|
|
144 | 144 | let!(:task_board) { create(:board_grid_with_query, project:, linked: first_sprint) } |
145 | 145 |
|
146 | 146 | it "finishes the sprint and returns to the backlog" do |
147 | | - backlogs_page.within_sprint_menu(first_sprint) do |menu| |
| 147 | + planning_page.within_sprint_menu(first_sprint) do |menu| |
148 | 148 | expect(menu).to have_selector :menuitem, "Finish sprint" |
149 | 149 | expect(menu).to have_css "form[action='#{finish_project_sprint_path(project, first_sprint)}'][data-turbo='false']" |
150 | 150 | menu.find(:button, "Finish sprint").click |
151 | 151 | end |
152 | 152 |
|
153 | | - backlogs_page.expect_current_path |
| 153 | + planning_page.expect_current_path |
154 | 154 | expect_and_dismiss_flash type: :success, message: "The sprint was completed." |
155 | 155 | expect(first_sprint.reload).to be_completed |
156 | | - backlogs_page.expect_sprint_names_in_order(second_sprint.name) |
| 156 | + planning_page.expect_sprint_names_in_order(second_sprint.name) |
157 | 157 | end |
158 | 158 | end |
159 | 159 | end |
0 commit comments