Skip to content

Commit 7f042c4

Browse files
committed
Merge branch 'muaz/CLOUD-577-spec-list-display-latest-runs' into tgriesser/CLOUD-577-spec-list-display-latest-runs-batching
* muaz/CLOUD-577-spec-list-display-latest-runs: fix: Update "Request Access" button state after requesting access (ACI) (#22499) feat: Support "Queued" latest run status (#22497) fix: remove ctx.cloud.reset in tests, handle infinite loop in stale results (#22483) chore: add reporter webpack to gulp watch script (#22386) fix: Increase timeout for npm-webpack-dev-server tests (#22489) fix: Time out unmatched prerequests in proxy to avoid leaking memory (#22462) fix: Sort results in findCrossOriginLogs test helper to deterministic (#22481) fix: memory leak caused by storing base64 encoded files recieved by CDP `Network.requestWillBeSent` (#22460) fix: Improve cross-origin cookie handling (#22320) feat: Add button to clear value from search fields (#22202) chore: Add test to verify settings panels are collapsed by default (#22382) fix: process_profiler follow up work for v10 (#22363) chore: Update Chrome (stable) to 103.0.5060.53 (#22441) refactor: use design system windicss config (#21503) chore: update readme logo (#22433) chore: Update Chrome (beta) to 103.0.5060.53 (#22351) chore: updating version (#22432) Trigger Build
2 parents 2517f8b + 0390470 commit 7f042c4

File tree

102 files changed

+2423
-1505
lines changed

Some content is hidden

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

102 files changed

+2423
-1505
lines changed

README.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
<p align="center">
2-
<a href="https://www.cypress.io"><img src="https://cloud.githubusercontent.com/assets/1268976/20607953/d7ae489c-b24a-11e6-9cc4-91c6c74c5e88.png"/></a>
2+
<a href="https://www.cypress.io">
3+
<picture>
4+
<source media="(prefers-color-scheme: dark)" srcset="./assets/cypress-logo-dark.png">
5+
<source media="(prefers-color-scheme: light)" srcset="./assets/cypress-logo-light.png">
6+
<img alt="Cypress Logo" src="./assets/cypress-logo-light.png">
7+
</picture>
8+
</a>
39
</p>
410
<p align="center">
511
<a href="https://on.cypress.io">Documentation</a> |

assets/cypress-logo-dark.png

17.3 KB
Loading

assets/cypress-logo-light.png

17.3 KB
Loading

browser-versions.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"chrome:beta": "103.0.5060.42",
3-
"chrome:stable": "102.0.5005.115"
2+
"chrome:beta": "103.0.5060.53",
3+
"chrome:stable": "103.0.5060.53"
44
}
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
module.exports = {
22
spec: 'test/**/*.spec.ts',
3-
timeout: 10000,
3+
timeout: 15000,
44
}

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cypress",
3-
"version": "10.1.0",
3+
"version": "10.2.0",
44
"description": "Cypress.io end to end testing tool",
55
"private": true,
66
"scripts": {

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

+1-7
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,7 @@ describe('Reporter Header', () => {
2424
cy.get('[data-cy="spec-file-item"]').should('have.length', 3)
2525
.should('contain', 'dom-content.spec')
2626

27-
cy.get('body').type('f')
28-
29-
cy.get('input').clear()
30-
31-
cy.get('[data-cy="spec-file-item"]').should('have.length', '3')
32-
33-
cy.get('input').type('asdf', { force: true })
27+
cy.get('input').clear().type('asdf', { force: true })
3428

3529
cy.get('[data-cy="spec-file-item"]').should('have.length', 0)
3630
})

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

+3-20
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,6 @@ describe('App: Runs', { viewportWidth: 1200 }, () => {
107107

108108
cy.findByTestId('sidebar-link-runs-page').click()
109109

110-
// TODO: investigate the scenario for this test
111-
cy.withCtx((ctx) => {
112-
// clear cloud cache
113-
ctx.cloud.reset()
114-
})
115-
116110
cy.findByText(defaultMessages.runs.connect.buttonProject).click()
117111
cy.get('[aria-modal="true"]').should('exist')
118112

@@ -142,7 +136,7 @@ describe('App: Runs', { viewportWidth: 1200 }, () => {
142136
cy.visitApp()
143137

144138
cy.remoteGraphQLIntercept(async (obj) => {
145-
if ((obj.operationName === 'CheckCloudOrganizations_cloudViewerChange_cloudViewer' || obj.operationName === 'Runs_cloudViewer')) {
139+
if ((obj.operationName === 'CheckCloudOrganizations_cloudViewerChange_cloudViewer' || obj.operationName === 'Runs_cloudViewer' || obj.operationName === 'SpecsPageContainer_cloudViewer')) {
146140
if (obj.result.data?.cloudViewer?.organizations?.nodes) {
147141
obj.result.data.cloudViewer.organizations.nodes = []
148142
}
@@ -153,12 +147,6 @@ describe('App: Runs', { viewportWidth: 1200 }, () => {
153147

154148
cy.findByTestId('sidebar-link-runs-page').click()
155149

156-
// TODO: investigate the scenario for this test
157-
cy.withCtx((ctx) => {
158-
// clear cloud cache
159-
ctx.cloud.reset()
160-
})
161-
162150
cy.findByText(defaultMessages.runs.connect.buttonProject).click()
163151
cy.get('[aria-modal="true"]').should('exist')
164152

@@ -609,8 +597,6 @@ describe('App: Runs', { viewportWidth: 1200 }, () => {
609597
let cloudData: any
610598

611599
cy.loginUser()
612-
cy.visitApp()
613-
614600
cy.remoteGraphQLIntercept((obj) => {
615601
if (obj.operationName === 'Runs_currentProject_cloudProject_cloudProjectBySlug') {
616602
cloudData = obj.result
@@ -622,12 +608,9 @@ describe('App: Runs', { viewportWidth: 1200 }, () => {
622608
return obj.result
623609
})
624610

611+
cy.visitApp()
612+
625613
cy.findByTestId('sidebar-link-runs-page').click()
626-
// TODO: investigate the scenario for this test
627-
cy.withCtx((ctx) => {
628-
// clear cloud cache
629-
ctx.cloud.reset()
630-
})
631614

632615
cy.contains('h2', 'Cannot connect to the Cypress Dashboard')
633616
cy.percySnapshot()

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

-24
Original file line numberDiff line numberDiff line change
@@ -128,23 +128,11 @@ describe('ACI - Latest runs and Average duration', { viewportWidth: 1200, viewpo
128128
cy.openProject('cypress-in-cypress')
129129
cy.startAppServer()
130130

131-
cy.withCtx((ctx) => {
132-
// clear cloud cache
133-
ctx.cloud.reset()
134-
})
135-
136131
cy.withCtx((ctx, o) => {
137132
o.sinon.stub(ctx.lifecycleManager.git!, 'currentBranch').value('fakeBranch')
138133
})
139134
})
140135

141-
afterEach(() => {
142-
cy.withCtx((ctx) => {
143-
// clear cloud cache
144-
ctx.cloud.reset()
145-
})
146-
})
147-
148136
context('when no runs are recorded', () => {
149137
beforeEach(() => {
150138
cy.loginUser()
@@ -596,11 +584,6 @@ describe('ACI - Latest runs and Average duration', { viewportWidth: 1200 }, () =
596584
cy.openProject('cypress-in-cypress')
597585
cy.startAppServer()
598586

599-
cy.withCtx((ctx) => {
600-
// clear cloud cache
601-
ctx.cloud.reset()
602-
})
603-
604587
cy.loginUser()
605588

606589
simulateRunData()
@@ -612,13 +595,6 @@ describe('ACI - Latest runs and Average duration', { viewportWidth: 1200 }, () =
612595
cy.goOffline()
613596
})
614597

615-
afterEach(() => {
616-
cy.withCtx((ctx) => {
617-
// clear cloud cache
618-
ctx.cloud.reset()
619-
})
620-
})
621-
622598
it('shows placeholders for all visible specs', () => {
623599
allVisibleSpecsShouldBePlaceholders()
624600
})

packages/app/cypress/e2e/subscriptions/createCloudOrgModal-subscription.cy.ts

+3-8
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,10 @@ describe('App: Runs', { viewportWidth: 1200 }, () => {
1515
cy.startAppServer('component')
1616

1717
cy.loginUser()
18-
cy.visitApp()
1918

2019
// Simulate no orgs
2120
cy.remoteGraphQLIntercept(async (obj) => {
22-
if ((obj.operationName === 'CheckCloudOrganizations_cloudViewerChange_cloudViewer' || obj.operationName === 'Runs_cloudViewer')) {
21+
if ((obj.operationName === 'CheckCloudOrganizations_cloudViewerChange_cloudViewer' || obj.operationName === 'Runs_cloudViewer' || obj.operationName === 'SpecsPageContainer_cloudViewer')) {
2322
if (obj.result.data?.cloudViewer?.organizations?.nodes) {
2423
obj.result.data.cloudViewer.organizations.nodes = []
2524
}
@@ -28,13 +27,9 @@ describe('App: Runs', { viewportWidth: 1200 }, () => {
2827
return obj.result
2928
})
3029

31-
cy.findByTestId('sidebar-link-runs-page').click()
30+
cy.visitApp()
3231

33-
// TODO: investigate the scenario for this test
34-
cy.withCtx((ctx) => {
35-
// clear cloud cache
36-
ctx.cloud.reset()
37-
})
32+
cy.findByTestId('sidebar-link-runs-page').click()
3833

3934
cy.findByText(defaultMessages.runs.connect.buttonProject).click()
4035
cy.get('[aria-modal="true"]').should('exist')

packages/app/cypress/e2e/support/execute-spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ declare global {
99
* 3. Waits (with a timeout of 30s) for the Rerun all tests button to be present. This ensures all tests have completed
1010
*
1111
*/
12-
waitForSpecToFinish()
12+
waitForSpecToFinish(): void
1313
}
1414
}
1515
}

packages/app/package.json

-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
"@vitejs/plugin-vue": "2.2.4",
3535
"@vitejs/plugin-vue-jsx": "1.3.8",
3636
"@vueuse/core": "7.2.2",
37-
"@windicss/plugin-interaction-variants": "1.0.0",
3837
"ansi-to-html": "0.6.14",
3938
"bluebird": "3.5.3",
4039
"classnames": "2.3.1",
@@ -69,7 +68,6 @@
6968
"vue-i18n": "9.2.0-beta.7",
7069
"vue-router": "4",
7170
"vue-tsc": "^0.3.0",
72-
"windicss": "3.1.4",
7371
"wonka": "^4.0.15"
7472
},
7573
"files": [

packages/app/src/runner/event-manager.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const driverToSocketEvents = 'backend:request automation:request mocha recorder:
3939
const driverTestEvents = 'test:before:run:async test:after:run'.split(' ')
4040
const driverToLocalEvents = 'viewport:changed config stop url:changed page:loading visit:failed visit:blank cypress:in:cypress:runner:event'.split(' ')
4141
const socketRerunEvents = 'runner:restart watched:file:changed'.split(' ')
42-
const socketToDriverEvents = 'net:stubbing:event request:event script:error'.split(' ')
42+
const socketToDriverEvents = 'net:stubbing:event request:event script:error cross:origin:automation:cookies'.split(' ')
4343
const localToReporterEvents = 'reporter:log:add reporter:log:state:changed reporter:log:remove'.split(' ')
4444

4545
/**

packages/app/src/runs/RunsError.spec.tsx

+13-11
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,19 @@ describe('<RunsError />', () => {
66
cy.mount({
77
name: 'RunsError',
88
render () {
9-
return (<div class="h-screen">
10-
<RunsError
11-
message="Cannot connect to the Cypress Dashboard"
12-
icon="error"
13-
buttonText="Request Access"
14-
buttonIcon={PaperAirplaneIcon}
15-
>
16-
The request timed out when trying to retrieve the recorded runs from the Cypress Dashboard. <br/>
17-
Please refresh the page to try again and visit our Status Page if this behavior continues.
18-
</RunsError>
19-
</div>)
9+
return (
10+
<div class="h-screen">
11+
<RunsError
12+
message="Cannot connect to the Cypress Dashboard"
13+
icon="error"
14+
buttonText="Request Access"
15+
buttonIcon={PaperAirplaneIcon}
16+
>
17+
The request timed out when trying to retrieve the recorded runs from the Cypress Dashboard. <br/>
18+
Please refresh the page to try again and visit our Status Page if this behavior continues.
19+
</RunsError>
20+
</div>
21+
)
2022
},
2123
})
2224
})

packages/app/src/settings/SettingsCard.vue

+4-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@
3232
</template>
3333
</ListRowHeader>
3434
</template>
35-
<div class="divide-y space-y-32px divide-gray-100 p-24px children:pt-24px first:first:pt-0">
35+
<div
36+
data-cy="setting-expanded-container"
37+
class="divide-y space-y-32px divide-gray-100 p-24px children:pt-24px first:first:pt-0"
38+
>
3639
<slot />
3740
</div>
3841
</Collapsible>

packages/app/src/settings/SettingsContainer.cy.tsx

+7-10
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,19 @@ import { SettingsContainerFragmentDoc } from '../generated/graphql-test'
22
import { defaultMessages } from '@cy/i18n'
33
import SettingsContainer from './SettingsContainer.vue'
44

5+
const mountSettingsContainer = () => cy.mountFragment(SettingsContainerFragmentDoc, { render: (gql) => <SettingsContainer gql={gql} /> })
6+
7+
beforeEach(() => mountSettingsContainer())
8+
59
describe('<SettingsContainer />', { viewportHeight: 800, viewportWidth: 900 }, () => {
6-
const mountSettingsContainer = () => cy.mountFragment(SettingsContainerFragmentDoc, { render: (gql) => <SettingsContainer gql={gql} /> })
10+
it('renders sections collapsed by default', () => {
11+
cy.findByTestId('settings').should('be.visible')
12+
cy.findByTestId('setting-expanded-container').should('not.exist')
713

8-
it('renders', () => {
9-
mountSettingsContainer()
1014
cy.percySnapshot()
1115
})
1216

1317
it('expands and collapses project settings', () => {
14-
mountSettingsContainer()
15-
1618
cy.contains('Project Settings').click()
1719

1820
cy.findByText(defaultMessages.settingsPage.experiments.title).scrollIntoView().should('be.visible')
@@ -25,8 +27,6 @@ describe('<SettingsContainer />', { viewportHeight: 800, viewportWidth: 900 }, (
2527
})
2628

2729
it('expands and collapses device settings', () => {
28-
mountSettingsContainer()
29-
3030
cy.contains('Device Settings').click()
3131

3232
cy.findByText(defaultMessages.settingsPage.editor.title).should('be.visible')
@@ -40,8 +40,6 @@ describe('<SettingsContainer />', { viewportHeight: 800, viewportWidth: 900 }, (
4040
})
4141

4242
it('expands and collapses cloud settings', () => {
43-
mountSettingsContainer()
44-
4543
cy.contains('Dashboard Settings').click()
4644

4745
cy.findByText(defaultMessages.settingsPage.projectId.title).scrollIntoView().should('be.visible')
@@ -52,7 +50,6 @@ describe('<SettingsContainer />', { viewportHeight: 800, viewportWidth: 900 }, (
5250
})
5351

5452
it('renders footer with CTA button', () => {
55-
mountSettingsContainer()
5653
cy.contains('p', defaultMessages.settingsPage.footer.text.replace('{testingType}', 'E2E'))
5754
cy.contains('a', defaultMessages.settingsPage.footer.button)
5855
.should('have.attr', 'href', defaultMessages.settingsPage.footer.buttonLink)

packages/app/src/specs/InlineSpecListHeader.cy.tsx

+17-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ describe('InlineSpecListHeader', () => {
1010
cy.wrap(search).as('search')
1111

1212
const methods = {
13-
search: search.value,
1413
'onUpdate:search': (val: string) => {
1514
search.value = val
1615
},
@@ -19,7 +18,7 @@ describe('InlineSpecListHeader', () => {
1918

2019
cy.mount(() =>
2120
(<div class="bg-gray-1000">
22-
<InlineSpecListHeader {...methods} resultCount={resultCount} />
21+
<InlineSpecListHeader {...methods} search={search.value} resultCount={resultCount} />
2322
</div>))
2423
}
2524

@@ -28,6 +27,7 @@ describe('InlineSpecListHeader', () => {
2827
const searchString = 'my/component.cy.tsx'
2928

3029
cy.findByLabelText(defaultMessages.specPage.searchPlaceholder)
30+
// `force` necessary due to the field label being overlaid on top of the input
3131
.type(searchString, { delay: 0, force: true })
3232
.get('@search').its('value').should('eq', searchString)
3333
})
@@ -40,6 +40,21 @@ describe('InlineSpecListHeader', () => {
4040
.should('have.been.called')
4141
})
4242

43+
it('clears search field when clear button is clicked', () => {
44+
mountWithResultCount(0)
45+
46+
cy.findByTestId('clear-search-button')
47+
.should('not.exist')
48+
49+
cy.findByLabelText(defaultMessages.specPage.searchPlaceholder)
50+
// `force` necessary due to the field label being overlaid on top of the input
51+
.type('abcd', { delay: 0, force: true })
52+
.get('@search').its('value').should('eq', 'abcd')
53+
54+
cy.findByTestId('clear-search-button').click()
55+
cy.get('@search').its('value').should('eq', '')
56+
})
57+
4358
it('exposes the result count correctly to assistive tech', () => {
4459
mountWithResultCount(0)
4560
cy.contains('No Matches')

0 commit comments

Comments
 (0)