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

Remove axe e2e tests that are duplicated in axe.test.ts #5653

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
16 changes: 0 additions & 16 deletions e2e/components/CheckboxGroup.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,22 +47,6 @@ test.describe('CheckboxGroup', () => {
`CheckboxGroup.${story.title}.${theme}.png`,
)
})

test('axe @aat', async ({page}) => {
await visit(page, {
id: story.id,
globals: {
colorScheme: theme,
},
})
await expect(page).toHaveNoViolations({
rules: {
'color-contrast': {
enabled: false,
},
},
})
})
})
}
})
Expand Down
16 changes: 0 additions & 16 deletions e2e/components/Details.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,22 +34,6 @@ test.describe('Details', () => {
// Open state
expect(await page.screenshot()).toMatchSnapshot(`Details.${story.title}.${theme}.open.png`)
})

test('axe @aat', async ({page}) => {
await visit(page, {
id: story.id,
globals: {
colorScheme: theme,
},
})
await expect(page).toHaveNoViolations({
rules: {
'color-contrast': {
enabled: false,
},
},
})
})
})
}
})
Expand Down
20 changes: 0 additions & 20 deletions e2e/components/PageHeader.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,26 +234,6 @@ test.describe('PageHeader', () => {
// Default state
expect(await page.screenshot()).toMatchSnapshot(`PageHeader.With Page Layout.${theme}.png`)
})

test('axe @aat', async ({page}) => {
await visit(page, {
id: 'components-pageheader-examples--with-page-layout',
globals: {
colorScheme: theme,
},
})
await expect(page).toHaveNoViolations({
rules: {
'color-contrast': {
enabled: false,
},
// TODO: Remove this rule when the issue is fixed https://github.com/github/primer/issues/1865
'scrollable-region-focusable': {
enabled: false,
},
},
})
})
})
}
})
Expand Down
16 changes: 0 additions & 16 deletions e2e/components/Radio.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,22 +85,6 @@ test.describe('Radio', () => {
// Default state
expect(await page.screenshot()).toMatchSnapshot(`Radio.With Caption.${theme}.png`)
})

test('axe @aat', async ({page}) => {
await visit(page, {
id: 'components-radio-features--with-caption',
globals: {
colorScheme: theme,
},
})
await expect(page).toHaveNoViolations({
rules: {
'color-contrast': {
enabled: false,
},
},
})
})
})
}
})
Expand Down
153 changes: 0 additions & 153 deletions e2e/components/StateLabel.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,6 @@ test.describe('StateLabel', () => {
// Default state
expect(await page.screenshot()).toMatchSnapshot(`StateLabel.Draft.${theme}.png`)
})

test('axe @aat', async ({page}) => {
await visit(page, {
id: 'components-statelabel-features--draft',
globals: {
colorScheme: theme,
},
})
await expect(page).toHaveNoViolations({
rules: {
'color-contrast': {
enabled: false,
},
},
})
})
})
}
})
Expand All @@ -51,22 +35,6 @@ test.describe('StateLabel', () => {
// Default state
expect(await page.screenshot()).toMatchSnapshot(`StateLabel.Issue Closed.${theme}.png`)
})

test('axe @aat', async ({page}) => {
await visit(page, {
id: 'components-statelabel-features--issue-closed',
globals: {
colorScheme: theme,
},
})
await expect(page).toHaveNoViolations({
rules: {
'color-contrast': {
enabled: false,
},
},
})
})
})
}
})
Expand All @@ -85,22 +53,6 @@ test.describe('StateLabel', () => {
// Default state
expect(await page.screenshot()).toMatchSnapshot(`StateLabel.Issue Closed Not Planned.${theme}.png`)
})

test('axe @aat', async ({page}) => {
await visit(page, {
id: 'components-statelabel-features--issue-closed-not-planned',
globals: {
colorScheme: theme,
},
})
await expect(page).toHaveNoViolations({
rules: {
'color-contrast': {
enabled: false,
},
},
})
})
})
}
})
Expand All @@ -119,22 +71,6 @@ test.describe('StateLabel', () => {
// Default state
expect(await page.screenshot()).toMatchSnapshot(`StateLabel.Issue Draft.${theme}.png`)
})

