Skip to content

Commit

Permalink
Merge pull request #14250 from opf/50881-starting-guided-Tour-from-th…
Browse files Browse the repository at this point in the history
…e-Scrum-project-does-not-work-for-non-admin

[50881] Starting Guided Tour (from the Scrum project) does not work for non-admin
  • Loading branch information
HDinger authored Nov 29, 2023
2 parents e6f9049 + 394d948 commit 6cff3ce
Show file tree
Hide file tree
Showing 8 changed files with 3 additions and 314 deletions.
2 changes: 0 additions & 2 deletions app/seeders/standard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -711,8 +711,6 @@ projects:
t_text: |
We are glad you joined! We suggest to try a few things to get started in OpenProject.
Discover the most important features with our [Guided Tour]({{opSetting:base_url}}/projects/your-scrum-project/backlogs?start_scrum_onboarding_tour=true).
_Try the following steps:_
1. *Invite new members to your project*: → Go to [Members]({{opSetting:base_url}}/projects/your-scrum-project/members) in the project navigation.
Expand Down
1 change: 0 additions & 1 deletion frontend/src/app/core/setup/globals/onboarding/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ export type OnboardingTourNames = 'prepareBacklogs'|'backlogs'|'taskboard'|'home

export enum ProjectName {
demo = 'demo',
scrum = 'scrum',
}

function matchingFilter(list:NodeListOf<HTMLElement>, filterFunction:(match:HTMLElement) => boolean):HTMLElement|null {
Expand Down
17 changes: 0 additions & 17 deletions frontend/src/app/core/setup/globals/onboarding/onboarding_tour.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@ import {
import { boardTourSteps } from 'core-app/core/setup/globals/onboarding/tours/boards_tour';
import { menuTourSteps } from 'core-app/core/setup/globals/onboarding/tours/menu_tour';
import { homescreenOnboardingTourSteps } from 'core-app/core/setup/globals/onboarding/tours/homescreen_tour';
import {
prepareScrumBacklogsTourSteps,
scrumBacklogsTourSteps,
scrumTaskBoardTourSteps,
} from 'core-app/core/setup/globals/onboarding/tours/backlogs_tour';
import { teamPlannerTourSteps } from 'core-app/core/setup/globals/onboarding/tours/team_planners_tour';

require('core-vendor/enjoyhint');
Expand Down Expand Up @@ -98,18 +93,6 @@ function mainTour(project:ProjectName = ProjectName.demo) {

export function start(name:OnboardingTourNames, project?:ProjectName):void {
switch (name) {
case 'prepareBacklogs':
initializeTour('prepareTaskBoardTour');
startTour(prepareScrumBacklogsTourSteps());
break;
case 'backlogs':
initializeTour('startTaskBoardTour');
startTour(scrumBacklogsTourSteps());
break;
case 'taskboard':
initializeTour('startMainTourFromBacklogs');
startTour(scrumTaskBoardTourSteps());
break;
case 'homescreen':
initializeTour('startProjectTour');
startTour(homescreenOnboardingTourSteps());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,28 +61,8 @@ export function detectOnboardingTour():void {
}

// ------------------------------- Tutorial WP page -------------------------------
if (currentTourPart === 'startMainTourFromBacklogs' || url.searchParams.get('start_onboarding_tour')) {
const projectName:ProjectName = currentTourPart === 'startMainTourFromBacklogs' ? ProjectName.scrum : ProjectName.demo;
void triggerTour('main', projectName);
}

// ------------------------------- Prepare Backlogs page -------------------------------
if (url.searchParams.get('start_scrum_onboarding_tour')) {
if (jQuery('.backlogs-menu-item').length > 0) {
void triggerTour('prepareBacklogs', ProjectName.scrum);
} else {
void triggerTour('taskboard', ProjectName.scrum);
}
}

// ------------------------------- Tutorial Backlogs page -------------------------------
if (currentTourPart === 'prepareTaskBoardTour') {
void triggerTour('backlogs', ProjectName.scrum);
}

// ------------------------------- Tutorial Task Board page -------------------------------
if (currentTourPart === 'startTaskBoardTour') {
void triggerTour('taskboard', ProjectName.scrum);
if (url.searchParams.get('start_onboarding_tour')) {
void triggerTour('main', ProjectName.demo);
}
}
}

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -55,20 +55,10 @@
public: true,
enabled_module_names: %w[work_package_tracking wiki board_view])
end
let(:scrum_project) do
create(:project,
name: 'Scrum project',
identifier: 'your-scrum-project',
public: true,
enabled_module_names: %w[work_package_tracking wiki board_view])
end
let!(:wp_1) { create(:work_package, project: demo_project) }
let!(:wp_2) { create(:work_package, project: scrum_project) }

let!(:demo_board_view) { create(:board_grid_with_query, project: demo_project, name: 'Kanban', query:) }
let!(:demo_basic_board_view) { create(:board_grid_with_query, project: demo_project, name: 'Basic board', query:) }
let!(:scrum_board_view) { create(:board_grid_with_query, project: scrum_project, name: 'Kanban', query:) }
let!(:scrum_basic_board_view) { create(:board_grid_with_query, project: scrum_project, name: 'Task board', query:) }
let(:query) { create(:query, user:, project: demo_project) }

before do
Expand Down Expand Up @@ -98,20 +88,6 @@

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
end
end

context 'without an EE token' do
Expand All @@ -129,20 +105,6 @@

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 with_ee_token: false

step_through_onboarding_main_menu_tour has_full_capabilities: true
end
end
end
end
Loading

0 comments on commit 6cff3ce

Please sign in to comment.