@@ -149,24 +149,6 @@ test.describe('Published Paragraph', () => {
149149 // the route is still active (not navigated away) without requiring visible content.
150150 await expect ( publishedContainer ) . toBeAttached ( { timeout : 10000 } ) ;
151151 } ) ;
152-
153- test ( 'should render React micro-frontend instead of Angular result component' , async ( { page } ) => {
154- await test . step ( 'Given I navigate to React mode URL' , async ( ) => {
155- await page . goto ( `/#/notebook/${ testNotebook . noteId } /paragraph/${ testNotebook . paragraphId } ?react=true` ) ;
156- await waitForZeppelinReady ( page ) ;
157- } ) ;
158-
159- await test . step ( 'Then Angular result component should not be rendered' , async ( ) => {
160- await expect ( page . locator ( 'zeppelin-notebook-paragraph-result' ) ) . toHaveCount ( 0 , { timeout : 10000 } ) ;
161- } ) ;
162-
163- await test . step ( 'And React widget should be mounted in the container' , async ( ) => {
164- // React mount() renders <div data-testid="react-published-paragraph"> or <Empty> (Alert)
165- const reactContent = page . locator ( '[data-testid="react-published-paragraph"], .ant-alert' ) ;
166- // JUSTIFIED: compound selector covers React success + error fallback (.ant-alert); either may render
167- await expect ( reactContent ) . toBeAttached ( { timeout : 15000 } ) ;
168- } ) ;
169- } ) ;
170152 } ) ;
171153
172154 test . describe ( 'Published Mode Functionality' , ( ) => {
@@ -190,49 +172,39 @@ test.describe('Published Paragraph', () => {
190172 } ) ;
191173
192174 test . describe ( 'Confirmation Modal and Execution' , ( ) => {
193- for ( const reactMode of [ false , true ] ) {
194- test ( `should show confirmation modal with code preview and allow running${ reactMode ? ' (React mode)' : '' } ` , async ( {
195- page
196- } ) => {
197- const { noteId, paragraphId } = testNotebook ;
175+ test ( 'should show confirmation modal with code preview and allow running' , async ( { page } ) => {
176+ const { noteId, paragraphId } = testNotebook ;
198177
199- await publishedParagraphPage . navigateToNotebook ( noteId ) ;
178+ await publishedParagraphPage . navigateToNotebook ( noteId ) ;
200179
201- // JUSTIFIED: createTestNotebook creates a single paragraph; first() is deterministic
202- const paragraphElement = page . locator ( 'zeppelin-notebook-paragraph' ) . first ( ) ;
203- await expect ( paragraphElement . locator ( 'zeppelin-notebook-paragraph-result' ) ) . toBeHidden ( ) ;
180+ // JUSTIFIED: createTestNotebook creates a single paragraph; first() is deterministic
181+ const paragraphElement = page . locator ( 'zeppelin-notebook-paragraph' ) . first ( ) ;
182+ await expect ( paragraphElement . locator ( 'zeppelin-notebook-paragraph-result' ) ) . toBeHidden ( ) ;
204183
205- const urlSuffix = reactMode ? '?react=true' : '' ;
206- await page . goto ( `/#/notebook/${ noteId } /paragraph/${ paragraphId } ${ urlSuffix } ` ) ;
207- await waitForZeppelinReady ( page ) ;
184+ await page . goto ( `/#/notebook/${ noteId } /paragraph/${ paragraphId } ` ) ;
185+ await waitForZeppelinReady ( page ) ;
208186
209- if ( ! reactMode ) {
210- await expect ( page ) . toHaveURL ( new RegExp ( `/paragraph/${ paragraphId } ` ) ) ;
211- }
187+ await expect ( page ) . toHaveURL ( new RegExp ( `/paragraph/${ paragraphId } ` ) ) ;
212188
213- const modal = publishedParagraphPage . confirmationModal ;
214- await expect ( modal ) . toBeVisible ( { timeout : 30000 } ) ;
189+ const modal = publishedParagraphPage . confirmationModal ;
190+ await expect ( modal ) . toBeVisible ( { timeout : 30000 } ) ;
215191
216- await expect ( publishedParagraphPage . modalTitle ) . toHaveText ( 'Run Paragraph?' ) ;
192+ await expect ( publishedParagraphPage . modalTitle ) . toHaveText ( 'Run Paragraph?' ) ;
217193
218- const modalContent = modal . locator ( '.ant-modal-confirm-content' ) ;
219- await expect ( modalContent ) . toContainText ( 'This paragraph contains the following code:' ) ;
220- await expect ( modalContent ) . toContainText ( 'Would you like to execute this code?' ) ;
194+ const modalContent = modal . locator ( '.ant-modal-confirm-content' ) ;
195+ await expect ( modalContent ) . toContainText ( 'This paragraph contains the following code:' ) ;
196+ await expect ( modalContent ) . toContainText ( 'Would you like to execute this code?' ) ;
221197
222- if ( ! reactMode ) {
223- // Code preview element only checked in Angular mode
224- // JUSTIFIED: compound fallback selector; first() picks any element that confirms code preview is rendered
225- const codePreview = modalContent . locator ( 'pre, code, .code-preview, [class*="code"]' ) . first ( ) ;
226- await expect ( codePreview ) . toBeVisible ( ) ;
227- await expect ( codePreview ) . not . toBeEmpty ( ) ; // code must have content, not just an empty container
198+ // JUSTIFIED: compound fallback selector; first() picks any element that confirms code preview is rendered
199+ const codePreview = modalContent . locator ( 'pre, code, .code-preview, [class*="code"]' ) . first ( ) ;
200+ await expect ( codePreview ) . toBeVisible ( ) ;
201+ await expect ( codePreview ) . not . toBeEmpty ( ) ; // code must have content, not just an empty container
228202
229- await expect ( publishedParagraphPage . runButton ) . toBeVisible ( ) ;
230- await expect ( publishedParagraphPage . cancelButton ) . toBeVisible ( ) ;
231- }
203+ await expect ( publishedParagraphPage . runButton ) . toBeVisible ( ) ;
204+ await expect ( publishedParagraphPage . cancelButton ) . toBeVisible ( ) ;
232205
233- await publishedParagraphPage . runButton . click ( ) ;
234- await expect ( modal ) . toBeHidden ( ) ;
235- } ) ;
236- }
206+ await publishedParagraphPage . runButton . click ( ) ;
207+ await expect ( modal ) . toBeHidden ( ) ;
208+ } ) ;
237209 } ) ;
238210} ) ;
0 commit comments