kubernetes-sigs / release-notes

This repo contains tooling around generating and publishing release notes for the Kubernetes organization.
https://relnotes.k8s.io
Apache License 2.0
52 stars 67 forks source link

Upgrade cypress to v10.x #348

Open harshanarayana opened 2 years ago

harshanarayana commented 2 years ago

Take a second look at https://github.com/kubernetes-sigs/release-notes/pull/327 to upgrade the cypress to v10.x.

> relnotes@1.0.0 e2e-cy
> cypress run

Missing baseUrl in compilerOptions. tsconfig-paths will be skipped

====================================================================================================

  (Run Starting)

  ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
  │ Cypress:        10.8.0                                                                         │
  │ Browser:        Electron 102 (headless)                                                        │
  │ Node Version:   v18.9.0 (/usr/local/Cellar/node/18.9.0/bin/node)                               │
  │ Specs:          1 found (app.cy.ts)                                                            │
  │ Searched:       cypress/e2e/**/*.cy.{js,jsx,ts,tsx}                                            │
  └────────────────────────────────────────────────────────────────────────────────────────────────┘

────────────────────────────────────────────────────────────────────────────────────────────────────

  Running:  app.cy.ts                                                                       (1 of 1)

  Release Notes App
    ✓ should have the correct title (1463ms)
    ✓ should have everything visible (431ms)
    ✓ should show only entries for version '1.14.0' if selected (478ms)
    ✓ should show only entries for version '1.15.0' if selected (475ms)
    ✓ should show only 'kubelet' entries if selected (391ms)
    ✓ should be possible to filter two options together (499ms)
    ✓ should be possible to search entries (540ms)
    ✓ should be possible to open the 'About' page (476ms)
    1) should be open the 'Additional Documentation' tooltip on hover
    2) should be possible to open the 'Additional Documentation'
    ✓ should be possible to filter 'KEP' doc types (559ms)
    ✓ should be possible to filter 'external' doc types (489ms)
    ✓ should show double filtered documentation entries only once (697ms)
    ✓ should be possible to access the page with pre defined filter (589ms)
    3) should be possible to enable showing pre-releases
    4) should be possible to filter via the labels ('bug')
    5) should be possible to filter via the labels ('testing')

  12 passing (3m)
  5 failing

  1) Release Notes App
       should be open the 'Additional Documentation' tooltip on hover:
     AssertionError: Timed out retrying after 30000ms: Expected to find element: `.documentationTooltip`, but never found it.
      at Context.eval (webpack:///./cypress/e2e/app.cy.ts:184:33)

  2) Release Notes App
       should be possible to open the 'Additional Documentation':
     AssertionError: Timed out retrying after 30000ms: Expected to find element: `.documentationTooltip`, but never found it.
      at Context.eval (webpack:///./cypress/e2e/app.cy.ts:203:33)

  3) Release Notes App
       should be possible to enable showing pre-releases:
     AssertionError: Timed out retrying after 30000ms: Expected to find element: `#option-1-17-0-alpha-2`, but never found it.
      at Context.eval (webpack:///./cypress/e2e/app.cy.ts:281:23)

  4) Release Notes App
       should be possible to filter via the labels ('bug'):
     CypressError: Timed out retrying after 30050ms: `cy.click()` failed because this element:

`<span _ngcontent-wxa-c116="" class="k8s-badge float-sm-end badge rounded-pill text-bg-primary badge-kind">bug</span>`

is being covered by another element:

`<input _ngcontent-wxa-c118="" id="searchBar" type="search" placeholder="Search" aria-label="Search" class="form-control bg-dark text-white border-0 rounded-0 ng-untouched ng-pristine ng-valid" ng-reflect-model="">`

Fix this problem, or use {force: true} to disable error checking.

