Skip to content

Commit 1190c3e

Browse files
Rachelmarktnoonan
andauthored
chore: various flaky + a11y improvements (#23745)
Co-authored-by: Mark Noonan <[email protected]>
1 parent bc804f8 commit 1190c3e

File tree

4 files changed

+27
-10
lines changed

4 files changed

+27
-10
lines changed

circle.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ macWorkflowFilters: &darwin-workflow-filters
3636
when:
3737
or:
3838
- equal: [ develop, << pipeline.git.branch >> ]
39-
- equal: [ 'webkit-experimental', << pipeline.git.branch >> ]
39+
- equal: [ 'correct-dashboard-results', << pipeline.git.branch >> ]
4040
- matches:
4141
pattern: "-release$"
4242
value: << pipeline.git.branch >>
@@ -45,7 +45,6 @@ linuxArm64WorkflowFilters: &linux-arm64-workflow-filters
4545
when:
4646
or:
4747
- equal: [ develop, << pipeline.git.branch >> ]
48-
- equal: [ 'webkit-experimental', << pipeline.git.branch >> ]
4948
- matches:
5049
pattern: "-release$"
5150
value: << pipeline.git.branch >>
@@ -65,7 +64,7 @@ windowsWorkflowFilters: &windows-workflow-filters
6564
or:
6665
- equal: [ develop, << pipeline.git.branch >> ]
6766
- equal: [ linux-arm64, << pipeline.git.branch >> ]
68-
- equal: [ 'webkit-experimental', << pipeline.git.branch >> ]
67+
- equal: [ 'lmiller/fixing-flake-1', << pipeline.git.branch >> ]
6968
- matches:
7069
pattern: "-release$"
7170
value: << pipeline.git.branch >>
@@ -1283,9 +1282,12 @@ jobs:
12831282
run-webpack-dev-server-integration-tests,
12841283
run-vite-dev-server-integration-tests
12851284
- run:
1285+
# Sometimes, even though all the circle jobs have finished, Percy times out during `build:finalize`
1286+
# If all other jobs finish but `build:finalize` fails, we retry it once
1287+
name: Finalize percy build - allows single retry
12861288
command: |
12871289
PERCY_PARALLEL_NONCE=$CIRCLE_WORKFLOW_WORKSPACE_ID \
1288-
yarn percy build:finalize
1290+
yarn percy build:finalize || yarn percy build:finalize
12891291
12901292
cli-visual-tests:
12911293
<<: *defaults

packages/frontend-shared/src/gql-components/HeaderBarContent.cy.tsx

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@ describe('<HeaderBarContent />', { viewportWidth: 1000, viewportHeight: 750 }, (
1515
})
1616
}
1717

18-
afterEach(() => {
19-
cy.percySnapshot()
20-
})
21-
2218
it('renders with functional browser menu when show-browsers prop is true', () => {
2319
cy.mountFragment(HeaderBar_HeaderBarContentFragmentDoc, {
2420
render: (gqlVal) => <div class="border-current border-1 h-700px resize overflow-auto"><HeaderBarContent gql={gqlVal} show-browsers={true} /></div>,
@@ -65,6 +61,10 @@ describe('<HeaderBarContent />', { viewportWidth: 1000, viewportHeight: 750 }, (
6561
})
6662

6763
describe('breadcrumbs', () => {
64+
afterEach(() => {
65+
cy.percySnapshot()
66+
})
67+
6868
context('with current project', () => {
6969
const currentProject = {
7070
title: 'app',
@@ -142,6 +142,7 @@ describe('<HeaderBarContent />', { viewportWidth: 1000, viewportHeight: 750 }, (
142142
cy.percySnapshot()
143143
cy.get('body').click()
144144
cy.contains('a', text.docsMenu.firstTest).should('not.be.visible')
145+
cy.percySnapshot('after click')
145146
})
146147

147148
it('docs menu has expected links with no current project', () => {
@@ -166,6 +167,8 @@ describe('<HeaderBarContent />', { viewportWidth: 1000, viewportHeight: 750 }, (
166167
cy.wrap(Object.keys(expectedDocsLinks)).each((linkName: string) => {
167168
cy.contains('a', linkName).should('have.attr', 'href', expectedDocsLinks[linkName])
168169
})
170+
171+
cy.percySnapshot()
169172
})
170173

171174
context('responsive design', () => {
@@ -182,6 +185,10 @@ describe('<HeaderBarContent />', { viewportWidth: 1000, viewportHeight: 750 }, (
182185
})
183186
})
184187

188+
afterEach(() => {
189+
cy.percySnapshot()
190+
})
191+
185192
// https://github.com/cypress-io/cypress/issues/21842
186193
it('shows docs menu correctly on small viewports', () => {
187194
// Simulate the small viewport.
@@ -226,6 +233,7 @@ describe('<HeaderBarContent />', { viewportWidth: 1000, viewportHeight: 750 }, (
226233
})
227234

228235
cy.contains('a', '8.7.0').should('be.visible').and('have.attr', 'href', 'https://on.cypress.io/changelog#8-7-0')
236+
cy.percySnapshot()
229237
})
230238

231239
it('shows hint and modal to upgrade to latest version of cypress', () => {
@@ -323,6 +331,7 @@ describe('<HeaderBarContent />', { viewportWidth: 1000, viewportHeight: 750 }, (
323331
cy.contains(cloudViewer.fullName).should('be.visible')
324332
cy.contains(cloudViewer.email).should('be.visible')
325333
cy.findByRole('button', { name: text.login.actionLogout }).should('be.visible')
334+
cy.percySnapshot()
326335
})
327336

328337
it('Shows a page name instead of project when a page name is provided', () => {
@@ -332,9 +341,14 @@ describe('<HeaderBarContent />', { viewportWidth: 1000, viewportHeight: 750 }, (
332341

333342
cy.contains('Project').should('not.exist')
334343
cy.contains('Test Page').should('be.visible')
344+
cy.percySnapshot()
335345
})
336346

337347
describe('prompts', () => {
348+
afterEach(() => {
349+
cy.percySnapshot()
350+
})
351+
338352
describe('the CI prompt', () => {
339353
context('opens on click', () => {
340354
beforeEach(() => {

packages/frontend-shared/src/gql-components/HeaderBarContent.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
<li
4646
v-if="props.gql.isGlobalMode"
4747
class="mx-2px align-middle inline-block"
48-
aria-hidden
48+
aria-hidden="true"
4949
>
5050
<i-cy-chevron-right_x16 class="icon-dark-gray-200" />
5151
</li>
@@ -74,7 +74,7 @@
7474
<template v-if="currentProject.currentTestingType">
7575
<li
7676
class="mx-2px inline-block align-middle"
77-
aria-hidden
77+
aria-hidden="true"
7878
>
7979
<i-cy-chevron-right_x16 class="icon-dark-gray-200" />
8080
</li>

packages/frontend-shared/src/gql-components/topnav/VerticalBrowserListItems.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
class="mr-16px min-w-26px w-26px"
2020
:class="{ 'filter grayscale': browser.disabled || !browser.isVersionSupported }"
2121
:src="allBrowsersIcons[browser.displayName] || allBrowsersIcons.generic"
22+
alt=""
2223
>
2324
<div class="flex-grow">
2425
<div>

0 commit comments

Comments
 (0)