OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Explicitly test the case that there is no EE token and the tour nevertheless shows the board steps
Henriette Darge86cba4b7207e
diff --git a/modules/boards/spec/features/onboarding/boards_onboarding_tour_spec.rb b/modules/boards/spec/features/onboarding/boards_onboarding_tour_spec.rbindex 26d6421dc69..4d0fdd044f1 100644--- a/modules/boards/spec/features/onboarding/boards_onboarding_tour_spec.rb+++ b/modules/boards/spec/features/onboarding/boards_onboarding_tour_spec.rb@@ -66,12 +66,12 @@ describe 'boards onboarding tour', js: true dolet!(:wp_2) { create(:work_package, project: scrum_project) }let!(:demo_board_view) { create :board_grid_with_query, project: demo_project, name: 'Kanban', query: query }+ let!(:demo_basic_board_view) { create :board_grid_with_query, project: demo_project, name: 'Basic board', query: query }let!(:scrum_board_view) { create :board_grid_with_query, project: scrum_project, name: 'Kanban', query: query }+ let!(:scrum_basic_board_view) { create :board_grid_with_query, project: scrum_project, name: 'Task board', query: query }let(:query) { create :query, user: user, project: demo_project }before do- with_enterprise_token :board_view- login_as user::OrderedWorkPackage.create(query: query, work_package: wp_1, position: 0)allow(Setting).to receive(:demo_projects_available).and_return(true)allow(Setting).to receive(:boards_demo_data_available).and_return(true)@@ -83,29 +83,67 @@ describe 'boards onboarding tour', js: true doendcontext 'as a new user' do- it 'I see the board onboarding tour in the demo project' do- # Set the tour parameter so that we can start on the wp page- visit "/projects/#{demo_project.identifier}/work_packages?start_onboarding_tour=true"+ context 'with an EE token' do+ before do+ with_enterprise_token :board_view+ login_as user+ end- step_through_onboarding_wp_tour demo_project, wp_1+ it 'I see the board onboarding tour in the demo project' do+ # Set the tour parameter so that we can start on the wp page+ visit "/projects/#{demo_project.identifier}/work_packages?start_onboarding_tour=true"- step_through_onboarding_board_tour+ step_through_onboarding_wp_tour demo_project, wp_1- step_through_onboarding_main_menu_tour has_full_capabilities: true+ step_through_onboarding_board_tour++ step_through_onboarding_main_menu_tour has_full_capabilities: true+ end++ it "I see the board onboarding tour in the scrum project" do+ # Set sessionStorage value so that the tour knows that it is in the scum tour+ page.execute_script("window.sessionStorage.setItem('openProject-onboardingTour', 'startMainTourFromBacklogs');")++ # Set the tour parameter so that we can start on the wp page+ visit "/projects/#{scrum_project.identifier}/work_packages?start_onboarding_tour=true"++ step_through_onboarding_wp_tour scrum_project, wp_2++ step_through_onboarding_board_tour++ step_through_onboarding_main_menu_tour has_full_capabilities: true+ endend- it "I see the board onboarding tour in the scrum project" do- # Set sessionStorage value so that the tour knows that it is in the scum tour- page.execute_script("window.sessionStorage.setItem('openProject-onboardingTour', 'startMainTourFromBacklogs');")+ context 'without an EE token' do+ before do+ login_as user+ end++ it 'I see the board onboarding tour in the demo project' do+ # Set the tour parameter so that we can start on the wp page+ visit "/projects/#{demo_project.identifier}/work_packages?start_onboarding_tour=true"++ step_through_onboarding_wp_tour demo_project, wp_1++ step_through_onboarding_board_tour with_ee_token: false++ step_through_onboarding_main_menu_tour has_full_capabilities: true+ end++ it "I see the board onboarding tour in the scrum project" do+ # Set sessionStorage value so that the tour knows that it is in the scum tour+ page.execute_script("window.sessionStorage.setItem('openProject-onboardingTour', 'startMainTourFromBacklogs');")- # Set the tour parameter so that we can start on the wp page- visit "/projects/#{scrum_project.identifier}/work_packages?start_onboarding_tour=true"+ # Set the tour parameter so that we can start on the wp page+ visit "/projects/#{scrum_project.identifier}/work_packages?start_onboarding_tour=true"- step_through_onboarding_wp_tour scrum_project, wp_2+ step_through_onboarding_wp_tour scrum_project, wp_2- step_through_onboarding_board_tour+ step_through_onboarding_board_tour with_ee_token: false- step_through_onboarding_main_menu_tour has_full_capabilities: true+ step_through_onboarding_main_menu_tour has_full_capabilities: true+ endendendenddiff --git a/modules/boards/spec/features/support/onboarding_steps.rb b/modules/boards/spec/features/support/onboarding_steps.rbindex 50d9ce9c018..77ddf79ad22 100644--- a/modules/boards/spec/features/support/onboarding_steps.rb+++ b/modules/boards/spec/features/support/onboarding_steps.rb@@ -27,13 +27,18 @@#++module OnboardingSteps- def step_through_onboarding_board_tour+ def step_through_onboarding_board_tour(with_ee_token: true)next_button.clickexpect(page).to have_text sanitize_string(I18n.t('js.onboarding.steps.boards.overview')), normalize_ws: truenext_button.click- expect(page)- .to have_text sanitize_string(I18n.t('js.onboarding.steps.boards.lists_kanban')), normalize_ws: true+ if with_ee_token+ expect(page)+ .to have_text sanitize_string(I18n.t('js.onboarding.steps.boards.lists_kanban')), normalize_ws: true+ else+ expect(page)+ .to have_text sanitize_string(I18n.t('js.onboarding.steps.boards.lists_basic')), normalize_ws: true+ endnext_button.clickexpect(page).to have_text sanitize_string(I18n.t('js.onboarding.steps.boards.add')), normalize_ws: true