test('axe @aat', async ({page}) => {
await visit(page, {
id: 'components-statelabel-features--issue-draft',
globals: {
colorScheme: theme,
},
})
await expect(page).toHaveNoViolations({
rules: {
'color-contrast': {
enabled: false,
},
},
})
})
})
}
})
Expand All @@ -153,22 +89,6 @@ test.describe('StateLabel', () => {
// Default state
expect(await page.screenshot()).toMatchSnapshot(`StateLabel.Issue Opened.${theme}.png`)
})

test('axe @aat', async ({page}) => {
await visit(page, {
id: 'components-statelabel-features--issue-opened',
globals: {
colorScheme: theme,
},
})
await expect(page).toHaveNoViolations({
rules: {
'color-contrast': {
enabled: false,
},
},
})
})
})
}
})
Expand All @@ -187,22 +107,6 @@ test.describe('StateLabel', () => {
// Default state
expect(await page.screenshot()).toMatchSnapshot(`StateLabel.Pull Closed.${theme}.png`)
})

test('axe @aat', async ({page}) => {
await visit(page, {
id: 'components-statelabel-features--pull-closed',
globals: {
colorScheme: theme,
},
})
await expect(page).toHaveNoViolations({
rules: {
'color-contrast': {
enabled: false,
},
},
})
})
})
}
})
Expand All @@ -221,22 +125,6 @@ test.describe('StateLabel', () => {
// Default state
expect(await page.screenshot()).toMatchSnapshot(`StateLabel.Pull Merged.${theme}.png`)
})

test('axe @aat', async ({page}) => {
await visit(page, {
id: 'components-statelabel-features--pull-merged',
globals: {
colorScheme: theme,
},
})
await expect(page).toHaveNoViolations({
rules: {
'color-contrast': {
enabled: false,
},
},
})
})
})
}
})
Expand All @@ -255,22 +143,6 @@ test.describe('StateLabel', () => {
// Default state
expect(await page.screenshot()).toMatchSnapshot(`StateLabel.Pull Opened.${theme}.png`)
})

test('axe @aat', async ({page}) => {
await visit(page, {
id: 'components-statelabel-features--pull-opened',
globals: {
colorScheme: theme,
},
})
await expect(page).toHaveNoViolations({
rules: {
'color-contrast': {
enabled: false,
},
},
})
})
})
}
})
Expand All @@ -289,15 +161,6 @@ test.describe('StateLabel', () => {
// Default state
expect(await page.screenshot()).toMatchSnapshot(`StateLabel.Unavailable.${theme}.png`)
})

test('axe @aat', async ({page}) => {
await visit(page, {
id: 'components-statelabel-features--unavailable',
globals: {
colorScheme: theme,
},
})
})
})
}
})
Expand All @@ -316,22 +179,6 @@ test.describe('StateLabel', () => {
// Default state
expect(await page.screenshot()).toMatchSnapshot(`StateLabel.Small.${theme}.png`)
})

test('axe @aat', async ({page}) => {
await visit(page, {
id: 'components-statelabel-features--small',
globals: {
colorScheme: theme,
},
})
await expect(page).toHaveNoViolations({
rules: {
'color-contrast': {
enabled: false,
},
},
})
})
})
}
})
Expand Down
16 changes: 0 additions & 16 deletions e2e/components/ToggleSwitch.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -294,22 +294,6 @@ test.describe('ToggleSwitch', () => {
// Default state
expect(await page.screenshot()).toMatchSnapshot(`ToggleSwitch.With Caption.${theme}.png`)
})

test('axe @aat', async ({page}) => {
await visit(page, {
id: 'components-toggleswitch-features--with-caption',
globals: {
colorScheme: theme,
},
})
await expect(page).toHaveNoViolations({
rules: {
'color-contrast': {
enabled: false,
},
},
})
})
})
}
})
Expand Down
Loading