diff --git a/apps/teams-test-app/src/App.tsx b/apps/teams-test-app/src/App.tsx index 052b3815e5..02ae87109b 100644 --- a/apps/teams-test-app/src/App.tsx +++ b/apps/teams-test-app/src/App.tsx @@ -35,10 +35,14 @@ if ( } else { if (isTestBackCompat()) { appInitialization.notifyAppLoaded(); - appInitialization.notifySuccess(); + if (!urlParams.has('noSuccess') || urlParams.get('noSuccess') !== 'true') { + appInitialization.notifySuccess(); + } } else { - app.notifyAppLoaded(); - app.notifySuccess(); + // app.notifyAppLoaded(); + if (!urlParams.has('noSuccess') || urlParams.get('noSuccess') !== 'true') { + app.notifySuccess(); + } } } diff --git a/apps/teams-test-app/src/pages/TestApp.tsx b/apps/teams-test-app/src/pages/TestApp.tsx index 24d248095a..876aef154e 100644 --- a/apps/teams-test-app/src/pages/TestApp.tsx +++ b/apps/teams-test-app/src/pages/TestApp.tsx @@ -1,5 +1,5 @@ import { IAppWindow } from '@microsoft/teams-js'; -import React from 'react'; +import React, { useEffect, useState } from 'react'; import AppAPIs from '../components/AppAPIs'; import AppEntityAPIs from '../components/AppEntityAPIs'; @@ -68,12 +68,28 @@ import WebStorageAPIs from '../components/WebStorageAPIs'; export const TestApp: React.FC = () => { const dialogWindowRef = React.useRef(null); + const [shouldNest, setShouldNest] = useState(false); + + useEffect(() => { + const urlParams = new URLSearchParams(window.location.search); + setShouldNest(urlParams.get('shouldNest') === 'true'); + }, []); return ( <> + {shouldNest && ( +