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

Add test-axe script for desktop #2798

Merged
merged 2 commits into from
Sep 12, 2023
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: 3 additions & 1 deletion desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
"clean": "rimraf build/* dll/* python/dist/* python/build/* src/generated/*",
"karma": "cross-env NODE_OPTIONS=--openssl-legacy-provider node --max_old_space_size=4096 node_modules/karma/bin/karma",
"test": "npm run test-client:coverage && npm run test-app",
"test:all": "cross-env BE_ENABLE_A11Y_TESTING=true npm run test-client:coverage && npm run test-app",
"test-app:a11y": "cross-env BE_ENABLE_A11Y_TESTING=true npm run test-app",
"test-app": "cross-env COVERAGE=1 npm run karma -- start",
"test-app:mem": "cross-env DEBUG_MEM=1 npm run test-app",
"test-app-watch": "npm run karma -- start --auto-watch --no-single-run",
Expand Down Expand Up @@ -83,7 +85,7 @@
"workspace:start:desktop": "npm run dev-server",
"workspace:test": "npm run test",
"workspace:test:desktop": "npm run test",
"workspace:test:all": "npm run test"
"workspace:test:all": "npm run test:all"
},
"license": "MIT",
"engines": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { ActivityMonitorItemComponent } from "./activity-monitor-item";
import { ActivityMonitorItemActionComponent } from "./activity-monitor-item/activity-monitor-item-action";
import { ActivityMonitorTreeViewComponent } from "./activity-monitor-tree-view";
import { ActivityMonitorComponent } from "./activity-monitor.component";
import { runAxe } from "test/utils/helpers/axe-helpers";

describe("ActivityMonitorComponent", () => {
let fixture: ComponentFixture<ActivityMonitorComponent>;
Expand Down Expand Up @@ -87,4 +88,8 @@ describe("ActivityMonitorComponent", () => {

expect(component.runningActivities.length).toBe(0);
});

it("should pass accessibility test activity monitor", async () => {
expect(await runAxe(fixture.nativeElement)).toHaveNoViolations();
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import * as TestConstants from "test/test-constants";
import { validateControl } from "test/utils/helpers";
import { ServerErrorMockComponent, complexFormMockComponents } from "test/utils/mocks/components";
import { BatchAccountCreateComponent } from "./batch-account-create.component";
import { runAxe } from "test/utils/helpers/axe-helpers";

describe("BatchAccountCreateComponent ", () => {
let fixture: ComponentFixture<BatchAccountCreateComponent>;
Expand Down Expand Up @@ -187,6 +188,10 @@ describe("BatchAccountCreateComponent ", () => {
expect(debugElement.nativeElement.textContent).toContain("Create batch account");
});

it("should pass accessibility test batch account create", async () => {
expect(await runAxe(fixture.nativeElement)).toHaveNoViolations();
});

describe("Batch account name", () => {
it("should initialize name control", () => {
const input = debugElement.query(By.css("input[formControlName=name]")).nativeElement;
Expand Down