Skip to content

Commit

Permalink
chore: various flaky + a11y improvements (#23745)
Browse files Browse the repository at this point in the history
Co-authored-by: Mark Noonan <[email protected]>
  • Loading branch information
Rachel and marktnoonan authored Sep 13, 2022
1 parent bc804f8 commit 1190c3e
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 10 deletions.
10 changes: 6 additions & 4 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ macWorkflowFilters: &darwin-workflow-filters
when:
or:
- equal: [ develop, << pipeline.git.branch >> ]
- equal: [ 'webkit-experimental', << pipeline.git.branch >> ]
- equal: [ 'correct-dashboard-results', << pipeline.git.branch >> ]
- matches:
pattern: "-release$"
value: << pipeline.git.branch >>
Expand All @@ -45,7 +45,6 @@ linuxArm64WorkflowFilters: &linux-arm64-workflow-filters
when:
or:
- equal: [ develop, << pipeline.git.branch >> ]
- equal: [ 'webkit-experimental', << pipeline.git.branch >> ]
- matches:
pattern: "-release$"
value: << pipeline.git.branch >>
Expand All @@ -65,7 +64,7 @@ windowsWorkflowFilters: &windows-workflow-filters
or:
- equal: [ develop, << pipeline.git.branch >> ]
- equal: [ linux-arm64, << pipeline.git.branch >> ]
- equal: [ 'webkit-experimental', << pipeline.git.branch >> ]
- equal: [ 'lmiller/fixing-flake-1', << pipeline.git.branch >> ]
- matches:
pattern: "-release$"
value: << pipeline.git.branch >>
Expand Down Expand Up @@ -1283,9 +1282,12 @@ jobs:
run-webpack-dev-server-integration-tests,
run-vite-dev-server-integration-tests
- run:
# Sometimes, even though all the circle jobs have finished, Percy times out during `build:finalize`
# If all other jobs finish but `build:finalize` fails, we retry it once
name: Finalize percy build - allows single retry
command: |
PERCY_PARALLEL_NONCE=$CIRCLE_WORKFLOW_WORKSPACE_ID \
yarn percy build:finalize
yarn percy build:finalize || yarn percy build:finalize
cli-visual-tests:
<<: *defaults
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ describe('<HeaderBarContent />', { viewportWidth: 1000, viewportHeight: 750 }, (
})
}

afterEach(() => {
cy.percySnapshot()
})

it('renders with functional browser menu when show-browsers prop is true', () => {
cy.mountFragment(HeaderBar_HeaderBarContentFragmentDoc, {
render: (gqlVal) => <div class="border-current border-1 h-700px resize overflow-auto"><HeaderBarContent gql={gqlVal} show-browsers={true} /></div>,
Expand Down Expand Up @@ -65,6 +61,10 @@ describe('<HeaderBarContent />', { viewportWidth: 1000, viewportHeight: 750 }, (
})

describe('breadcrumbs', () => {
afterEach(() => {
cy.percySnapshot()
})

context('with current project', () => {
const currentProject = {
title: 'app',
Expand Down Expand Up @@ -142,6 +142,7 @@ describe('<HeaderBarContent />', { viewportWidth: 1000, viewportHeight: 750 }, (
cy.percySnapshot()
cy.get('body').click()
cy.contains('a', text.docsMenu.firstTest).should('not.be.visible')
cy.percySnapshot('after click')
})

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

cy.percySnapshot()
})

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

afterEach(() => {
cy.percySnapshot()
})

// https://github.com/cypress-io/cypress/issues/21842
it('shows docs menu correctly on small viewports', () => {
// Simulate the small viewport.
Expand Down Expand Up @@ -226,6 +233,7 @@ describe('<HeaderBarContent />', { viewportWidth: 1000, viewportHeight: 750 }, (
})

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

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

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

cy.contains('Project').should('not.exist')
cy.contains('Test Page').should('be.visible')
cy.percySnapshot()
})

describe('prompts', () => {
afterEach(() => {
cy.percySnapshot()
})

describe('the CI prompt', () => {
context('opens on click', () => {
beforeEach(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<li
v-if="props.gql.isGlobalMode"
class="mx-2px align-middle inline-block"
aria-hidden
aria-hidden="true"
>
<i-cy-chevron-right_x16 class="icon-dark-gray-200" />
</li>
Expand Down Expand Up @@ -74,7 +74,7 @@
<template v-if="currentProject.currentTestingType">
<li
class="mx-2px inline-block align-middle"
aria-hidden
aria-hidden="true"
>
<i-cy-chevron-right_x16 class="icon-dark-gray-200" />
</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
class="mr-16px min-w-26px w-26px"
:class="{ 'filter grayscale': browser.disabled || !browser.isVersionSupported }"
:src="allBrowsersIcons[browser.displayName] || allBrowsersIcons.generic"
alt=""
>
<div class="flex-grow">
<div>
Expand Down

5 comments on commit 1190c3e

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 1190c3e Sep 13, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the linux x64 version of the Test Runner.

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/10.8.1/linux-x64/develop-1190c3ef0aa6906f6487f24d848f2db8cce9bf2e/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 1190c3e Sep 13, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the linux arm64 version of the Test Runner.

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/10.8.1/linux-arm64/develop-1190c3ef0aa6906f6487f24d848f2db8cce9bf2e/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 1190c3e Sep 13, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the darwin arm64 version of the Test Runner.

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/10.8.1/darwin-arm64/develop-1190c3ef0aa6906f6487f24d848f2db8cce9bf2e/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 1190c3e Sep 13, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the win32 x64 version of the Test Runner.

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/10.8.1/win32-x64/develop-1190c3ef0aa6906f6487f24d848f2db8cce9bf2e/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 1190c3e Sep 13, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the darwin x64 version of the Test Runner.

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/10.8.1/darwin-x64/develop-1190c3ef0aa6906f6487f24d848f2db8cce9bf2e/cypress.tgz

Please sign in to comment.