Classic GitHub Gist

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();
});
view raw gistfile1.txt hosted with ❤ by GitHub
Scroll to Top