https://on.cypress.io/element-cannot-be-interacted-with
      at $Cy.ensureDescendents (http://localhost:4200/__cypress/runner/cypress_runner.js:147512:78)
      at ensureDescendents (http://localhost:4200/__cypress/runner/cypress_runner.js:132962:8)
      at ensureDescendentsAndScroll (http://localhost:4200/__cypress/runner/cypress_runner.js:132969:14)
      at ensureElIsNotCovered (http://localhost:4200/__cypress/runner/cypress_runner.js:133101:5)
      at runAllChecks (http://localhost:4200/__cypress/runner/cypress_runner.js:133291:52)
      at retryActionability (http://localhost:4200/__cypress/runner/cypress_runner.js:133315:16)
      at tryCatcher (http://localhost:4200/__cypress/runner/cypress_runner.js:11318:23)
      at Promise.attempt.Promise.try (http://localhost:4200/__cypress/runner/cypress_runner.js:8592:29)
      at whenStable (http://localhost:4200/__cypress/runner/cypress_runner.js:152495:65)
      at <unknown> (http://localhost:4200/__cypress/runner/cypress_runner.js:151949:14)
      at tryCatcher (http://localhost:4200/__cypress/runner/cypress_runner.js:11318:23)
      at Promise._settlePromiseFromHandler (http://localhost:4200/__cypress/runner/cypress_runner.js:9253:31)
      at Promise._settlePromise (http://localhost:4200/__cypress/runner/cypress_runner.js:9310:18)
      at Promise._settlePromise0 (http://localhost:4200/__cypress/runner/cypress_runner.js:9355:10)
      at Promise._settlePromises (http://localhost:4200/__cypress/runner/cypress_runner.js:9435:18)
      at Promise._fulfill (http://localhost:4200/__cypress/runner/cypress_runner.js:9379:18)
      at <unknown> (http://localhost:4200/__cypress/runner/cypress_runner.js:10993:46)
  From Your Spec Code:
      at Context.eval (webpack:///./cypress/e2e/app.cy.ts:293:42)

  5) Release Notes App
       should be possible to filter via the labels ('testing'):
     CypressError: Timed out retrying after 30050ms: `cy.click()` failed because this element:

`<span _ngcontent-xvi-c116="" class="k8s-badge float-sm-end badge rounded-pill text-bg-success badge-sig">testing</span>`

is being covered by another element:

`<input _ngcontent-xvi-c118="" id="searchBar" type="search" placeholder="Search" aria-label="Search" class="form-control bg-dark text-white border-0 rounded-0 ng-untouched ng-pristine ng-valid" ng-reflect-model="">`

Fix this problem, or use {force: true} to disable error checking.

https://on.cypress.io/element-cannot-be-interacted-with
      at $Cy.ensureDescendents (http://localhost:4200/__cypress/runner/cypress_runner.js:147512:78)
      at ensureDescendents (http://localhost:4200/__cypress/runner/cypress_runner.js:132962:8)
      at ensureDescendentsAndScroll (http://localhost:4200/__cypress/runner/cypress_runner.js:132969:14)
      at ensureElIsNotCovered (http://localhost:4200/__cypress/runner/cypress_runner.js:133101:5)
      at runAllChecks (http://localhost:4200/__cypress/runner/cypress_runner.js:133291:52)
      at retryActionability (http://localhost:4200/__cypress/runner/cypress_runner.js:133315:16)
      at tryCatcher (http://localhost:4200/__cypress/runner/cypress_runner.js:11318:23)
      at Promise.attempt.Promise.try (http://localhost:4200/__cypress/runner/cypress_runner.js:8592:29)
      at whenStable (http://localhost:4200/__cypress/runner/cypress_runner.js:152495:65)
      at <unknown> (http://localhost:4200/__cypress/runner/cypress_runner.js:151949:14)
      at tryCatcher (http://localhost:4200/__cypress/runner/cypress_runner.js:11318:23)
      at Promise._settlePromiseFromHandler (http://localhost:4200/__cypress/runner/cypress_runner.js:9253:31)
      at Promise._settlePromise (http://localhost:4200/__cypress/runner/cypress_runner.js:9310:18)
      at Promise._settlePromise0 (http://localhost:4200/__cypress/runner/cypress_runner.js:9355:10)
      at Promise._settlePromises (http://localhost:4200/__cypress/runner/cypress_runner.js:9435:18)
      at Promise._fulfill (http://localhost:4200/__cypress/runner/cypress_runner.js:9379:18)
      at <unknown> (http://localhost:4200/__cypress/runner/cypress_runner.js:10993:46)
  From Your Spec Code:
      at Context.eval (webpack:///./cypress/e2e/app.cy.ts:311:45)

  (Results)

  ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
  │ Tests:        17                                                                               │
  │ Passing:      12                                                                               │
  │ Failing:      5                                                                                │
  │ Pending:      0                                                                                │
  │ Skipped:      0                                                                                │
  │ Screenshots:  5                                                                                │
  │ Video:        false                                                                            │
  │ Duration:     2 minutes, 40 seconds                                                            │
  │ Spec Ran:     app.cy.ts                                                                        │
  └────────────────────────────────────────────────────────────────────────────────────────────────┘

DId a quick port of enabling the new cypress. But the tests are becoming flaky. The following changes are to be done first before processing the tests

  1. Move the cypress.json to cypress.config.ts
  2. Move cypress/integration to cypress/e2e
  3. cypress open and perform a migration and let is take care of the rest.

The mouseover tests are getting a bit flaky. Need to figure out why and fix what is required.

k8s-triage-robot commented 1 year ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

harshanarayana commented 1 year ago

/remove-lifecycle stale

k8s-triage-robot commented 1 year ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot commented 1 year ago

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

ramrodo commented 1 year ago

/remove-lifecycle rotten

k8s-triage-robot commented 10 months ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot commented 9 months ago

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

ramrodo commented 9 months ago

/remove-lifecycle rotten

k8s-triage-robot commented 6 months ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

ramrodo commented 6 months ago

/remove-lifecycle stale

k8s-triage-robot commented 3 months ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

ramrodo commented 2 months ago

/remove-lifecycle stale