Skip to content

Commit 08d085e

Browse files
committed
debug
1 parent c183ec6 commit 08d085e

File tree

2 files changed

+5
-19
lines changed

2 files changed

+5
-19
lines changed

.github/workflows/playwright.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@ jobs:
5454
name: ${{ needs.build-plugin.outputs.artifact_name }}
5555
path: ./build
5656

57+
- name: Copy built plugin to source directory
58+
run: |
59+
rm -rf ./src
60+
cp -r ./build/code-snippets ./src
61+
5762
- name: Start WordPress environment
5863
run: |
5964
npx wp-env start

tests/e2e/code-snippets.spec.ts

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)