Skip to content

Commit 9be1b89

Browse files
committed
Merge branch 'develop' into lerna-optimize-tasks
2 parents 8f47466 + 343097b commit 9be1b89

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+1549
-481
lines changed

.github/workflows/report_weekly_app_kpis.yml

+13-1
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,18 @@ jobs:
9696
script: |
9797
const script = require('./scripts/reports/triage_feature_requests_metrics.js')
9898
await script.getFeatureRequestMetrics(github, context, core, "${{ env.START_DATE }}", "${{ env.END_DATE }}", "${{ env.PROJECT_BOARD_NUMBER }}");
99+
- name: Generate Feature Review KPIs
100+
id: feature-review-metrics
101+
uses: actions/github-script@v6
102+
env:
103+
START_DATE: ${{ github.event.inputs.start-date }}
104+
END_DATE: ${{ github.event.inputs.end-date }}
105+
PROJECT_BOARD_NUMBER: 9
106+
with:
107+
github-token: ${{ secrets.TRIAGE_BOARD_TOKEN }}
108+
script: |
109+
const script = require('./scripts/reports/triage_feature_review_metrics.js')
110+
await script.getFeatureReviewMetrics(github, context, core, "${{ env.START_DATE }}", "${{ env.END_DATE }}", "${{ env.PROJECT_BOARD_NUMBER }}");
99111
- name: Generate KPI Report
100112
id: generate-report
101113
uses: actions/github-script@v6
@@ -107,5 +119,5 @@ jobs:
107119
github-token: ${{ secrets.TRIAGE_BOARD_TOKEN }}
108120
script: |
109121
const script = require('./scripts/reports/generate_kpi_report.js')
110-
await script.generateKPIReport(github, context, core, ${{ steps.non-mono-repo-open-closed-metrics.outputs.results }}, ${{ steps.mono-repo-open-closed-metrics.outputs.results }}, ${{ steps.triage-metrics.outputs.results }}, ${{ steps.mitigation-metrics.outputs.results }}, ${{ steps.feature-metrics.outputs.results }} );
122+
await script.generateKPIReport(github, context, core, ${{ steps.non-mono-repo-open-closed-metrics.outputs.results }}, ${{ steps.mono-repo-open-closed-metrics.outputs.results }}, ${{ steps.triage-metrics.outputs.results }}, ${{ steps.mitigation-metrics.outputs.results }}, ${{ steps.feature-metrics.outputs.results }}, ${{ steps.feature-review-metrics.outputs.results }} );
111123

.github/workflows/update-browser-versions.yml

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
name: Update Browser Versions
22
on:
3+
workflow_dispatch:
4+
35
schedule:
46
- cron: '0 8 * * *' # every day at 8am UTC (3/4am EST/EDT)
57
jobs:
@@ -104,6 +106,7 @@ jobs:
104106
})
105107
# Update available and a PR doesn't already exist
106108
- name: Create Pull Request
109+
id: create-pr
107110
if: ${{ steps.check-need-for-pr.outputs.needs_pr == 'true' }}
108111
uses: actions/github-script@v6
109112
with:
@@ -117,4 +120,5 @@ jobs:
117120
branchName: '${{ steps.check-branch.outputs.branch_name }}',
118121
description: '${{ steps.get-versions.outputs.description }}',
119122
body: 'This PR was auto-generated to update the version(s) of Chrome for driver tests',
123+
addToProjectBoard: true,
120124
})

.vscode/launch.json

