-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(add-automation): added Azure pipeline config, shifted screenshot…
… function to puppeteer, accepted most German cookies
- Loading branch information
1 parent
50b4524
commit 51fd5b5
Showing
22 changed files
with
998 additions
and
98,188 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
require: tsx | ||
# 1 hour for report generation | ||
timeout: 3600000 | ||
timeout: 3600000 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
# folders | ||
public | ||
node_modules | ||
power-bi-desktop | ||
automation | ||
.vscode | ||
|
||
# files | ||
*.html |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,28 @@ | ||
import fs from "node:fs" | ||
import { assert, expect } from "chai" | ||
import { before, after, describe, it } from "mocha" | ||
|
||
import getValidUrlOrNull from "../utils/getValidUrlOrNull" | ||
import takeScreenshot from "../utils/takeScreenshot" | ||
import generateMultiPageReport from "../utils/report-generation/generateMultiPageReport" | ||
|
||
const SCREENSHOT_BASE_URL = "https://raw.githubusercontent.com/pan-senacor/digital-access-reporting-tool/refs/heads/feature/screenshots" | ||
let url: URL | null | ||
let logoUrl: URL | null | ||
|
||
before(() => { | ||
assert.isNotEmpty(process.env.URL, "URL is required") | ||
assert.isNotEmpty(process.env.LOGO_URL, "Logo URL is required") | ||
url = getValidUrlOrNull(process.env.URL || "") | ||
logoUrl = getValidUrlOrNull(process.env.LOGO_URL || "") | ||
assert.isNotEmpty(process.env.URL, "URL is required") | ||
assert.isNotEmpty(process.env.LOGO_URL, "Logo URL is required") | ||
url = getValidUrlOrNull(process.env.URL || "") | ||
logoUrl = getValidUrlOrNull(process.env.LOGO_URL || "") | ||
}) | ||
|
||
after(() => { | ||
}) | ||
after(() => {}) | ||
|
||
describe("Generate equal access multi-page report", () => { | ||
it("WCAG", async () => { | ||
const screenshotPath = await takeScreenshot(url!) | ||
assert.isNotEmpty(screenshotPath, `Failed to create screenshot for URL: ${url}`) | ||
const { multiPageReport } = await generateMultiPageReport(url!, logoUrl!, `${SCREENSHOT_BASE_URL}/${screenshotPath}`) | ||
assert.isNotEmpty(multiPageReport) | ||
expect(multiPageReport.pageCount).to.be.above(0) | ||
fs.writeFileSync("./.accessibility-checker/accessibility-report.json", JSON.stringify({ report: multiPageReport })) | ||
}) | ||
it("WCAG", async () => { | ||
const screenshotUrl = await takeScreenshot(url!) | ||
assert.isNotEmpty(screenshotUrl, `Failed to create screenshot for URL: ${url}`) | ||
const { multiPageReport } = await generateMultiPageReport(url!, logoUrl!, screenshotUrl) | ||
assert.isNotEmpty(multiPageReport) | ||
expect(multiPageReport.pageCount).to.be.above(0) | ||
}) | ||
}) |
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
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
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
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
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
Oops, something went wrong.