-
Notifications
You must be signed in to change notification settings - Fork 346
Create pipeline that will automatically check for Accessibility Issues #1584
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
Merged
Merged
Changes from all commits
Commits
Show all changes
57 commits
Select commit
Hold shift + click to select a range
405a61c
Create mainCI.yml
malincrist 9bbf7e0
Update mainCI.yml
malincrist caedd2b
Update mainCI.yml
malincrist 2887f28
Update mainCI.yml
malincrist c6aefc0
Update mainCI.yml
malincrist e776f36
Update mainCI.yml
malincrist 45b64c0
added script for build website
malincrist 986bcc0
Update mainCI.yml
malincrist 50ef0ec
Update mainCI.yml
malincrist 5f04098
Update mainCI.yml
malincrist 9c1b591
Update mainCI.yml
malincrist 399d615
Update mainCI.yml
malincrist 7a05290
Update mainCI.yml
malincrist d3059b0
Update mainCI.yml
malincrist ba730fa
Fixed color contrast accessibility issues
malincrist d75ecc6
Merge branch 'malincrist/accessibilityCI' of https://github.com/Azure…
malincrist 0f13103
Fixed ari-roles issues
malincrist cec1e93
added static storage wip
malincrist 02d2055
Added missing static data
malincrist c7d2358
Merge branch 'master' into malincrist/accessibilityCI
malincrist 715bfae
Update mainCI.yml
malincrist be18868
added static data for requests made at publishing time
malincrist ac8582d
updated PublisherStaticDataProvider
malincrist 11628e4
updated PublisherStaticDataProvider
malincrist 398503c
updated PublisherStaticDataProvider
malincrist c004508
get data from default.json too
malincrist 20042b8
added build-static-data script
malincrist 430b536
refactoring
malincrist 78fa822
removed logs
malincrist 83878d9
removed some headers from static data
malincrist 208c274
removed headers
malincrist 2b2a17f
added smaller GraphQL api
malincrist 53a87c6
Update mainCI.yml
malincrist 98c4575
Update mainCI.yml
malincrist 74bc14b
Update mainCI.yml
malincrist 1a06d9d
Update mainCI.yml
malincrist 6d5ab6d
test accessibility on profile
malincrist ff98149
Merge branch 'malincrist/accessibilityCI' of https://github.com/Azure…
malincrist fcc3a5e
Update mainCI.yml
malincrist 95754f4
Update mainCI.yml
malincrist 5aae7fe
removed headers
malincrist 855aa2b
Merge branch 'malincrist/accessibilityCI' of https://github.com/Azure…
malincrist 81c23fb
test with pre-populated e-mail and password
malincrist fc7850f
merged with master
malincrist 6e63f11
compacted json files
malincrist 79b269e
removed test e-mail and password
malincrist 69293c1
code review changes
malincrist c36ffe0
test for signed in version
malincrist c07a5ac
added default.json and defaultMockData.json only for staticData
malincrist ad0fdd7
fixed webpack configs
malincrist 555aa5f
fixed accessibility issues
malincrist 3700ae3
fixed accessibility issues
malincrist 2320ed4
added staticDataEnviroment constant
malincrist d850092
Update mainCI.yml
malincrist 6683417
removed logs
malincrist 0a580ae
Merge branch 'malincrist/accessibilityCI' of https://github.com/Azure…
malincrist 9cd827e
renamed defaultMockData.json
malincrist File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: CI | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Use Node.js 16.x | ||
uses: actions/checkout@v2 | ||
with: | ||
node-version: 16.x | ||
|
||
- name: Install | ||
run: npm install | ||
|
||
- name: Build | ||
run: npm run build-static-data | ||
|
||
- name: Scan for accessibility issues | ||
uses: microsoft/accessibility-insights-action@v2 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
site-dir: ${{ github.workspace }}/dist/website | ||
localhost-port: 12345 | ||
input-urls: http://localhost:12345/profile http://localhost:12345/500 http://localhost:12345/404 | ||
|
||
- name: Upload report artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: accessibility-reports | ||
path: ${{ github.workspace }}/_accessibility-reports |
This file contains hidden or 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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
const staticDataEnvironment = "staticData"; | ||
|
||
module.exports = { | ||
staticDataEnvironment | ||
} |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export default interface IStaticDataProvider { | ||
getStaticData(objectType: string): Promise<any>; | ||
} |
This file contains hidden or 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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import path = require("path"); | ||
import IStaticDataProvider from "./IStaticDataProvider"; | ||
const fs = require('fs'); | ||
|
||
export class PublisherStaticDataProvider implements IStaticDataProvider { | ||
getStaticData(objectType: string): Promise<any> { | ||
let fullPath = objectType == "defaultStaticData.json" ? | ||
path.join(__dirname, '../../tests/mocks/defaultStaticData.json') : path.join(__dirname, '../../templates/default.json'); | ||
let filePath = path.resolve(fullPath); | ||
|
||
return new Promise<any>((resolve, reject) => { | ||
fs.readFile(filePath, { encoding: 'utf-8' }, function (err, data) { | ||
if (err) { | ||
reject(); | ||
return; | ||
} | ||
|
||
const obj = JSON.parse(data); | ||
resolve(obj); | ||
}); | ||
}); | ||
} | ||
} |
This file contains hidden or 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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { HttpMethod } from "@paperbits/common/http"; | ||
import { XmlHttpRequestClient } from "@paperbits/common/http/xmlHttpRequestClient"; | ||
import IStaticDataProvider from "./IStaticDataProvider"; | ||
|
||
export class RuntimeStaticDataProvider implements IStaticDataProvider { | ||
private readonly httpClient: XmlHttpRequestClient; | ||
constructor() { | ||
this.httpClient = new XmlHttpRequestClient(); | ||
} | ||
getStaticData(objectType: string): Promise<any> { | ||
let path = objectType == "defaultStaticData.json" ? "/tests/mocks/defaultStaticData.json" : "/editors/templates/default.json"; | ||
|
||
return new Promise<any>(async (resolve, reject) => { | ||
let result = await this.httpClient.send({ | ||
method: HttpMethod.get, | ||
url: path, | ||
headers: [], | ||
body: {} | ||
}); | ||
resolve(result.toObject()); | ||
}); | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.