This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
| const { test, expect } = require('@playwright/test'); | |
| const slug = 'playwright-classic-editor/classic-github-gist/'; | |
| test('Classic GitHub Gist', async ({ page }) => { | |
| await page.goto(slug); | |
| // Embed the Gist | |
| await page.evaluate(() => { | |
| const gistScript = document.createElement('script'); | |
| gistScript.src = 'https://gist.github.com/username/gist-id.js'; | |
| document.body.appendChild(gistScript); | |
| }); | |
| // Wait for the Gist to load | |
| await page.waitForSelector('iframe'); | |
| // Verify the Gist is embedded | |
| const gistFrame = await page.$('iframe'); | |
| expect(gistFrame).not.toBeNull(); | |
| }); |