+15
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,21 @@
88
"processId": "${command:PickProcess}",
99
"continueOnAttach": true
1010
},
11+
{
12+
"type": "node",
13+
"request": "attach",
14+
"name": "Attach to port 5566",
15+
"port": 5566,
16+
"continueOnAttach": true,
17+
},
18+
{
19+
"type": "node",
20+
"request": "attach",
21+
"name": "Attach to Docker",
22+
"port": 5566,
23+
"continueOnAttach": true,
24+
"remoteRoot": "/opt/cypress",
25+
},
1126
{
1227
"type": "node",
1328
"request": "attach",

CONTRIBUTING.md

+14
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,20 @@ $ yarn add https://cdn.cypress.io/beta/npm/.../cypress.tgz
396396

397397
Note that unzipping the Linux binary inside a Docker container onto a mapped volume drive is *slow*. But once this is done you can modify the application resource folder in the local folder `/tmp/test-folder/node_modules/cypress/cypress-cache/3.3.0/Cypress/resources/app` to debug issues.
398398

399+
#### Docker as a performance constrained environment
400+
401+
Sometimes performance issues are easier to reproduce in performance constrained environments. A docker container can be a good way to simulate this locally and allow for quick iteration.
402+
403+
In a fresh cypress repository run the following command:
404+
405+
```shell
406+
docker compose run --service-port dev
407+
```
408+
409+
This will spin up a docker container based off cypress/browsers:latest and start up the bash terminal. From here you can yarn install and develop as normal, although slower. It's recommend that you run this in a fresh repo because node modules may differ between an install on your local device and from within a linux docker image.
410+
411+
Ports 5566 and 5567 are available to attach debuggers to, please note that docker compose run only maps ports if the `--service-port` command is used.
412+
399413
### Packages
400414

401415
Generally when making contributions, you are typically making them to a small number of packages. Most of your local development work will be inside a single package at a time.

cli/CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
<!-- See the ../guides/writing-the-cypress-changelog.md for details on writing the changelog. -->
2+
## 13.3.0
3+
4+
_Released 09/19/2023 (PENDING)_
5+
6+
**Features:**
7+
8+
- Introduces new layout for Runs page providing additional run information. Addresses [#27203](https://github.com/cypress-io/cypress/issues/27203).
9+
210
## 13.2.0
311

412
_Released 09/12/2023_

docker-compose.yml

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
version: '3'
2+
3+
services:
4+
dev:
5+
image: cypress/browsers:latest
6+
ports:
7+
# Share debugging ports
8+
- 5566:5566
9+
- 5567:5567
10+
environment:
11+
# Use Hist file from shared volume
12+
HISTFILE: /root/hist/.bash_history
13+
# Setup inspect to use the more permissive address when debugging so
14+
# that we can connect to it from ouside the docker container
15+
CYPRESS_DOCKER_DEV_INSPECT_OVERRIDE: '0.0.0.0:5566'
16+
# This disables CI mode which causes cypress to build differently
17+
CI: ''
18+
command: /bin/bash
19+
working_dir: /opt/cypress
20+
volumes:
21+
# Copy Cypress source to docker container
22+
- .:/opt/cypress
23+
- bash-history:/root/hist
24+
watch:
25+
image: cypress/browsers:latest
26+
environment:
27+
# This disables CI mode which causes cypress to build differently
28+
CI: ''
29+
command: yarn watch
30+
working_dir: /opt/cypress
31+
volumes:
32+
# Copy Cypress source to docker container
33+
- .:/opt/cypress
34+
ci:
35+
# This should mirror the image used in workflows.yml
36+
image: cypress/browsers-internal:node18.15.0-chrome114-ff115
37+
ports:
38+
- 5566:5566
39+
- 5567:5567
40+
command: /bin/bash
41+
environment:
42+
HISTFILE: /root/hist/.bash_history
43+
CYPRESS_DOCKER_DEV_INSPECT_OVERRIDE: '0.0.0.0:5566'
44+
working_dir: /opt/cypress
45+
volumes:
46+
- .:/opt/cypress
47+
- bash-history:/root/hist
48+
49+
# persist terminal history between runs in a virtual volume
50+
volumes:
51+
bash-history:

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
"gulp:debug": "node --inspect-brk ./node_modules/.bin/gulp",
4040
"dev-debug": "node ./scripts/debug.js dev",
4141
"docker": "./scripts/run-docker-local.sh",
42+
"docker-dev": "./scripts/run-docker-local.sh dev",
4243
"ensure-deps": "./scripts/ensure-dependencies.sh",
4344
"get-next-version": "node scripts/get-next-version.js",
4445
"postinstall": "node ./scripts/run-postInstall.js",

packages/app/cypress/e2e/debug.cy.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ describe('App - Debug Page', () => {
7575
.contains('View in Cypress Cloud')
7676
.should('have.attr', 'href', 'https://cloud.cypress.io/projects/7p5uce/runs/2?utm_medium=Debug+Tab&utm_campaign=View+in+Cypress+Cloud&utm_source=Binary%3A+App')
7777

78-
cy.findByTestId('debug-runNumber-PASSED').contains('#2')
78+
cy.findByTestId('runNumber-status-PASSED').contains('#2')
7979
cy.findByTestId('debug-commitsAhead').contains('You are 1 commit ahead')
8080

8181
cy.findByTestId('metadata').within(() => {
@@ -136,7 +136,7 @@ describe('App - Debug Page', () => {
136136

137137
cy.findByLabelText('Relevant run had 1 test failure').should('be.visible').contains('1')
138138

139-
cy.findByTestId('debug-runNumber-FAILED').contains('#136')
139+
cy.findByTestId('runNumber-status-FAILED').contains('#136')
140140
cy.findByTestId('debug-commitsAhead').contains('You are 1 commit ahead')
141141

142142
cy.findByTestId('metadata').within(() => {

packages/app/cypress/e2e/runs.cy.ts

+24-29
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ describe('App: Runs', { viewportWidth: 1200 }, () => {
6060

6161
cy.visitApp()
6262
cy.findByTestId('sidebar-link-runs-page').click()
63-
cy.get('[data-cy="runs-loader"]')
63+
cy.get('[data-cy*="runsSkeleton-"]')
6464
cy.get('[data-cy="runs"]')
6565
})
6666
})
@@ -103,7 +103,7 @@ describe('App: Runs', { viewportWidth: 1200 }, () => {
103103
cy.visitApp()
104104

105105
moveToRunsPage()
106-
cy.contains('a', 'OVERLIMIT').click()
106+
cy.findByTestId('runNumber-status-OVERLIMIT').click()
107107

108108
cy.withCtx((ctx, o) => {
109109
expect((ctx.actions.electron.openExternal as SinonStub).lastCall.lastArg).to.contain('http://dummy.cypress.io/runs/4')
@@ -666,29 +666,25 @@ describe('App: Runs', { viewportWidth: 1200 }, () => {
666666
cy.visitApp()
667667
moveToRunsPage()
668668

669-
cy.get('[href^="http://dummy.cypress.io/runs/0"]').first().within(() => {
670-
cy.findByText('fix: make gql work CANCELLED')
671-
cy.get('[data-cy="run-card-icon-CANCELLED"]')
669+
cy.get('[data-cy="runCard-status-CANCELLED"]').first().within(() => {
670+
cy.get('[data-cy="runNumber-status-CANCELLED"]')
672671
})
673672

674-
cy.get('[href^="http://dummy.cypress.io/runs/1"]').first().within(() => {
675-
cy.findByText('fix: make gql work ERRORED')
676-
cy.get('[data-cy="run-card-icon-ERRORED"]')
673+
cy.get('[data-cy="runCard-status-ERRORED"]').first().within(() => {
674+
cy.get('[data-cy="runNumber-status-ERRORED"]')
677675
})
678676

679-
cy.get('[href^="http://dummy.cypress.io/runs/2"]').first().within(() => {
680-
cy.findByText('fix: make gql work FAILED')
681-
cy.get('[data-cy="run-card-icon-FAILED"]')
677+
cy.get('[data-cy="runCard-status-FAILED"]').first().within(() => {
678+
cy.get('[data-cy="runNumber-status-FAILED"]')
682679
})
683680

684-
cy.get('[href^="http://dummy.cypress.io/runs/0"]').first().as('firstRun')
681+
cy.get('[data-cy="runCard-status-CANCELLED"]').first().as('firstRun')
685682

686683
cy.get('@firstRun').within(() => {
687-
cy.get('[data-cy="run-card-author"]').contains('John Appleseed')
688-
cy.get('[data-cy="run-card-avatar"]')
689-
cy.get('[data-cy="run-card-branch"]').contains('main')
690-
cy.get('[data-cy="run-card-created-at"]').contains('an hour ago')
691-
cy.get('[data-cy="run-card-duration"]').contains('01:00')
684+
cy.get('[data-cy="runCard-author"]').contains('John Appleseed')
685+
cy.get('[data-cy="runCard-avatar"]')
686+
cy.get('[data-cy="runCard-branchName"]').contains('main')
687+
cy.get('[data-cy="runCard-createdAt"]').contains('01m 00s (an hour ago)')
692688

693689
cy.contains('span', 'skipped')
694690
cy.get('span').contains('pending')
@@ -702,7 +698,7 @@ describe('App: Runs', { viewportWidth: 1200 }, () => {
702698
cy.visitApp()
703699

704700
moveToRunsPage()
705-
cy.get('[data-cy^="runCard-"]').first().click()
701+
cy.get('[data-cy="runNumber-status-CANCELLED"]').first().click()
706702

707703
cy.withCtx((ctx) => {
708704
expect((ctx.actions.electron.openExternal as SinonStub).lastCall.lastArg).to.contain('http://dummy.cypress.io/runs/0')
@@ -765,19 +761,18 @@ describe('App: Runs', { viewportWidth: 1200 }, () => {
765761
cy.visitApp()
766762
moveToRunsPage()
767763

764+
cy.findByText('fix: using Git data CANCELLED')
768765
cy.get('[href^="http://dummy.cypress.io/runs/0"]').first().within(() => {
769-
cy.findByText('fix: using Git data CANCELLED')
770-
cy.get('[data-cy="run-card-icon-CANCELLED"]')
766+
cy.get('[data-cy="runNumber-status-CANCELLED"]')
771767
})
772768

773-
cy.get('[href^="http://dummy.cypress.io/runs/0"]').first().as('firstRun')
769+
cy.get('[data-cy="runCard-status-CANCELLED"]').first().as('firstRun')
774770

775771
cy.get('@firstRun').within(() => {
776-
cy.get('[data-cy="run-card-author"]').contains('John Appleseed')
777-
cy.get('[data-cy="run-card-avatar"]')
778-
cy.get('[data-cy="run-card-branch"]').contains('main')
779-
cy.get('[data-cy="run-card-created-at"]').contains('an hour ago')
780-
cy.get('[data-cy="run-card-duration"]').contains('01:00')
772+
cy.get('[data-cy="runCard-author"]').contains('John Appleseed')
773+
cy.get('[data-cy="runCard-avatar"]')
774+
cy.get('[data-cy="runCard-branchName"]').contains('main')
775+
cy.get('[data-cy="runCard-createdAt"]').contains('01m 00s (an hour ago)')
781776

782777
cy.contains('span', 'skipped')
783778
cy.get('span').contains('pending')
@@ -791,7 +786,7 @@ describe('App: Runs', { viewportWidth: 1200 }, () => {
791786
cy.visitApp()
792787

793788
moveToRunsPage()
794-
cy.get('[data-cy^="runCard-"]').first().click()
789+
cy.get('[data-cy="runNumber-status-CANCELLED"]').first().click()
795790

796791
cy.withCtx((ctx) => {
797792
expect((ctx.actions.electron.openExternal as SinonStub).lastCall.lastArg).to.contain('http://dummy.cypress.io/runs/0')
@@ -955,7 +950,7 @@ describe('App: Runs', { viewportWidth: 1200 }, () => {
955950
const itSkipIfWindows = Cypress.platform === 'win32' ? it.skip : it
956951

957952
itSkipIfWindows('should re-query for executing runs', () => {
958-
cy.get('[data-cy="run-card-icon-RUNNING"]').should('have.length', RUNNING_COUNT).should('be.visible')
953+
cy.get('[data-cy="runNumber-status-RUNNING"]').should('have.length', RUNNING_COUNT).should('be.visible')
959954

960955
cy.remoteGraphQLIntercept(async (obj) => {
961956
await new Promise((resolve) => setTimeout(resolve, 100))
@@ -976,7 +971,7 @@ describe('App: Runs', { viewportWidth: 1200 }, () => {
976971
})
977972

978973
function completeNext (passed) {
979-
cy.get('[data-cy="run-card-icon-PASSED"]').should('have.length', passed).should('be.visible')
974+
cy.get('[data-cy="runNumber-status-PASSED"]').should('have.length', passed).should('be.visible')
980975
if (passed < RUNNING_COUNT) {
981976
completeNext(passed + 1)
982977
}

packages/app/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"dependencies": {},
2222
"devDependencies": {
2323
"@cypress-design/vue-button": "^0.10.1",
24-
"@cypress-design/vue-icon": "^0.25.0",
24+
"@cypress-design/vue-icon": "^0.26.0",
2525
"@cypress-design/vue-statusicon": "^0.5.0",
2626
"@cypress-design/vue-tabs": "^0.5.1",
2727
"@graphql-typed-document-node/core": "^3.1.0",

packages/app/src/debug/DebugPageHeader.cy.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ describe('<DebugPageHeader />', {
4343

4444
cy.findByTestId('debug-results').should('be.visible')
4545

46-
cy.findByTestId('debug-runNumber-FAILED')
46+
cy.findByTestId('runNumber-status-FAILED')
4747
.should('have.text', '#432')
4848
.children().should('have.length', 2)
4949

50-
cy.findByTestId('debug-flaky-badge')
50+
cy.findByTestId('runResults-flakyBadge')
5151
.should('not.exist')
5252

5353
defaults.forEach((obj) => {
@@ -73,7 +73,7 @@ describe('<DebugPageHeader />', {
7373
},
7474
})
7575

76-
cy.findByTestId('debug-flaky-badge')
76+
cy.findByTestId('runResults-flakyBadge')
7777
.contains(defaultMessages.specPage.flaky.badgeLabel)
7878

7979
cy.findByTestId('total-flaky-tests')
@@ -97,7 +97,7 @@ describe('<DebugPageHeader />', {
9797
},
9898
})
9999

100-
cy.findByTestId(`debug-runNumber-${status}`).should('be.visible')
100+
cy.findByTestId(`runNumber-status-${status}`).should('be.visible')
101101
})
102102
})
103103

packages/app/src/debug/DebugPageHeader.vue

+6-6
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@
5151
<li
5252
class="flex flex-row text-sm gap-x-2 items-center justify-center"
5353
>
54-
<DebugRunNumber
54+
<RunNumber
5555
v-if="(debug.runNumber && debug.status)"
5656
:status="debug.status"
5757
:value="debug.runNumber"
5858
/>
59-
<DebugResults
59+
<RunResults
6060
:gql="props.gql"
6161
data-cy="debug-results"
6262
/>
@@ -92,7 +92,7 @@
9292
v-if="debug.createdAt"
9393
data-cy="debug-header-createdAt"
9494
>
95-
<IconTimeStopwatch
95+
<IconTimeClock
9696
size="16"
9797
class="mr-2"
9898
stroke-color="gray-500"
@@ -106,14 +106,14 @@
106106
</template>
107107
<script lang="ts" setup>
108108
import { computed } from 'vue'
109-
import DebugResults from './DebugResults.vue'
109+
import RunResults from '../runs/RunResults.vue'
110110
import ExternalLink from '@cy/gql-components/ExternalLink.vue'
111111
import type { DebugPageHeaderFragment } from '../generated/graphql'
112-
import { IconTimeStopwatch } from '@cypress-design/vue-icon'
112+
import { IconTimeClock } from '@cypress-design/vue-icon'
113113
import CommitIcon from '~icons/cy/commit_x14'
114114
import { gql } from '@urql/core'
115115
import { useI18n } from 'vue-i18n'
116-
import DebugRunNumber from './DebugRunNumber.vue'
116+
import RunNumber from '../runs/RunNumber.vue'
117117
import UserAvatar from '@cy/gql-components/topnav/UserAvatar.vue'
118118
import { useRunDateTimeInterval } from './useRunDateTimeInterval'
119119
import { getUrlWithParams } from '@packages/frontend-shared/src/utils/getUrlWithParams'

0 commit comments

Comments
 (0)