From 1bb160d2a60dc87dd07f8602af785ae8a40ad0ca Mon Sep 17 00:00:00 2001 From: Irakli Chalagashvili Date: Fri, 19 May 2023 19:42:31 +0400 Subject: [PATCH 1/3] ENG-4884 support legacy menu wizard navigation --- src/ui/app-tour/AppTour.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ui/app-tour/AppTour.js b/src/ui/app-tour/AppTour.js index a7e1d8b55..5722e6be5 100644 --- a/src/ui/app-tour/AppTour.js +++ b/src/ui/app-tour/AppTour.js @@ -135,8 +135,10 @@ class AppTour extends React.Component { onAppTourFinish, } = this.props; - const getStep3Element = () => document.getElementsByTagName('app-builder-menu')[0].shadowRoot.querySelector('.app-tour-step-3 > a'); - const getStep4Element = () => document.getElementsByTagName('app-builder-menu')[0].shadowRoot.querySelector('.app-tour-step-4 > a'); + const mfeAppBuilderMenu = document.getElementsByTagName('app-builder-menu') ? document.getElementsByTagName('app-builder-menu')[0] : null; + + const getStep3Element = () => (mfeAppBuilderMenu ? mfeAppBuilderMenu.shadowRoot.querySelector('.app-tour-step-3 > a') : document.querySelector('.app-tour-step-3 > a')); + const getStep4Element = () => (mfeAppBuilderMenu ? mfeAppBuilderMenu.shadowRoot.querySelector('.app-tour-step-3 > a') : document.querySelector('.app-tour-step-4 > a')); const step5Element = document.querySelector('.app-tour-step-5'); const step8Element = document.querySelector('.PageTreeSelector__select-area'); From 6db217a93653f36e2e5c22d17615f751c0fd27bf Mon Sep 17 00:00:00 2001 From: Irakli Chalagashvili Date: Mon, 22 May 2023 15:33:22 +0400 Subject: [PATCH 2/3] ENG-4884 support legacy menu wizard navigation --- src/ui/app-tour/AppTour.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/ui/app-tour/AppTour.js b/src/ui/app-tour/AppTour.js index 5722e6be5..36d0734c9 100644 --- a/src/ui/app-tour/AppTour.js +++ b/src/ui/app-tour/AppTour.js @@ -136,7 +136,6 @@ class AppTour extends React.Component { } = this.props; const mfeAppBuilderMenu = document.getElementsByTagName('app-builder-menu') ? document.getElementsByTagName('app-builder-menu')[0] : null; - const getStep3Element = () => (mfeAppBuilderMenu ? mfeAppBuilderMenu.shadowRoot.querySelector('.app-tour-step-3 > a') : document.querySelector('.app-tour-step-3 > a')); const getStep4Element = () => (mfeAppBuilderMenu ? mfeAppBuilderMenu.shadowRoot.querySelector('.app-tour-step-3 > a') : document.querySelector('.app-tour-step-4 > a')); From edd0b95195579d7c97a39b543339002c3b73fe73 Mon Sep 17 00:00:00 2001 From: Irakli Chalagashvili Date: Mon, 22 May 2023 18:43:52 +0400 Subject: [PATCH 3/3] ENG-4884 fix incorrect selector --- src/ui/app-tour/AppTour.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ui/app-tour/AppTour.js b/src/ui/app-tour/AppTour.js index 36d0734c9..6c53f390b 100644 --- a/src/ui/app-tour/AppTour.js +++ b/src/ui/app-tour/AppTour.js @@ -137,7 +137,7 @@ class AppTour extends React.Component { const mfeAppBuilderMenu = document.getElementsByTagName('app-builder-menu') ? document.getElementsByTagName('app-builder-menu')[0] : null; const getStep3Element = () => (mfeAppBuilderMenu ? mfeAppBuilderMenu.shadowRoot.querySelector('.app-tour-step-3 > a') : document.querySelector('.app-tour-step-3 > a')); - const getStep4Element = () => (mfeAppBuilderMenu ? mfeAppBuilderMenu.shadowRoot.querySelector('.app-tour-step-3 > a') : document.querySelector('.app-tour-step-4 > a')); + const getStep4Element = () => (mfeAppBuilderMenu ? mfeAppBuilderMenu.shadowRoot.querySelector('.app-tour-step-4 > a') : document.querySelector('.app-tour-step-4 > a')); const step5Element = document.querySelector('.app-tour-step-5'); const step8Element = document.querySelector('.PageTreeSelector__select-area');