From 6b149444b0368aed52368bab59a3941fd3ddbe01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristj=C3=A1n=20Oddsson?= Date: Fri, 21 Jun 2024 11:26:21 +0200 Subject: [PATCH] generate actual test files instead of doing dynamic tests --- tests/act/act.js => generate-act-tests.js | 119 +++++++++--------- ...14295a8bd7213fdbd69bc1c8ee44c48268370ec.ts | 15 +++ ...3653844ceb8f6cd95af81672123ea98323ce5c8.ts | 16 +++ ...d7a7862c5b414c272f1713c341d821f5249a15d.ts | 16 +++ ...13298e42bd5a240371affac3747a470c617610b.ts | 14 +++ ...752fb0c94ce17c6557a7e498c6e9a87c6a943ea.ts | 18 +++ ...917b821f0e317de992cad191ed67aeedb9f34c9.ts | 16 +++ ...bdb0351ae2e82f05cfa15198ca0a353974f6278.ts | 14 +++ ...c58ea9a68f5bf34cabb07059af1a533be96c720.ts | 25 ++++ ...4c82462f976ebaaa5f68fc0f3f519832614e182.ts | 14 +++ ...3516ed6280651bc0bb5c4fe83ba5312bca2b58b.ts | 14 +++ ...1db96f8a86e965c58617540df61b15b8ba2aee3.ts | 14 +++ ...79a7f5c037a7080108928ea74e3792cc9818490.ts | 14 +++ ...453d6a6491ddfe546eabb9f9cf1f01a96b9a805.ts | 18 +++ ...130b961773da8671837e6a633ca879d1edd28d0.ts | 14 +++ ...b39de5e01179f2ca0b55e8aae65a18766530003.ts | 16 +++ ...f56c77f4e790b52f176c5e2e582112af17ce658.ts | 14 +++ ...139aa4402ef782bf321751276333b10aafd8e26.ts | 16 +++ ...14f9d3d1d69e75cb990c1cb8951f2d70730e450.ts | 14 +++ ...bce4c2053a6182bae072108d2a879caecc9c25f.ts | 23 ++++ ...94621492b6195e264171aa7132198c46cfdf12b.ts | 14 +++ ...2e2cc0d8464668b150ed39373c350e5c35f59d2.ts | 14 +++ ...1c9b4f7702d04de31ba52d5af5c63dd6863804a.ts | 15 +++ ...c6ce29c2934936b9dd032e87695bffae9bc514e.ts | 20 +++ ...bc716b9f3d4789c4a6aea4787d273b72a41d153.ts | 20 +++ ...c655a5da71710e6ca6245186af7f5963e89b332.ts | 22 ++++ ...2b44481e1067806d435c1020422dc401c9a23b4.ts | 20 +++ ...eeab3c1580d2ee40e3adb6912c1ec159d6fbb26.ts | 20 +++ ...83ce158e792551e72924b127e7e1673949ff4ef.ts | 20 +++ ...2290d9cd1226c969b2063a8464e8d6ac4187f08.ts | 18 +++ ...925c1aefbeec908d327431a48f5044bf16068a1.ts | 18 +++ ...d8f4976cf482e02acfbb71230f5055693ee75ff.ts | 20 +++ ...bbe2413e9ae6546057a024c50426225bb5729e9.ts | 22 ++++ ...39849b0dc83ea0262f90869b33d1937822a3316.ts | 22 ++++ ...a2f0f03e0dddd80cef6554814b919fac1666c02.ts | 20 +++ ...47a3d36d4f2a25286c2d0641968aa26f83dfbac.ts | 20 +++ ...d281d0b30ffe5442e38b6a109ab75c2a88ad21f.ts | 22 ++++ ...66587b669e2928e8c5f21e3b1cd97e5b3e27a07.ts | 24 ++++ ...e6b29e220d6afbd827625c602ec49027e73fdf1.ts | 16 +++ ...d2f262645db0f473e294a02dff5576c6ccfe133.ts | 27 ++++ web-test-runner.config.mjs | 38 +++--- 41 files changed, 775 insertions(+), 81 deletions(-) rename tests/act/act.js => generate-act-tests.js (58%) create mode 100644 tests/act/tests/c487ae/014295a8bd7213fdbd69bc1c8ee44c48268370ec.ts create mode 100644 tests/act/tests/c487ae/03653844ceb8f6cd95af81672123ea98323ce5c8.ts create mode 100644 tests/act/tests/c487ae/0d7a7862c5b414c272f1713c341d821f5249a15d.ts create mode 100644 tests/act/tests/c487ae/113298e42bd5a240371affac3747a470c617610b.ts create mode 100644 tests/act/tests/c487ae/1752fb0c94ce17c6557a7e498c6e9a87c6a943ea.ts create mode 100644 tests/act/tests/c487ae/2917b821f0e317de992cad191ed67aeedb9f34c9.ts create mode 100644 tests/act/tests/c487ae/2bdb0351ae2e82f05cfa15198ca0a353974f6278.ts create mode 100644 tests/act/tests/c487ae/2c58ea9a68f5bf34cabb07059af1a533be96c720.ts create mode 100644 tests/act/tests/c487ae/34c82462f976ebaaa5f68fc0f3f519832614e182.ts create mode 100644 tests/act/tests/c487ae/43516ed6280651bc0bb5c4fe83ba5312bca2b58b.ts create mode 100644 tests/act/tests/c487ae/51db96f8a86e965c58617540df61b15b8ba2aee3.ts create mode 100644 tests/act/tests/c487ae/679a7f5c037a7080108928ea74e3792cc9818490.ts create mode 100644 tests/act/tests/c487ae/7453d6a6491ddfe546eabb9f9cf1f01a96b9a805.ts create mode 100644 tests/act/tests/c487ae/8130b961773da8671837e6a633ca879d1edd28d0.ts create mode 100644 tests/act/tests/c487ae/8b39de5e01179f2ca0b55e8aae65a18766530003.ts create mode 100644 tests/act/tests/c487ae/9f56c77f4e790b52f176c5e2e582112af17ce658.ts create mode 100644 tests/act/tests/c487ae/a139aa4402ef782bf321751276333b10aafd8e26.ts create mode 100644 tests/act/tests/c487ae/a14f9d3d1d69e75cb990c1cb8951f2d70730e450.ts create mode 100644 tests/act/tests/c487ae/abce4c2053a6182bae072108d2a879caecc9c25f.ts create mode 100644 tests/act/tests/c487ae/c94621492b6195e264171aa7132198c46cfdf12b.ts create mode 100644 tests/act/tests/c487ae/d2e2cc0d8464668b150ed39373c350e5c35f59d2.ts create mode 100644 tests/act/tests/c487ae/e1c9b4f7702d04de31ba52d5af5c63dd6863804a.ts create mode 100644 tests/act/tests/de46e4/2c6ce29c2934936b9dd032e87695bffae9bc514e.ts create mode 100644 tests/act/tests/de46e4/3bc716b9f3d4789c4a6aea4787d273b72a41d153.ts create mode 100644 tests/act/tests/de46e4/4c655a5da71710e6ca6245186af7f5963e89b332.ts create mode 100644 tests/act/tests/de46e4/52b44481e1067806d435c1020422dc401c9a23b4.ts create mode 100644 tests/act/tests/de46e4/6eeab3c1580d2ee40e3adb6912c1ec159d6fbb26.ts create mode 100644 tests/act/tests/de46e4/883ce158e792551e72924b127e7e1673949ff4ef.ts create mode 100644 tests/act/tests/de46e4/a2290d9cd1226c969b2063a8464e8d6ac4187f08.ts create mode 100644 tests/act/tests/de46e4/a925c1aefbeec908d327431a48f5044bf16068a1.ts create mode 100644 tests/act/tests/de46e4/ad8f4976cf482e02acfbb71230f5055693ee75ff.ts create mode 100644 tests/act/tests/de46e4/bbbe2413e9ae6546057a024c50426225bb5729e9.ts create mode 100644 tests/act/tests/de46e4/c39849b0dc83ea0262f90869b33d1937822a3316.ts create mode 100644 tests/act/tests/de46e4/ca2f0f03e0dddd80cef6554814b919fac1666c02.ts create mode 100644 tests/act/tests/de46e4/e47a3d36d4f2a25286c2d0641968aa26f83dfbac.ts create mode 100644 tests/act/tests/de46e4/fd281d0b30ffe5442e38b6a109ab75c2a88ad21f.ts create mode 100644 tests/act/tests/qt1vmo/766587b669e2928e8c5f21e3b1cd97e5b3e27a07.ts create mode 100644 tests/act/tests/qt1vmo/be6b29e220d6afbd827625c602ec49027e73fdf1.ts create mode 100644 tests/act/tests/qt1vmo/dd2f262645db0f473e294a02dff5576c6ccfe133.ts diff --git a/tests/act/act.js b/generate-act-tests.js similarity index 58% rename from tests/act/act.js rename to generate-act-tests.js index 1b021d0..a0f75bd 100644 --- a/tests/act/act.js +++ b/generate-act-tests.js @@ -1,10 +1,8 @@ -import { fixture, html, expect } from "@open-wc/testing"; -import { scan } from "../../src/scanner"; +import { mkdir, writeFile, readFile } from "node:fs/promises"; -const response = await fetch("/testcases.json"); -const json = await response.json(); +const { testcases } = JSON.parse(await readFile("./testcases.json", "utf8")); -const applicableRules = json.testcases.filter( +const applicableRules = testcases.filter( (rule) => rule.ruleAccessibilityRequirements, ); @@ -126,67 +124,66 @@ const ignoredExamples = [ "https://act-rules.github.io/testcases/qt1vmo/0ef4f516db9ed70cb25f39c99637272808b8e60f.html", ]; -describe("ACT Rules", function () { - for (const rule of applicableRules) { - const { - ruleId, - ruleName, - testcaseId, - testcaseTitle, - expected, - url: exampleURL, - ruleAccessibilityRequirements, - } = rule; +for (const rule of applicableRules) { + const { + ruleId, + ruleName, + testcaseId, + testcaseTitle, + expected, + url: exampleURL, + ruleAccessibilityRequirements, + } = rule; - if (testCasesThatRedirect.includes(testcaseId)) continue; - if (ruleName.includes("DEPRECATED")) continue; - if (rulesToIgnore.includes(ruleId)) continue; - if (ignoredExamples.includes(exampleURL)) continue; + if (testCasesThatRedirect.includes(testcaseId)) continue; + if (ruleName.includes("DEPRECATED")) continue; + if (rulesToIgnore.includes(ruleId)) continue; + if (ignoredExamples.includes(exampleURL)) continue; + // Ignore inapplicable results + if (expected === "inapplicable") continue; - if ( - Object.keys(ruleAccessibilityRequirements).every( - (x) => !x.startsWith("wcag"), - ) + console.log({ ruleId, testcaseId }); + + if ( + Object.keys(ruleAccessibilityRequirements).every( + (x) => !x.startsWith("wcag"), ) - continue; + ) + continue; + + const html = await readFile( + `./tests/act/fixtures/${testcaseId}.html`, + "utf8", + ); + + let assertion = undefined; + if (expected === "passed") { + assertion = "expect(results).to.be.empty;"; + } else if (expected === "failed") { + assertion = "expect(results).to.not.be.empty;"; + } else { + throw new Error(`Unknown expected state: ${expected}`); + } - describe(`[${ruleId}] ${ruleName}`, function () { - it(`${testcaseTitle} (${exampleURL})`, async () => { - const testResponse = await fetch( - `/tests/act/fixtures/${testcaseId}.html`, - ); - if (testResponse.status !== 200) { - throw new Error("Couldn't find testcase HTML"); - } - const testHTML = await testResponse.text(); - await fixture(testHTML); + const suite = `import { fixture, expect } from "@open-wc/testing"; +import { scan } from "../../../../src/scanner"; - const results = (await scan(document.body)).map(({ text, url }) => { - return { text, url }; - }); +describe("[${ruleId}]${ruleName}", function () { + it("${testcaseTitle} (${exampleURL})", async () => { + await fixture(\`${html}\`); - try { - if (expected === "passed") { - expect(results).to.be.empty; - } else if (expected === "failed") { - expect(results).to.not.be.empty; - } else if (expected === "inapplicable") { - // Ignore inapplicable results - } else { - throw new Error(`Unknown expected state: ${expected}`); - } - } catch (error) { - console.log("======="); - console.log(`[${ruleId}] ${ruleName}`); - console.log(testcaseTitle); - console.log(`${testcaseId}.html`); - console.log(Object.keys(ruleAccessibilityRequirements)); - console.log("-------"); - console.log(testHTML); - console.log("\n"); - throw error; - } - }); + const results = (await scan(document.body)).map(({ text, url }) => { + return { text, url }; }); - } + + ${assertion} + }); }); +`; + await mkdir(`./tests/act/tests/${ruleId}/`, { recursive: true }); + await writeFile( + `./tests/act/tests/${ruleId}/${testcaseId}.ts`, + suite, + "utf8", + ); +} diff --git a/tests/act/tests/c487ae/014295a8bd7213fdbd69bc1c8ee44c48268370ec.ts b/tests/act/tests/c487ae/014295a8bd7213fdbd69bc1c8ee44c48268370ec.ts new file mode 100644 index 0000000..10ab6eb --- /dev/null +++ b/tests/act/tests/c487ae/014295a8bd7213fdbd69bc1c8ee44c48268370ec.ts @@ -0,0 +1,15 @@ +import { fixture, expect } from "@open-wc/testing"; +import { scan } from "../../../../src/scanner"; + +describe("[c487ae]Link has non-empty accessible name", function () { + it("Passed Example 8 (https://act-rules.github.io/testcases/c487ae/014295a8bd7213fdbd69bc1c8ee44c48268370ec.html)", async () => { + await fixture(` +
Web Accessibility Initiative (WAI)
`); + + const results = (await scan(document.body)).map(({ text, url }) => { + return { text, url }; + }); + + expect(results).to.be.empty; + }); +}); diff --git a/tests/act/tests/c487ae/03653844ceb8f6cd95af81672123ea98323ce5c8.ts b/tests/act/tests/c487ae/03653844ceb8f6cd95af81672123ea98323ce5c8.ts new file mode 100644 index 0000000..23767f8 --- /dev/null +++ b/tests/act/tests/c487ae/03653844ceb8f6cd95af81672123ea98323ce5c8.ts @@ -0,0 +1,16 @@ +import { fixture, expect } from "@open-wc/testing"; +import { scan } from "../../../../src/scanner"; + +describe("[c487ae]Link has non-empty accessible name", function () { + it("Passed Example 5 (https://act-rules.github.io/testcases/c487ae/03653844ceb8f6cd95af81672123ea98323ce5c8.html)", async () => { + await fixture(` `); + + const results = (await scan(document.body)).map(({ text, url }) => { + return { text, url }; + }); + + expect(results).to.be.empty; + }); +}); diff --git a/tests/act/tests/c487ae/0d7a7862c5b414c272f1713c341d821f5249a15d.ts b/tests/act/tests/c487ae/0d7a7862c5b414c272f1713c341d821f5249a15d.ts new file mode 100644 index 0000000..b790803 --- /dev/null +++ b/tests/act/tests/c487ae/0d7a7862c5b414c272f1713c341d821f5249a15d.ts @@ -0,0 +1,16 @@ +import { fixture, expect } from "@open-wc/testing"; +import { scan } from "../../../../src/scanner"; + +describe("[c487ae]Link has non-empty accessible name", function () { + it("Passed Example 4 (https://act-rules.github.io/testcases/c487ae/0d7a7862c5b414c272f1713c341d821f5249a15d.html)", async () => { + await fixture(` `); + + const results = (await scan(document.body)).map(({ text, url }) => { + return { text, url }; + }); + + expect(results).to.be.empty; + }); +}); diff --git a/tests/act/tests/c487ae/113298e42bd5a240371affac3747a470c617610b.ts b/tests/act/tests/c487ae/113298e42bd5a240371affac3747a470c617610b.ts new file mode 100644 index 0000000..2a737de --- /dev/null +++ b/tests/act/tests/c487ae/113298e42bd5a240371affac3747a470c617610b.ts @@ -0,0 +1,14 @@ +import { fixture, expect } from "@open-wc/testing"; +import { scan } from "../../../../src/scanner"; + +describe("[c487ae]Link has non-empty accessible name", function () { + it("Failed Example 1 (https://act-rules.github.io/testcases/c487ae/113298e42bd5a240371affac3747a470c617610b.html)", async () => { + await fixture(` `); + + const results = (await scan(document.body)).map(({ text, url }) => { + return { text, url }; + }); + + expect(results).to.not.be.empty; + }); +}); diff --git a/tests/act/tests/c487ae/1752fb0c94ce17c6557a7e498c6e9a87c6a943ea.ts b/tests/act/tests/c487ae/1752fb0c94ce17c6557a7e498c6e9a87c6a943ea.ts new file mode 100644 index 0000000..69a651a --- /dev/null +++ b/tests/act/tests/c487ae/1752fb0c94ce17c6557a7e498c6e9a87c6a943ea.ts @@ -0,0 +1,18 @@ +import { fixture, expect } from "@open-wc/testing"; +import { scan } from "../../../../src/scanner"; + +describe("[c487ae]Link has non-empty accessible name", function () { + it("Passed Example 10 (https://act-rules.github.io/testcases/c487ae/1752fb0c94ce17c6557a7e498c6e9a87c6a943ea.html)", async () => { + await fixture(` Planets + + + Sun +`); + + const results = (await scan(document.body)).map(({ text, url }) => { + return { text, url }; + }); + + expect(results).to.be.empty; + }); +}); diff --git a/tests/act/tests/c487ae/2917b821f0e317de992cad191ed67aeedb9f34c9.ts b/tests/act/tests/c487ae/2917b821f0e317de992cad191ed67aeedb9f34c9.ts new file mode 100644 index 0000000..880171f --- /dev/null +++ b/tests/act/tests/c487ae/2917b821f0e317de992cad191ed67aeedb9f34c9.ts @@ -0,0 +1,16 @@ +import { fixture, expect } from "@open-wc/testing"; +import { scan } from "../../../../src/scanner"; + +describe("[c487ae]Link has non-empty accessible name", function () { + it("Passed Example 7 (https://act-rules.github.io/testcases/c487ae/2917b821f0e317de992cad191ed67aeedb9f34c9.html)", async () => { + await fixture(` Web Accessibility Initiative (WAI)`); + + const results = (await scan(document.body)).map(({ text, url }) => { + return { text, url }; + }); + + expect(results).to.be.empty; + }); +}); diff --git a/tests/act/tests/c487ae/2bdb0351ae2e82f05cfa15198ca0a353974f6278.ts b/tests/act/tests/c487ae/2bdb0351ae2e82f05cfa15198ca0a353974f6278.ts new file mode 100644 index 0000000..1e670d4 --- /dev/null +++ b/tests/act/tests/c487ae/2bdb0351ae2e82f05cfa15198ca0a353974f6278.ts @@ -0,0 +1,14 @@ +import { fixture, expect } from "@open-wc/testing"; +import { scan } from "../../../../src/scanner"; + +describe("[c487ae]Link has non-empty accessible name", function () { + it("Failed Example 7 (https://act-rules.github.io/testcases/c487ae/2bdb0351ae2e82f05cfa15198ca0a353974f6278.html)", async () => { + await fixture(` `); + + const results = (await scan(document.body)).map(({ text, url }) => { + return { text, url }; + }); + + expect(results).to.not.be.empty; + }); +}); diff --git a/tests/act/tests/c487ae/2c58ea9a68f5bf34cabb07059af1a533be96c720.ts b/tests/act/tests/c487ae/2c58ea9a68f5bf34cabb07059af1a533be96c720.ts new file mode 100644 index 0000000..478be9e --- /dev/null +++ b/tests/act/tests/c487ae/2c58ea9a68f5bf34cabb07059af1a533be96c720.ts @@ -0,0 +1,25 @@ +import { fixture, expect } from "@open-wc/testing"; +import { scan } from "../../../../src/scanner"; + +describe("[c487ae]Link has non-empty accessible name", function () { + it("Passed Example 9 (https://act-rules.github.io/testcases/c487ae/2c58ea9a68f5bf34cabb07059af1a533be96c720.html)", async () => { + await fixture(` + + + Web Accessibility Initiative (WAI) + +`); + + const results = (await scan(document.body)).map(({ text, url }) => { + return { text, url }; + }); + + expect(results).to.be.empty; + }); +}); diff --git a/tests/act/tests/c487ae/34c82462f976ebaaa5f68fc0f3f519832614e182.ts b/tests/act/tests/c487ae/34c82462f976ebaaa5f68fc0f3f519832614e182.ts new file mode 100644 index 0000000..7bb8a25 --- /dev/null +++ b/tests/act/tests/c487ae/34c82462f976ebaaa5f68fc0f3f519832614e182.ts @@ -0,0 +1,14 @@ +import { fixture, expect } from "@open-wc/testing"; +import { scan } from "../../../../src/scanner"; + +describe("[c487ae]Link has non-empty accessible name", function () { + it("Passed Example 1 (https://act-rules.github.io/testcases/c487ae/34c82462f976ebaaa5f68fc0f3f519832614e182.html)", async () => { + await fixture(` Web Accessibility Initiative (WAI) `); + + const results = (await scan(document.body)).map(({ text, url }) => { + return { text, url }; + }); + + expect(results).to.be.empty; + }); +}); diff --git a/tests/act/tests/c487ae/43516ed6280651bc0bb5c4fe83ba5312bca2b58b.ts b/tests/act/tests/c487ae/43516ed6280651bc0bb5c4fe83ba5312bca2b58b.ts new file mode 100644 index 0000000..c715d5d --- /dev/null +++ b/tests/act/tests/c487ae/43516ed6280651bc0bb5c4fe83ba5312bca2b58b.ts @@ -0,0 +1,14 @@ +import { fixture, expect } from "@open-wc/testing"; +import { scan } from "../../../../src/scanner"; + +describe("[c487ae]Link has non-empty accessible name", function () { + it("Failed Example 2 (https://act-rules.github.io/testcases/c487ae/43516ed6280651bc0bb5c4fe83ba5312bca2b58b.html)", async () => { + await fixture(` `); + + const results = (await scan(document.body)).map(({ text, url }) => { + return { text, url }; + }); + + expect(results).to.not.be.empty; + }); +}); diff --git a/tests/act/tests/c487ae/51db96f8a86e965c58617540df61b15b8ba2aee3.ts b/tests/act/tests/c487ae/51db96f8a86e965c58617540df61b15b8ba2aee3.ts new file mode 100644 index 0000000..8ceb435 --- /dev/null +++ b/tests/act/tests/c487ae/51db96f8a86e965c58617540df61b15b8ba2aee3.ts @@ -0,0 +1,14 @@ +import { fixture, expect } from "@open-wc/testing"; +import { scan } from "../../../../src/scanner"; + +describe("[c487ae]Link has non-empty accessible name", function () { + it("Failed Example 5 (https://act-rules.github.io/testcases/c487ae/51db96f8a86e965c58617540df61b15b8ba2aee3.html)", async () => { + await fixture(` `); + + const results = (await scan(document.body)).map(({ text, url }) => { + return { text, url }; + }); + + expect(results).to.not.be.empty; + }); +}); diff --git a/tests/act/tests/c487ae/679a7f5c037a7080108928ea74e3792cc9818490.ts b/tests/act/tests/c487ae/679a7f5c037a7080108928ea74e3792cc9818490.ts new file mode 100644 index 0000000..b4c25aa --- /dev/null +++ b/tests/act/tests/c487ae/679a7f5c037a7080108928ea74e3792cc9818490.ts @@ -0,0 +1,14 @@ +import { fixture, expect } from "@open-wc/testing"; +import { scan } from "../../../../src/scanner"; + +describe("[c487ae]Link has non-empty accessible name", function () { + it("Failed Example 3 (https://act-rules.github.io/testcases/c487ae/679a7f5c037a7080108928ea74e3792cc9818490.html)", async () => { + await fixture(` `); + + const results = (await scan(document.body)).map(({ text, url }) => { + return { text, url }; + }); + + expect(results).to.not.be.empty; + }); +}); diff --git a/tests/act/tests/c487ae/7453d6a6491ddfe546eabb9f9cf1f01a96b9a805.ts b/tests/act/tests/c487ae/7453d6a6491ddfe546eabb9f9cf1f01a96b9a805.ts new file mode 100644 index 0000000..3b5bc0d --- /dev/null +++ b/tests/act/tests/c487ae/7453d6a6491ddfe546eabb9f9cf1f01a96b9a805.ts @@ -0,0 +1,18 @@ +import { fixture, expect } from "@open-wc/testing"; +import { scan } from "../../../../src/scanner"; + +describe("[c487ae]Link has non-empty accessible name", function () { + it("Failed Example 9 (https://act-rules.github.io/testcases/c487ae/7453d6a6491ddfe546eabb9f9cf1f01a96b9a805.html)", async () => { + await fixture(` Planets + + + +`); + + const results = (await scan(document.body)).map(({ text, url }) => { + return { text, url }; + }); + + expect(results).to.not.be.empty; + }); +}); diff --git a/tests/act/tests/c487ae/8130b961773da8671837e6a633ca879d1edd28d0.ts b/tests/act/tests/c487ae/8130b961773da8671837e6a633ca879d1edd28d0.ts new file mode 100644 index 0000000..3ee86ff --- /dev/null +++ b/tests/act/tests/c487ae/8130b961773da8671837e6a633ca879d1edd28d0.ts @@ -0,0 +1,14 @@ +import { fixture, expect } from "@open-wc/testing"; +import { scan } from "../../../../src/scanner"; + +describe("[c487ae]Link has non-empty accessible name", function () { + it("Failed Example 10 (https://act-rules.github.io/testcases/c487ae/8130b961773da8671837e6a633ca879d1edd28d0.html)", async () => { + await fixture(` `); + + const results = (await scan(document.body)).map(({ text, url }) => { + return { text, url }; + }); + + expect(results).to.not.be.empty; + }); +}); diff --git a/tests/act/tests/c487ae/8b39de5e01179f2ca0b55e8aae65a18766530003.ts b/tests/act/tests/c487ae/8b39de5e01179f2ca0b55e8aae65a18766530003.ts new file mode 100644 index 0000000..4e48049 --- /dev/null +++ b/tests/act/tests/c487ae/8b39de5e01179f2ca0b55e8aae65a18766530003.ts @@ -0,0 +1,16 @@ +import { fixture, expect } from "@open-wc/testing"; +import { scan } from "../../../../src/scanner"; + +describe("[c487ae]Link has non-empty accessible name", function () { + it("Failed Example 11 (https://act-rules.github.io/testcases/c487ae/8b39de5e01179f2ca0b55e8aae65a18766530003.html)", async () => { + await fixture(` See []`); + + const results = (await scan(document.body)).map(({ text, url }) => { + return { text, url }; + }); + + expect(results).to.not.be.empty; + }); +}); diff --git a/tests/act/tests/c487ae/9f56c77f4e790b52f176c5e2e582112af17ce658.ts b/tests/act/tests/c487ae/9f56c77f4e790b52f176c5e2e582112af17ce658.ts new file mode 100644 index 0000000..748d9b5 --- /dev/null +++ b/tests/act/tests/c487ae/9f56c77f4e790b52f176c5e2e582112af17ce658.ts @@ -0,0 +1,14 @@ +import { fixture, expect } from "@open-wc/testing"; +import { scan } from "../../../../src/scanner"; + +describe("[c487ae]Link has non-empty accessible name", function () { + it("Passed Example 11 (https://act-rules.github.io/testcases/c487ae/9f56c77f4e790b52f176c5e2e582112af17ce658.html)", async () => { + await fixture(` See [ACT rules]`); + + const results = (await scan(document.body)).map(({ text, url }) => { + return { text, url }; + }); + + expect(results).to.be.empty; + }); +}); diff --git a/tests/act/tests/c487ae/a139aa4402ef782bf321751276333b10aafd8e26.ts b/tests/act/tests/c487ae/a139aa4402ef782bf321751276333b10aafd8e26.ts new file mode 100644 index 0000000..6a89c75 --- /dev/null +++ b/tests/act/tests/c487ae/a139aa4402ef782bf321751276333b10aafd8e26.ts @@ -0,0 +1,16 @@ +import { fixture, expect } from "@open-wc/testing"; +import { scan } from "../../../../src/scanner"; + +describe("[c487ae]Link has non-empty accessible name", function () { + it("Failed Example 8 (https://act-rules.github.io/testcases/c487ae/a139aa4402ef782bf321751276333b10aafd8e26.html)", async () => { + await fixture(` + +`); + + const results = (await scan(document.body)).map(({ text, url }) => { + return { text, url }; + }); + + expect(results).to.not.be.empty; + }); +}); diff --git a/tests/act/tests/c487ae/a14f9d3d1d69e75cb990c1cb8951f2d70730e450.ts b/tests/act/tests/c487ae/a14f9d3d1d69e75cb990c1cb8951f2d70730e450.ts new file mode 100644 index 0000000..189aff3 --- /dev/null +++ b/tests/act/tests/c487ae/a14f9d3d1d69e75cb990c1cb8951f2d70730e450.ts @@ -0,0 +1,14 @@ +import { fixture, expect } from "@open-wc/testing"; +import { scan } from "../../../../src/scanner"; + +describe("[c487ae]Link has non-empty accessible name", function () { + it("Passed Example 6 (https://act-rules.github.io/testcases/c487ae/a14f9d3d1d69e75cb990c1cb8951f2d70730e450.html)", async () => { + await fixture(` `); + + const results = (await scan(document.body)).map(({ text, url }) => { + return { text, url }; + }); + + expect(results).to.be.empty; + }); +}); diff --git a/tests/act/tests/c487ae/abce4c2053a6182bae072108d2a879caecc9c25f.ts b/tests/act/tests/c487ae/abce4c2053a6182bae072108d2a879caecc9c25f.ts new file mode 100644 index 0000000..7b09236 --- /dev/null +++ b/tests/act/tests/c487ae/abce4c2053a6182bae072108d2a879caecc9c25f.ts @@ -0,0 +1,23 @@ +import { fixture, expect } from "@open-wc/testing"; +import { scan } from "../../../../src/scanner"; + +describe("[c487ae]Link has non-empty accessible name", function () { + it("Passed Example 2 (https://act-rules.github.io/testcases/c487ae/abce4c2053a6182bae072108d2a879caecc9c25f.html)", async () => { + await fixture(`
+ Web Accessibility Initiative (WAI) +
+`); + + const results = (await scan(document.body)).map(({ text, url }) => { + return { text, url }; + }); + + expect(results).to.be.empty; + }); +}); diff --git a/tests/act/tests/c487ae/c94621492b6195e264171aa7132198c46cfdf12b.ts b/tests/act/tests/c487ae/c94621492b6195e264171aa7132198c46cfdf12b.ts new file mode 100644 index 0000000..0144103 --- /dev/null +++ b/tests/act/tests/c487ae/c94621492b6195e264171aa7132198c46cfdf12b.ts @@ -0,0 +1,14 @@ +import { fixture, expect } from "@open-wc/testing"; +import { scan } from "../../../../src/scanner"; + +describe("[c487ae]Link has non-empty accessible name", function () { + it("Passed Example 3 (https://act-rules.github.io/testcases/c487ae/c94621492b6195e264171aa7132198c46cfdf12b.html)", async () => { + await fixture(` `); + + const results = (await scan(document.body)).map(({ text, url }) => { + return { text, url }; + }); + + expect(results).to.be.empty; + }); +}); diff --git a/tests/act/tests/c487ae/d2e2cc0d8464668b150ed39373c350e5c35f59d2.ts b/tests/act/tests/c487ae/d2e2cc0d8464668b150ed39373c350e5c35f59d2.ts new file mode 100644 index 0000000..62b9c82 --- /dev/null +++ b/tests/act/tests/c487ae/d2e2cc0d8464668b150ed39373c350e5c35f59d2.ts @@ -0,0 +1,14 @@ +import { fixture, expect } from "@open-wc/testing"; +import { scan } from "../../../../src/scanner"; + +describe("[c487ae]Link has non-empty accessible name", function () { + it("Failed Example 4 (https://act-rules.github.io/testcases/c487ae/d2e2cc0d8464668b150ed39373c350e5c35f59d2.html)", async () => { + await fixture(` `); + + const results = (await scan(document.body)).map(({ text, url }) => { + return { text, url }; + }); + + expect(results).to.not.be.empty; + }); +}); diff --git a/tests/act/tests/c487ae/e1c9b4f7702d04de31ba52d5af5c63dd6863804a.ts b/tests/act/tests/c487ae/e1c9b4f7702d04de31ba52d5af5c63dd6863804a.ts new file mode 100644 index 0000000..fc72479 --- /dev/null +++ b/tests/act/tests/c487ae/e1c9b4f7702d04de31ba52d5af5c63dd6863804a.ts @@ -0,0 +1,15 @@ +import { fixture, expect } from "@open-wc/testing"; +import { scan } from "../../../../src/scanner"; + +describe("[c487ae]Link has non-empty accessible name", function () { + it("Failed Example 6 (https://act-rules.github.io/testcases/c487ae/e1c9b4f7702d04de31ba52d5af5c63dd6863804a.html)", async () => { + await fixture(` +
`); + + const results = (await scan(document.body)).map(({ text, url }) => { + return { text, url }; + }); + + expect(results).to.not.be.empty; + }); +}); diff --git a/tests/act/tests/de46e4/2c6ce29c2934936b9dd032e87695bffae9bc514e.ts b/tests/act/tests/de46e4/2c6ce29c2934936b9dd032e87695bffae9bc514e.ts new file mode 100644 index 0000000..eb79b54 --- /dev/null +++ b/tests/act/tests/de46e4/2c6ce29c2934936b9dd032e87695bffae9bc514e.ts @@ -0,0 +1,20 @@ +import { fixture, expect } from "@open-wc/testing"; +import { scan } from "../../../../src/scanner"; + +describe("[de46e4]Element with lang attribute has valid language tag", function () { + it("Passed Example 3 (https://act-rules.github.io/testcases/de46e4/2c6ce29c2934936b9dd032e87695bffae9bc514e.html)", async () => { + await fixture(` + +

+ They wandered into a strange Tiki bar on the edge of the small beach town. +

+ +`); + + const results = (await scan(document.body)).map(({ text, url }) => { + return { text, url }; + }); + + expect(results).to.be.empty; + }); +}); diff --git a/tests/act/tests/de46e4/3bc716b9f3d4789c4a6aea4787d273b72a41d153.ts b/tests/act/tests/de46e4/3bc716b9f3d4789c4a6aea4787d273b72a41d153.ts new file mode 100644 index 0000000..c984efe --- /dev/null +++ b/tests/act/tests/de46e4/3bc716b9f3d4789c4a6aea4787d273b72a41d153.ts @@ -0,0 +1,20 @@ +import { fixture, expect } from "@open-wc/testing"; +import { scan } from "../../../../src/scanner"; + +describe("[de46e4]Element with lang attribute has valid language tag", function () { + it("Passed Example 5 (https://act-rules.github.io/testcases/de46e4/3bc716b9f3d4789c4a6aea4787d273b72a41d153.html)", async () => { + await fixture(` + +
+ Fireworks over Paris +
+ +`); + + const results = (await scan(document.body)).map(({ text, url }) => { + return { text, url }; + }); + + expect(results).to.be.empty; + }); +}); diff --git a/tests/act/tests/de46e4/4c655a5da71710e6ca6245186af7f5963e89b332.ts b/tests/act/tests/de46e4/4c655a5da71710e6ca6245186af7f5963e89b332.ts new file mode 100644 index 0000000..cdbdc66 --- /dev/null +++ b/tests/act/tests/de46e4/4c655a5da71710e6ca6245186af7f5963e89b332.ts @@ -0,0 +1,22 @@ +import { fixture, expect } from "@open-wc/testing"; +import { scan } from "../../../../src/scanner"; + +describe("[de46e4]Element with lang attribute has valid language tag", function () { + it("Failed Example 5 (https://act-rules.github.io/testcases/de46e4/4c655a5da71710e6ca6245186af7f5963e89b332.html)", async () => { + await fixture(` + +
+

+ They wandered into a strange Tiki bar on the edge of the small beach town. +

+
+ +`); + + const results = (await scan(document.body)).map(({ text, url }) => { + return { text, url }; + }); + + expect(results).to.not.be.empty; + }); +}); diff --git a/tests/act/tests/de46e4/52b44481e1067806d435c1020422dc401c9a23b4.ts b/tests/act/tests/de46e4/52b44481e1067806d435c1020422dc401c9a23b4.ts new file mode 100644 index 0000000..82fe27c --- /dev/null +++ b/tests/act/tests/de46e4/52b44481e1067806d435c1020422dc401c9a23b4.ts @@ -0,0 +1,20 @@ +import { fixture, expect } from "@open-wc/testing"; +import { scan } from "../../../../src/scanner"; + +describe("[de46e4]Element with lang attribute has valid language tag", function () { + it("Passed Example 1 (https://act-rules.github.io/testcases/de46e4/52b44481e1067806d435c1020422dc401c9a23b4.html)", async () => { + await fixture(` + +
+ They wandered into a strange Tiki bar on the edge of the small beach town. +
+ +`); + + const results = (await scan(document.body)).map(({ text, url }) => { + return { text, url }; + }); + + expect(results).to.be.empty; + }); +}); diff --git a/tests/act/tests/de46e4/6eeab3c1580d2ee40e3adb6912c1ec159d6fbb26.ts b/tests/act/tests/de46e4/6eeab3c1580d2ee40e3adb6912c1ec159d6fbb26.ts new file mode 100644 index 0000000..c0a68b3 --- /dev/null +++ b/tests/act/tests/de46e4/6eeab3c1580d2ee40e3adb6912c1ec159d6fbb26.ts @@ -0,0 +1,20 @@ +import { fixture, expect } from "@open-wc/testing"; +import { scan } from "../../../../src/scanner"; + +describe("[de46e4]Element with lang attribute has valid language tag", function () { + it("Failed Example 2 (https://act-rules.github.io/testcases/de46e4/6eeab3c1580d2ee40e3adb6912c1ec159d6fbb26.html)", async () => { + await fixture(` + +
+ They wandered into a strange Tiki bar on the edge of the small beach town. +
+ +`); + + const results = (await scan(document.body)).map(({ text, url }) => { + return { text, url }; + }); + + expect(results).to.not.be.empty; + }); +}); diff --git a/tests/act/tests/de46e4/883ce158e792551e72924b127e7e1673949ff4ef.ts b/tests/act/tests/de46e4/883ce158e792551e72924b127e7e1673949ff4ef.ts new file mode 100644 index 0000000..b482256 --- /dev/null +++ b/tests/act/tests/de46e4/883ce158e792551e72924b127e7e1673949ff4ef.ts @@ -0,0 +1,20 @@ +import { fixture, expect } from "@open-wc/testing"; +import { scan } from "../../../../src/scanner"; + +describe("[de46e4]Element with lang attribute has valid language tag", function () { + it("Passed Example 2 (https://act-rules.github.io/testcases/de46e4/883ce158e792551e72924b127e7e1673949ff4ef.html)", async () => { + await fixture(` + +
+ Ils ont trouvé un étrange bar Tiki aux abords de la petite ville balnéaire. +
+ +`); + + const results = (await scan(document.body)).map(({ text, url }) => { + return { text, url }; + }); + + expect(results).to.be.empty; + }); +}); diff --git a/tests/act/tests/de46e4/a2290d9cd1226c969b2063a8464e8d6ac4187f08.ts b/tests/act/tests/de46e4/a2290d9cd1226c969b2063a8464e8d6ac4187f08.ts new file mode 100644 index 0000000..6a8ab78 --- /dev/null +++ b/tests/act/tests/de46e4/a2290d9cd1226c969b2063a8464e8d6ac4187f08.ts @@ -0,0 +1,18 @@ +import { fixture, expect } from "@open-wc/testing"; +import { scan } from "../../../../src/scanner"; + +describe("[de46e4]Element with lang attribute has valid language tag", function () { + it("Failed Example 8 (https://act-rules.github.io/testcases/de46e4/a2290d9cd1226c969b2063a8464e8d6ac4187f08.html)", async () => { + await fixture(` + +

I love ACT rules!

+ +`); + + const results = (await scan(document.body)).map(({ text, url }) => { + return { text, url }; + }); + + expect(results).to.not.be.empty; + }); +}); diff --git a/tests/act/tests/de46e4/a925c1aefbeec908d327431a48f5044bf16068a1.ts b/tests/act/tests/de46e4/a925c1aefbeec908d327431a48f5044bf16068a1.ts new file mode 100644 index 0000000..e08827f --- /dev/null +++ b/tests/act/tests/de46e4/a925c1aefbeec908d327431a48f5044bf16068a1.ts @@ -0,0 +1,18 @@ +import { fixture, expect } from "@open-wc/testing"; +import { scan } from "../../../../src/scanner"; + +describe("[de46e4]Element with lang attribute has valid language tag", function () { + it("Failed Example 9 (https://act-rules.github.io/testcases/de46e4/a925c1aefbeec908d327431a48f5044bf16068a1.html)", async () => { + await fixture(` + +

Lëtzebuerg ass e Land an Europa.

+ +`); + + const results = (await scan(document.body)).map(({ text, url }) => { + return { text, url }; + }); + + expect(results).to.not.be.empty; + }); +}); diff --git a/tests/act/tests/de46e4/ad8f4976cf482e02acfbb71230f5055693ee75ff.ts b/tests/act/tests/de46e4/ad8f4976cf482e02acfbb71230f5055693ee75ff.ts new file mode 100644 index 0000000..31f6dcc --- /dev/null +++ b/tests/act/tests/de46e4/ad8f4976cf482e02acfbb71230f5055693ee75ff.ts @@ -0,0 +1,20 @@ +import { fixture, expect } from "@open-wc/testing"; +import { scan } from "../../../../src/scanner"; + +describe("[de46e4]Element with lang attribute has valid language tag", function () { + it("Failed Example 7 (https://act-rules.github.io/testcases/de46e4/ad8f4976cf482e02acfbb71230f5055693ee75ff.html)", async () => { + await fixture(` + +
+ Fireworks over Paris +
+ +`); + + const results = (await scan(document.body)).map(({ text, url }) => { + return { text, url }; + }); + + expect(results).to.not.be.empty; + }); +}); diff --git a/tests/act/tests/de46e4/bbbe2413e9ae6546057a024c50426225bb5729e9.ts b/tests/act/tests/de46e4/bbbe2413e9ae6546057a024c50426225bb5729e9.ts new file mode 100644 index 0000000..69aa246 --- /dev/null +++ b/tests/act/tests/de46e4/bbbe2413e9ae6546057a024c50426225bb5729e9.ts @@ -0,0 +1,22 @@ +import { fixture, expect } from "@open-wc/testing"; +import { scan } from "../../../../src/scanner"; + +describe("[de46e4]Element with lang attribute has valid language tag", function () { + it("Failed Example 6 (https://act-rules.github.io/testcases/de46e4/bbbe2413e9ae6546057a024c50426225bb5729e9.html)", async () => { + await fixture(` + +
+
+ They wandered into a strange Tiki bar on the edge of the small beach town. +
+
+ +`); + + const results = (await scan(document.body)).map(({ text, url }) => { + return { text, url }; + }); + + expect(results).to.not.be.empty; + }); +}); diff --git a/tests/act/tests/de46e4/c39849b0dc83ea0262f90869b33d1937822a3316.ts b/tests/act/tests/de46e4/c39849b0dc83ea0262f90869b33d1937822a3316.ts new file mode 100644 index 0000000..135e009 --- /dev/null +++ b/tests/act/tests/de46e4/c39849b0dc83ea0262f90869b33d1937822a3316.ts @@ -0,0 +1,22 @@ +import { fixture, expect } from "@open-wc/testing"; +import { scan } from "../../../../src/scanner"; + +describe("[de46e4]Element with lang attribute has valid language tag", function () { + it("Passed Example 4 (https://act-rules.github.io/testcases/de46e4/c39849b0dc83ea0262f90869b33d1937822a3316.html)", async () => { + await fixture(` + +
+
+ They wandered into a strange Tiki bar on the edge of the small beach town. +
+
+ +`); + + const results = (await scan(document.body)).map(({ text, url }) => { + return { text, url }; + }); + + expect(results).to.be.empty; + }); +}); diff --git a/tests/act/tests/de46e4/ca2f0f03e0dddd80cef6554814b919fac1666c02.ts b/tests/act/tests/de46e4/ca2f0f03e0dddd80cef6554814b919fac1666c02.ts new file mode 100644 index 0000000..6c60883 --- /dev/null +++ b/tests/act/tests/de46e4/ca2f0f03e0dddd80cef6554814b919fac1666c02.ts @@ -0,0 +1,20 @@ +import { fixture, expect } from "@open-wc/testing"; +import { scan } from "../../../../src/scanner"; + +describe("[de46e4]Element with lang attribute has valid language tag", function () { + it("Failed Example 1 (https://act-rules.github.io/testcases/de46e4/ca2f0f03e0dddd80cef6554814b919fac1666c02.html)", async () => { + await fixture(` + +
+ Zij liepen een vreemde Tiki bar binnen, aan de rand van een dorpje aan het strand. +
+ +`); + + const results = (await scan(document.body)).map(({ text, url }) => { + return { text, url }; + }); + + expect(results).to.not.be.empty; + }); +}); diff --git a/tests/act/tests/de46e4/e47a3d36d4f2a25286c2d0641968aa26f83dfbac.ts b/tests/act/tests/de46e4/e47a3d36d4f2a25286c2d0641968aa26f83dfbac.ts new file mode 100644 index 0000000..8aa7ca5 --- /dev/null +++ b/tests/act/tests/de46e4/e47a3d36d4f2a25286c2d0641968aa26f83dfbac.ts @@ -0,0 +1,20 @@ +import { fixture, expect } from "@open-wc/testing"; +import { scan } from "../../../../src/scanner"; + +describe("[de46e4]Element with lang attribute has valid language tag", function () { + it("Failed Example 3 (https://act-rules.github.io/testcases/de46e4/e47a3d36d4f2a25286c2d0641968aa26f83dfbac.html)", async () => { + await fixture(` + +
+ They wandered into a strange Tiki bar on the edge of the small beach town. +
+ +`); + + const results = (await scan(document.body)).map(({ text, url }) => { + return { text, url }; + }); + + expect(results).to.not.be.empty; + }); +}); diff --git a/tests/act/tests/de46e4/fd281d0b30ffe5442e38b6a109ab75c2a88ad21f.ts b/tests/act/tests/de46e4/fd281d0b30ffe5442e38b6a109ab75c2a88ad21f.ts new file mode 100644 index 0000000..40cd838 --- /dev/null +++ b/tests/act/tests/de46e4/fd281d0b30ffe5442e38b6a109ab75c2a88ad21f.ts @@ -0,0 +1,22 @@ +import { fixture, expect } from "@open-wc/testing"; +import { scan } from "../../../../src/scanner"; + +describe("[de46e4]Element with lang attribute has valid language tag", function () { + it("Failed Example 4 (https://act-rules.github.io/testcases/de46e4/fd281d0b30ffe5442e38b6a109ab75c2a88ad21f.html)", async () => { + await fixture(` + +
+ +
+ +`); + + const results = (await scan(document.body)).map(({ text, url }) => { + return { text, url }; + }); + + expect(results).to.not.be.empty; + }); +}); diff --git a/tests/act/tests/qt1vmo/766587b669e2928e8c5f21e3b1cd97e5b3e27a07.ts b/tests/act/tests/qt1vmo/766587b669e2928e8c5f21e3b1cd97e5b3e27a07.ts new file mode 100644 index 0000000..6224b71 --- /dev/null +++ b/tests/act/tests/qt1vmo/766587b669e2928e8c5f21e3b1cd97e5b3e27a07.ts @@ -0,0 +1,24 @@ +import { fixture, expect } from "@open-wc/testing"; +import { scan } from "../../../../src/scanner"; + +describe("[qt1vmo]Image accessible name is descriptive", function () { + it("Passed Example 3 (https://act-rules.github.io/testcases/qt1vmo/766587b669e2928e8c5f21e3b1cd97e5b3e27a07.html)", async () => { + await fixture(` + + +`); + + const results = (await scan(document.body)).map(({ text, url }) => { + return { text, url }; + }); + + expect(results).to.be.empty; + }); +}); diff --git a/tests/act/tests/qt1vmo/be6b29e220d6afbd827625c602ec49027e73fdf1.ts b/tests/act/tests/qt1vmo/be6b29e220d6afbd827625c602ec49027e73fdf1.ts new file mode 100644 index 0000000..b354167 --- /dev/null +++ b/tests/act/tests/qt1vmo/be6b29e220d6afbd827625c602ec49027e73fdf1.ts @@ -0,0 +1,16 @@ +import { fixture, expect } from "@open-wc/testing"; +import { scan } from "../../../../src/scanner"; + +describe("[qt1vmo]Image accessible name is descriptive", function () { + it("Passed Example 1 (https://act-rules.github.io/testcases/qt1vmo/be6b29e220d6afbd827625c602ec49027e73fdf1.html)", async () => { + await fixture(` + W3C +`); + + const results = (await scan(document.body)).map(({ text, url }) => { + return { text, url }; + }); + + expect(results).to.be.empty; + }); +}); diff --git a/tests/act/tests/qt1vmo/dd2f262645db0f473e294a02dff5576c6ccfe133.ts b/tests/act/tests/qt1vmo/dd2f262645db0f473e294a02dff5576c6ccfe133.ts new file mode 100644 index 0000000..fe36b0c --- /dev/null +++ b/tests/act/tests/qt1vmo/dd2f262645db0f473e294a02dff5576c6ccfe133.ts @@ -0,0 +1,27 @@ +import { fixture, expect } from "@open-wc/testing"; +import { scan } from "../../../../src/scanner"; + +describe("[qt1vmo]Image accessible name is descriptive", function () { + it("Passed Example 2 (https://act-rules.github.io/testcases/qt1vmo/dd2f262645db0f473e294a02dff5576c6ccfe133.html)", async () => { + await fixture(` + + + + + + + +`); + + const results = (await scan(document.body)).map(({ text, url }) => { + return { text, url }; + }); + + expect(results).to.be.empty; + }); +}); diff --git a/web-test-runner.config.mjs b/web-test-runner.config.mjs index f113677..d145ab6 100644 --- a/web-test-runner.config.mjs +++ b/web-test-runner.config.mjs @@ -1,37 +1,18 @@ // eslint-disable-next-line foo import { env } from "node:process"; -import { summaryReporter } from "@web/test-runner"; import { esbuildPlugin } from "@web/dev-server-esbuild"; import { playwrightLauncher } from "@web/test-runner-playwright"; import { junitReporter } from "@web/test-runner-junit-reporter"; const browsers = [playwrightLauncher({ product: "chromium" })]; -if (env.CI) { - browsers.push( - playwrightLauncher({ product: "firefox" }), - playwrightLauncher({ product: "webkit" }), - ); -} - -const reporters = [ - summaryReporter(), - env.CI - ? junitReporter({ - outputPath: "./test-results.xml", - reportLogs: true, - }) - : null, -]; - -export default { +const config = { nodeResolve: true, coverage: true, files: ["tests/**/*.ts", "tests/**/*.js"], plugins: [esbuildPlugin({ ts: true, target: "esnext" })], browsers, - reporters, filterBrowserLogs(log) { if ( typeof log.args[0] === "string" && @@ -44,3 +25,20 @@ export default { return true; }, }; + +if (env.CI) { + config.browsers.push( + playwrightLauncher({ product: "firefox" }), + playwrightLauncher({ product: "webkit" }), + ); + config.reporters = [ + env.CI + ? junitReporter({ + outputPath: "./test-results.xml", + reportLogs: true, + }) + : null, + ]; +} + +export default config;