Skip to content

Commit

Permalink
Remove axe e2e tests that are duplicated in axe.test.ts (#5653)
Browse files Browse the repository at this point in the history
* Remove axe e2e tests that are diplicated in axe.test.ts

* mistake
  • Loading branch information
kendallgassner authored Feb 4, 2025
1 parent 20bb3e6 commit 14b840f
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 237 deletions.
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

0 comments on commit 14b840f

Please sign in to comment.