Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Alfa #59

Merged
merged 2 commits into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions accessibility-code-checker/playwright/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"devDependencies": {
"@playwright/test": "^1.47.0",
"@siteimprove/alfa-playwright": "^0.73.2",
"@siteimprove/alfa-test-utils": "^0.73.2"
"@siteimprove/alfa-playwright": "^0.74.0",
"@siteimprove/alfa-test-utils": "^0.74.0"
}
}
40 changes: 17 additions & 23 deletions accessibility-code-checker/playwright/test/playwright.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { test, expect } from "@playwright/test";

import { Playwright } from "@siteimprove/alfa-playwright";
import { Audit, Logging, Outcomes, SIP } from "@siteimprove/alfa-test-utils";
import { Audit, Logging, SIP } from "@siteimprove/alfa-test-utils";

test("is page accessible", async ({ page }) => {
// Navigate to the local web page
Expand All @@ -14,38 +15,31 @@ test("is page accessible", async ({ page }) => {
// Scrape the page
const alfaPage = await Playwright.toPage(document);

const alfaResult = await Audit.run(alfaPage, {
outcomes: {
exclude: Outcomes.insideSelectorFilter("iframe"),
},
});

// Log the result, and upload it to the Siteimprove Intelligence Platform
// if credentials have been provided.
// Run the audit
const alfaResult = await Audit.run(alfaPage);

// Setup credentials from environment variables.
const userName = process.env.SI_USER_EMAIL;
const apiKey = process.env.SI_API_KEY;

if (userName !== undefined && apiKey !== undefined) {
// We have credentials, so we can upload results.
const url = await SIP.upload(alfaResult, {
userName,
apiKey,
testName: (git) => git.BranchName,
});
// Upload the result to Siteimprove Intelligence Platform, if credentials are provided
const url = await SIP.upload(alfaResult, {
userName,
apiKey,
testName: (git) => git.BranchName,
});

Logging.result(alfaResult, url);
} else {
// We have no credentials and only do local logging.
Logging.result(alfaResult);
}
// Log the result to the console
Logging.fromAudit(alfaResult, url).print();

// Check if some rule was failing.
const failingRules = alfaResult.resultAggregates.filter(
(aggregate) => aggregate.failed > 0
(aggregate) => aggregate.failed > 0,
);

// Fail the test if any rule failed.
expect(
failingRules.size,
`The page has ${failingRules.size} failing rules`
`The page has ${failingRules.size} failing rules`,
).toBe(0);
});
14 changes: 7 additions & 7 deletions common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
"./persist.js": "./persist.js"
},
"devDependencies": {
"@siteimprove/alfa-act": "^0.93.0",
"@siteimprove/alfa-assert": "^0.73.2",
"@siteimprove/alfa-formatter": "^0.73.2",
"@siteimprove/alfa-hash": "^0.93.0",
"@siteimprove/alfa-mapper": "^0.93.0"
"@siteimprove/alfa-act": "^0.93.6",
"@siteimprove/alfa-assert": "^0.74.0",
"@siteimprove/alfa-formatter": "^0.74.0",
"@siteimprove/alfa-hash": "^0.93.6",
"@siteimprove/alfa-mapper": "^0.93.6"
},
"dependencies": {
"@siteimprove/alfa-formatter-earl": "^0.73.2",
"@siteimprove/alfa-future": "^0.93.0"
"@siteimprove/alfa-formatter-earl": "^0.74.0",
"@siteimprove/alfa-future": "^0.93.6"
}
}
18 changes: 9 additions & 9 deletions custom-testing/adding-rules/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
"node": ">=20.0.0"
},
"devDependencies": {
"@siteimprove/alfa-act": "^0.93.0",
"@siteimprove/alfa-chai": "^0.73.2",
"@siteimprove/alfa-dom": "^0.93.0",
"@siteimprove/alfa-future": "^0.93.0",
"@siteimprove/alfa-playwright": "^0.73.2",
"@siteimprove/alfa-refinement": "^0.93.0",
"@siteimprove/alfa-result": "^0.93.0",
"@siteimprove/alfa-rules": "^0.93.0",
"@siteimprove/alfa-web": "^0.93.0",
"@siteimprove/alfa-act": "^0.93.6",
"@siteimprove/alfa-chai": "^0.74.0",
"@siteimprove/alfa-dom": "^0.93.6",
"@siteimprove/alfa-future": "^0.93.6",
"@siteimprove/alfa-playwright": "^0.74.0",
"@siteimprove/alfa-refinement": "^0.93.6",
"@siteimprove/alfa-result": "^0.93.6",
"@siteimprove/alfa-rules": "^0.93.6",
"@siteimprove/alfa-web": "^0.93.6",
"@types/chai": "^5.0.0",
"@types/mocha": "^10.0.0",
"chai": "^5.0.0",
Expand Down
20 changes: 10 additions & 10 deletions custom-testing/answering/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@
"node": ">=20.0.0"
},
"devDependencies": {
"@siteimprove/alfa-act": "^0.93.0",
"@siteimprove/alfa-chai": "^0.73.2",
"@siteimprove/alfa-css": "^0.93.0",
"@siteimprove/alfa-dom": "^0.93.0",
"@siteimprove/alfa-future": "^0.93.0",
"@siteimprove/alfa-hash": "^0.93.0",
"@siteimprove/alfa-option": "^0.93.0",
"@siteimprove/alfa-playwright": "^0.73.2",
"@siteimprove/alfa-refinement": "^0.93.0",
"@siteimprove/alfa-rules": "^0.93.0",
"@siteimprove/alfa-act": "^0.93.6",
"@siteimprove/alfa-chai": "^0.74.0",
"@siteimprove/alfa-css": "^0.93.6",
"@siteimprove/alfa-dom": "^0.93.6",
"@siteimprove/alfa-future": "^0.93.6",
"@siteimprove/alfa-hash": "^0.93.6",
"@siteimprove/alfa-option": "^0.93.6",
"@siteimprove/alfa-playwright": "^0.74.0",
"@siteimprove/alfa-refinement": "^0.93.6",
"@siteimprove/alfa-rules": "^0.93.6",
"@types/chai": "^5.0.0",
"@types/mocha": "^10.0.0",
"chai": "^5.0.0",
Expand Down
10 changes: 5 additions & 5 deletions custom-testing/crawling/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
"node": ">=20.0.0"
},
"devDependencies": {
"@siteimprove/alfa-act": "^0.93.0",
"@siteimprove/alfa-crawler": "^0.73.2",
"@siteimprove/alfa-frontier": "^0.73.2",
"@siteimprove/alfa-hash": "^0.93.0",
"@siteimprove/alfa-rules": "^0.93.0"
"@siteimprove/alfa-act": "^0.93.6",
"@siteimprove/alfa-crawler": "^0.74.0",
"@siteimprove/alfa-frontier": "^0.74.0",
"@siteimprove/alfa-hash": "^0.93.6",
"@siteimprove/alfa-rules": "^0.93.6"
}
}
18 changes: 9 additions & 9 deletions custom-testing/filtering/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
"node": ">=20.0.0"
},
"devDependencies": {
"@siteimprove/alfa-act": "^0.93.0",
"@siteimprove/alfa-chai": "^0.73.2",
"@siteimprove/alfa-future": "^0.93.0",
"@siteimprove/alfa-hash": "^0.93.0",
"@siteimprove/alfa-iterable": "^0.93.0",
"@siteimprove/alfa-playwright": "^0.73.2",
"@siteimprove/alfa-refinement": "^0.93.0",
"@siteimprove/alfa-rules": "^0.93.0",
"@siteimprove/alfa-wcag": "^0.93.0",
"@siteimprove/alfa-act": "^0.93.6",
"@siteimprove/alfa-chai": "^0.74.0",
"@siteimprove/alfa-future": "^0.93.6",
"@siteimprove/alfa-hash": "^0.93.6",
"@siteimprove/alfa-iterable": "^0.93.6",
"@siteimprove/alfa-playwright": "^0.74.0",
"@siteimprove/alfa-refinement": "^0.93.6",
"@siteimprove/alfa-rules": "^0.93.6",
"@siteimprove/alfa-wcag": "^0.93.6",
"@types/chai": "^5.0.0",
"@types/mocha": "^10.0.0",
"chai": "^5.0.0",
Expand Down
8 changes: 4 additions & 4 deletions custom-testing/interacting/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
"node": ">=20.0.0"
},
"devDependencies": {
"@siteimprove/alfa-chai": "^0.73.2",
"@siteimprove/alfa-future": "^0.93.0",
"@siteimprove/alfa-playwright": "^0.73.2",
"@siteimprove/alfa-rules": "^0.93.0",
"@siteimprove/alfa-chai": "^0.74.0",
"@siteimprove/alfa-future": "^0.93.6",
"@siteimprove/alfa-playwright": "^0.74.0",
"@siteimprove/alfa-rules": "^0.93.6",
"@types/chai": "^5.0.0",
"@types/mocha": "^10.0.0",
"chai": "^5.0.0",
Expand Down
12 changes: 6 additions & 6 deletions custom-testing/measuring-performances/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
"node": ">=20.0.0"
},
"devDependencies": {
"@siteimprove/alfa-act": "^0.93.0",
"@siteimprove/alfa-aria": "^0.93.0",
"@siteimprove/alfa-cascade": "^0.93.0",
"@siteimprove/alfa-performance": "^0.93.0",
"@siteimprove/alfa-rules": "^0.93.0",
"@siteimprove/alfa-scraper": "^0.73.2"
"@siteimprove/alfa-act": "^0.93.6",
"@siteimprove/alfa-aria": "^0.93.6",
"@siteimprove/alfa-cascade": "^0.93.6",
"@siteimprove/alfa-performance": "^0.93.6",
"@siteimprove/alfa-rules": "^0.93.6",
"@siteimprove/alfa-scraper": "^0.74.0"
}
}
8 changes: 4 additions & 4 deletions custom-testing/navigating/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
"node": ">=20.0.0"
},
"devDependencies": {
"@siteimprove/alfa-chai": "^0.73.2",
"@siteimprove/alfa-future": "^0.93.0",
"@siteimprove/alfa-playwright": "^0.73.2",
"@siteimprove/alfa-rules": "^0.93.0",
"@siteimprove/alfa-chai": "^0.74.0",
"@siteimprove/alfa-future": "^0.93.6",
"@siteimprove/alfa-playwright": "^0.74.0",
"@siteimprove/alfa-rules": "^0.93.6",
"@types/chai": "^5.0.0",
"@types/mocha": "^10.0.0",
"chai": "^5.0.0",
Expand Down
8 changes: 4 additions & 4 deletions custom-testing/scraping/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
"test": "node scraping.js"
},
"devDependencies": {
"@siteimprove/alfa-act": "^0.93.0",
"@siteimprove/alfa-hash": "^0.93.0",
"@siteimprove/alfa-rules": "^0.93.0",
"@siteimprove/alfa-scraper": "^0.73.2"
"@siteimprove/alfa-act": "^0.93.6",
"@siteimprove/alfa-hash": "^0.93.6",
"@siteimprove/alfa-rules": "^0.93.6",
"@siteimprove/alfa-scraper": "^0.74.0"
}
}
4 changes: 2 additions & 2 deletions end-to-end-testing/cypress/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"node": ">=20.0.0"
},
"devDependencies": {
"@siteimprove/alfa-cypress": "^0.73.2",
"@siteimprove/alfa-rules": "^0.93.0",
"@siteimprove/alfa-cypress": "^0.74.0",
"@siteimprove/alfa-rules": "^0.93.6",
"cypress": "^13.3.1"
}
}
8 changes: 4 additions & 4 deletions end-to-end-testing/playwright/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
"node": ">=20.0.0"
},
"devDependencies": {
"@siteimprove/alfa-chai": "^0.73.2",
"@siteimprove/alfa-future": "^0.93.0",
"@siteimprove/alfa-playwright": "^0.73.2",
"@siteimprove/alfa-rules": "^0.93.0",
"@siteimprove/alfa-chai": "^0.74.0",
"@siteimprove/alfa-future": "^0.93.6",
"@siteimprove/alfa-playwright": "^0.74.0",
"@siteimprove/alfa-rules": "^0.93.6",
"@types/chai": "^5.0.0",
"@types/mocha": "^10.0.0",
"chai": "^5.0.0",
Expand Down
8 changes: 4 additions & 4 deletions end-to-end-testing/puppeteer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
"node": ">=20.0.0"
},
"devDependencies": {
"@siteimprove/alfa-chai": "^0.73.2",
"@siteimprove/alfa-future": "^0.93.0",
"@siteimprove/alfa-puppeteer": "^0.73.2",
"@siteimprove/alfa-rules": "^0.93.0",
"@siteimprove/alfa-chai": "^0.74.0",
"@siteimprove/alfa-future": "^0.93.6",
"@siteimprove/alfa-puppeteer": "^0.74.0",
"@siteimprove/alfa-rules": "^0.93.6",
"@types/chai": "^5.0.0",
"@types/mocha": "^10.0.0",
"chai": "^5.0.0",
Expand Down
8 changes: 4 additions & 4 deletions end-to-end-testing/webdriver/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
"node": ">=20.0.0"
},
"devDependencies": {
"@siteimprove/alfa-chai": "^0.73.2",
"@siteimprove/alfa-future": "^0.93.0",
"@siteimprove/alfa-rules": "^0.93.0",
"@siteimprove/alfa-webdriver": "^0.73.2",
"@siteimprove/alfa-chai": "^0.74.0",
"@siteimprove/alfa-future": "^0.93.6",
"@siteimprove/alfa-rules": "^0.93.6",
"@siteimprove/alfa-webdriver": "^0.74.0",
"@types/chai": "^5.0.0",
"@types/mocha": "^10.0.0",
"@wdio/cli": "^5.14.4",
Expand Down
8 changes: 4 additions & 4 deletions unit-testing/angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@
"zone.js": "^0.11.4"
},
"devDependencies": {
"@siteimprove/alfa-angular": "^0.73.2",
"@siteimprove/alfa-future": "^0.93.0",
"@siteimprove/alfa-jest": "^0.73.2",
"@siteimprove/alfa-rules": "^0.93.0",
"@siteimprove/alfa-angular": "^0.74.0",
"@siteimprove/alfa-future": "^0.93.6",
"@siteimprove/alfa-jest": "^0.74.0",
"@siteimprove/alfa-rules": "^0.93.6",
"@types/jest": "^29.5.1",
"common": "workspace:^",
"jest": "^29.5.0",
Expand Down
6 changes: 3 additions & 3 deletions unit-testing/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
"node": ">=20.0.0"
},
"devDependencies": {
"@siteimprove/alfa-enzyme": "^0.73.2",
"@siteimprove/alfa-jest": "^0.73.2",
"@siteimprove/alfa-rules": "^0.93.0",
"@siteimprove/alfa-enzyme": "^0.74.0",
"@siteimprove/alfa-jest": "^0.74.0",
"@siteimprove/alfa-rules": "^0.93.6",
"@types/enzyme": "^3.10.5",
"@types/enzyme-adapter-react-16": "^1.0.5",
"@types/jest": "^29.5.1",
Expand Down
8 changes: 4 additions & 4 deletions unit-testing/vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@
},
"devDependencies": {
"@jest/environment": "^29.7.0",
"@siteimprove/alfa-future": "^0.93.0",
"@siteimprove/alfa-jest": "^0.73.2",
"@siteimprove/alfa-rules": "^0.93.0",
"@siteimprove/alfa-vue": "^0.73.2",
"@siteimprove/alfa-future": "^0.93.6",
"@siteimprove/alfa-jest": "^0.74.0",
"@siteimprove/alfa-rules": "^0.93.6",
"@siteimprove/alfa-vue": "^0.74.0",
"@types/jest": "^29.5.1",
"@vue/test-utils": "^1.0.0-beta.29",
"common": "workspace:^",
Expand Down
Loading