MCPcopy Create free account
hub / github.com/abi/screenshot-to-code / assertCodeActions

Method assertCodeActions

frontend/src/tests/qa.test.ts:345–363  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

343 }
344
345 async assertCodeActions() {
346 await this.page.click('[data-testid="tab-code"]');
347 await this.page.waitForSelector('[data-testid="copy-code"]', {
348 timeout: 10000,
349 });
350 await this.page.click('[data-testid="copy-code"]');
351 await this.page.click('[data-testid="open-codepen"]');
352 await this.page.click('[data-testid="download-code"]');
353
354 const results = await this.page.evaluate(() => ({
355 downloads: window.__qaDownloads,
356 submits: window.__qaFormSubmits,
357 clipboard: window.__qaClipboardCalls,
358 }));
359
360 expect(results.downloads).toContain("index.html");
361 expect(results.submits).toContain("https://codepen.io/pen/define");
362 expect(results.clipboard).toContain("copy");
363 }
364}
365
366async function setupRequestInterception(

Callers 1

qa.test.tsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected