Skip to content

Commit

Permalink
test: Addressing launchpad test flake in Windows (#22536)
Browse files Browse the repository at this point in the history
* test: Bumping timeout on breadcrumb state checks for Windows

* todos project was missing component index but has component testing configured

* Adding key to links to ensure attrs are cleaned up/reset

* Coercing boolean keys to strings to match vue key types
  • Loading branch information
tbiethman committed Jun 27, 2022
1 parent fac83fd commit 24052eb
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
Expand Up @@ -26,7 +26,9 @@
<li class="inline-block">
<!-- context for use of aria role and disabled here: https://www.scottohara.me/blog/2021/05/28/disabled-links.html -->
<!-- the `href` given here is a fake one provided for the sake of assistive technology. no actual routing is happening. -->
<!-- the `key` is used to ensure the role/href attrs are added and removed appropriately from the element. -->
<a
:key="Boolean(hasLinkToProjects).toString()"
class="font-medium"
:class="hasLinkToProjects ? 'text-indigo-500 hocus-link-default' :
'text-gray-700'"
Expand All @@ -51,7 +53,9 @@
<li class="inline-block">
<!-- context for use of aria role and disabled here: https://www.scottohara.me/blog/2021/05/28/disabled-links.html -->
<!-- the `href` given here is a fake one provided for the sake of assistive technology. no actual routing is happening. -->
<!-- the `key` is used to ensure the role/href attrs are added and removed appropriately from the element. -->
<a
:key="Boolean(hasLinkToCurrentProject).toString()"
class="font-medium"
:role="hasLinkToCurrentProject ? undefined : 'link'"
:href="hasLinkToCurrentProject ? 'choose-testing-type' : undefined"
Expand Down
3 changes: 2 additions & 1 deletion packages/launchpad/cypress/e2e/global-mode.cy.ts
Expand Up @@ -152,7 +152,8 @@ describe('Launchpad: Global Mode', () => {

it('updates breadcrumb when selecting a project and navigating back', () => {
const getBreadcrumbLink = (name: string, options: { disabled: boolean } = { disabled: false }) => {
return cy.findByRole('link', { name }).should('have.attr', 'aria-disabled', options.disabled ? 'true' : 'false')
// The timeout is increased to account for variability in configuration load times in CI.
return cy.findByRole('link', { name, timeout: 10000 }).should('have.attr', 'aria-disabled', options.disabled ? 'true' : 'false')
}

const resetSpies = () => {
Expand Down
12 changes: 12 additions & 0 deletions system-tests/projects/todos/cypress/support/component-index.html
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>Components App</title>
</head>
<body>
<div data-cy-root></div>
</body>
</html>

5 comments on commit 24052eb

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 24052eb Jun 27, 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.3.0/linux-x64/develop-24052eb62a2467b79af7b1d5050e88e047a8c113/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 24052eb Jun 27, 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.3.0/linux-arm64/develop-24052eb62a2467b79af7b1d5050e88e047a8c113/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 24052eb Jun 27, 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.3.0/darwin-arm64/develop-24052eb62a2467b79af7b1d5050e88e047a8c113/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 24052eb Jun 27, 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.3.0/darwin-x64/develop-24052eb62a2467b79af7b1d5050e88e047a8c113/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 24052eb Jun 27, 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.3.0/win32-x64/develop-24052eb62a2467b79af7b1d5050e88e047a8c113/cypress.tgz

Please sign in to comment.