@@ -24,28 +24,9 @@ test.describe('Code Snippets Plugin', () => {
2424
2525 await test . step ( 'Add a new snippet' , async ( ) => {
2626 await page . waitForSelector ( 'h1, .page-title' , { timeout : 10000 } ) ;
27-
28- // Debug: Check what buttons are available
29- const buttonCount = await page . locator ( '.page-title-action' ) . count ( ) ;
30- console . log ( 'Page title action buttons found:' , buttonCount ) ;
31-
32- if ( buttonCount === 0 ) {
33- // Try alternative selectors
34- const altButtons = await page . locator ( 'a[href*="action=add"], button:has-text("Add"), a:has-text("Add New")' ) . count ( ) ;
35- console . log ( 'Alternative add buttons found:' , altButtons ) ;
36-
37- // Take screenshot for debugging
38- await page . screenshot ( { path : 'debug-no-add-button.png' } ) ;
39- throw new Error ( 'No Add New button found' ) ;
40- }
41-
4227 await page . click ( '.page-title-action' ) ;
4328 await page . waitForLoadState ( 'networkidle' ) ;
4429
45- // Debug: Check where we are after clicking
46- const currentUrl = page . url ( ) ;
47- console . log ( 'URL after clicking Add New:' , currentUrl ) ;
48-
4930 await page . waitForSelector ( '#title' ) ;
5031 await page . fill ( '#title' , TEST_SNIPPET_NAME ) ;
5132
0 commit comments