Skip to content

Commit 632b187

Browse files
Merge branch 'develop' into bump-win-version-info
2 parents dac982a + 4670b13 commit 632b187

File tree

21 files changed

+2404
-1155
lines changed

21 files changed

+2404
-1155
lines changed

.circleci/workflows.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
version: 2.1
22

3-
chrome-stable-version: &chrome-stable-version "134.0.6998.117"
3+
chrome-stable-version: &chrome-stable-version "134.0.6998.165"
44
chrome-beta-version: &chrome-beta-version "135.0.7049.28"
55
firefox-stable-version: &firefox-stable-version "135.0"
66

cli/CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ _Released 3/25/2025 (PENDING)_
88
- Applies a fix from [#30730](https://github.com/cypress-io/cypress/pull/30730) and [#30099](https://github.com/cypress-io/cypress/pull/30099) related to Node.js turning on ESM flags by default in Node.js version `20.19.0`. Fixed in [#31308](https://github.com/cypress-io/cypress/pull/31308).
99
- Fixed an issue where Firefox BiDi was not correctly removing prerequests on expected network request failures. Fixes [#31325](https://github.com/cypress-io/cypress/issues/31325).
1010

11+
**Misc:**
12+
13+
- The UI above the application under test now displays in dark mode. Addresses [#31106](https://github.com/cypress-io/cypress/issues/31106). Addressed in [#31360](https://github.com/cypress-io/cypress/pull/31360).
14+
1115
**Dependency Updates:**
1216

1317
- Upgraded `@cypress/request` from `3.0.7` to `3.0.8`. Addressed in [#31311](https://github.com/cypress-io/cypress/pull/31311).

packages/app/cypress/e2e/cypress-in-cypress.cy.ts

+59-93
Original file line numberDiff line numberDiff line change
@@ -104,116 +104,82 @@ describe('Cypress in Cypress', { viewportWidth: 1500, defaultCommandTimeout: 100
104104
})
105105
})
106106

107-
it(`scales the AUT correctly in ${testingType}`, () => {
108-
const assertNoScaleShown = () => {
109-
// check that no message about scale % is shown,
110-
// meaning the AUT is at 100% scale
111-
cy.contains('%)').should('not.exist')
112-
}
113-
114-
cy.scaffoldProject('cypress-in-cypress')
115-
cy.findBrowsers()
116-
openProject(testingType)
117-
cy.withCtx((ctx) => {
118-
ctx.coreData.localSettings.preferences.reporterWidth = 800
119-
ctx.coreData.localSettings.preferences.specListWidth = 250
120-
ctx.coreData.localSettings.preferences.isSpecsListOpen = false
121-
})
122-
123-
cy.startAppServer(testingType)
124-
cy.visitApp()
125-
cy.specsPageIsVisible()
107+
describe('dragging panels', () => {
108+
beforeEach(() => {
109+
cy.scaffoldProject('cypress-in-cypress')
110+
cy.findBrowsers()
111+
openProject(testingType)
112+
cy.withCtx((ctx) => {
113+
ctx.coreData.localSettings.preferences.reporterWidth = 800
114+
ctx.coreData.localSettings.preferences.specListWidth = 250
115+
ctx.coreData.localSettings.preferences.isSpecsListOpen = false
116+
})
126117

127-
cy.get('[data-cy="spec-item"]').first().click()
128-
// Let runner stabilize
129-
cy.get('#unified-reporter').should('be.visible')
118+
cy.startAppServer(testingType)
119+
cy.visitApp()
120+
cy.specsPageIsVisible()
130121

131-
// validate that the width we set in `withCtx` above is the starting point
132-
cy.get(`[data-cy="reporter-panel"]`).invoke('outerWidth').should('eq', 800)
133-
// cy.percySnapshot('initial state') // TODO: restore when Percy CSS is fixed. See https://github.com/cypress-io/cypress/issues/23435
134-
135-
cy.contains('[aria-controls=reporter-inline-specs-list]', 'Specs')
136-
.click({ force: true })
137-
138-
// this tooltip text confirms specs list is open
139-
cy.contains('Collapse Specs List')
140-
141-
// we will move the right-hand handle of the Reporter
142-
// to these positions from the left of the screen
143-
const dragPositions = [1000, 1090, 900, 600]
144-
145-
// based on viewport sizes for CT and e2e tests in the `cypress-in-cypress`
146-
// projects, we expect certain scale % values to be shown
147-
const testingTypeExpectedScales = {
148-
component: ['93%', '75%'],
149-
e2e: ['46%', '37%', '56%', '85%'],
150-
componentShortViewport: '61%',
151-
e2eShortViewport: '46%',
152-
componentNarrowViewport: '40%',
153-
e2eNarrowViewport: '20%',
154-
}
155-
156-
// resize the reporter using each of the dragPositions and take Percy snapshots
157-
dragPositions.forEach((position, index) => {
158-
dragHandleToClientX('panel2', position).then(() => {
159-
const expectedScale = testingTypeExpectedScales[testingType][index]
160-
161-
// CT hits 100% scale "earlier" than E2E, so sometimes there is no expected scale
162-
if (expectedScale) {
163-
cy.contains(expectedScale).should('be.visible')
164-
} else {
165-
assertNoScaleShown()
166-
}
122+
cy.get('[data-cy="spec-item"]').first().click()
123+
// Let runner stabilize
124+
cy.get('#unified-reporter').should('be.visible')
167125

168-
/*
169-
TODO: restore when Percy CSS is fixed. See https://github.com/cypress-io/cypress/issues/23435
170-
cy.percySnapshot(`panel 2 at ${ position } px`)
171-
*/
172-
})
126+
// validate that the width we set in `withCtx` above is the starting point
127+
cy.get(`[data-cy="reporter-panel"]`).invoke('outerWidth').should('eq', 800)
173128
})
174129

175-
// now check vertical scaling with viewport resize, and take some snapshots too
130+
it(`scales the AUT correctly at various widths in ${testingType}`, () => {
131+
// validate that the width we set in `withCtx` above is the starting point
132+
cy.get(`[data-cy="reporter-panel"]`).invoke('outerWidth').should('eq', 800)
176133

177-
// this viewport should be tall enough to not scale even the e2e test
178-
cy.viewport(1500, 1300)
179-
cy.contains('[aria-controls=reporter-inline-specs-list]', 'Specs')
180-
.click({ force: true })
134+
cy.contains('[aria-controls=reporter-inline-specs-list]', 'Specs')
135+
.click({ force: true })
181136

182-
// make sure the reporter is narrow enough (should be, but don't want to depend on leftover state from above)
183-
dragHandleToClientX('panel2', 400).then(() => {
184-
// but we have to also collapse the Specs List to remove any reason to scale horizontally
137+
// this tooltip text confirms specs list is open
138+
cy.contains('Collapse Specs List')
185139

186-
// this tooltip text confirms specs list is closed
187-
cy.contains('Expand Specs List')
140+
// we will move the right-hand handle of the Reporter
141+
// to these positions from the left of the screen
142+
const dragPositions = [1000, 1090, 900, 600]
188143

189-
assertNoScaleShown()
190-
// cy.percySnapshot('tall viewport') // TODO: restore when Percy CSS is fixed. See https://github.com/cypress-io/cypress/issues/23435
144+
// based on viewport sizes for CT and e2e tests in the `cypress-in-cypress`
145+
// projects, we expect certain scale % values to be shown
146+
const testingTypeExpectedScales = {
147+
component: ['93%', '75%'],
148+
e2e: ['46%', '37%', '56%', '85%'],
149+
}
191150

192-
cy.viewport(1500, 400)
193-
cy.contains(testingTypeExpectedScales[`${ testingType }ShortViewport`]).should('be.visible')
194-
// cy.percySnapshot('short viewport') // TODO: restore when Percy CSS is fixed. See https://github.com/cypress-io/cypress/issues/23435
151+
// resize the reporter using each of the dragPositions and take Percy snapshots
152+
dragPositions.forEach((position, index) => {
153+
dragHandleToClientX('panel2', position).then(() => {
154+
const expectedScale = testingTypeExpectedScales[testingType][index]
155+
156+
// CT hits 100% scale "earlier" than E2E, so sometimes there is no expected scale
157+
if (expectedScale) {
158+
cy.contains(expectedScale).should('be.visible')
159+
} else {
160+
cy.contains('%)').should('not.exist')
161+
}
162+
})
163+
})
195164
})
196165

197-
cy.get('[data-cy="select-browser"]').as('selectBrowser')
198-
199-
cy.viewport(500, 600)
200-
cy.get('@selectBrowser').scrollIntoView()
201-
cy.get('@selectBrowser').should('be.visible') // with no specs list open, we should see this by scrolling
166+
it(`displays the UI correctly at 400 reporter width in ${testingType}`, () => {
167+
// this viewport should be tall enough to not scale even the e2e test
168+
cy.viewport(1500, 1300)
202169

203-
dragHandleToClientX('panel2', 200).then(() => {
204-
cy.contains('Chrome 1').should('not.be.visible')
205-
})
170+
// make sure the reporter is narrow enough (should be, but don't want to depend on leftover state from above)
171+
dragHandleToClientX('panel2', 400).then(() => {
172+
cy.contains('%)').should('not.exist')
206173

207-
cy.contains('[aria-controls=reporter-inline-specs-list]', 'Specs')
208-
.click({ force: true })
174+
cy.viewport(1500, 400)
209175

210-
cy.get('@selectBrowser').should('not.be.visible')
211-
cy.get('@selectBrowser').scrollIntoView()
212-
cy.get('@selectBrowser').should('not.be.visible') // with specs list open, scrolling is not enough to see this
176+
const expectedScale = testingType === 'component' ? '61%' : '46%'
213177

214-
dragHandleToClientX('panel1', 130)
178+
cy.contains(expectedScale).should('be.visible')
179+
})
215180

216-
cy.contains(testingTypeExpectedScales[`${ testingType }NarrowViewport`])
181+
cy.get('[data-cy="select-browser"]').should('be.visible')
182+
})
217183
})
218184

219185
it(`resets selector playground validity when selecting element with playground selector in ${testingType}`, () => {

packages/app/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"dependencies": {},
2424
"devDependencies": {
2525
"@cypress-design/icon-registry": "^1.5.1",
26-
"@cypress-design/vue-button": "^1.1.0",
26+
"@cypress-design/vue-button": "^1.3.0",
2727
"@cypress-design/vue-icon": "^1.6.0",
2828
"@cypress-design/vue-statusicon": "^1.0.0",
2929
"@cypress-design/vue-tabs": "^1.2.2",

packages/app/src/runner/SpecRunnerDropdown.vue

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@
55
#="{ open, close }"
66
>
77
<PopoverButton
8-
class="bg-white border rounded-[50px] self-center h-full grow px-[5px] group"
8+
class="border rounded-[50px] self-center h-full grow px-[5px] group outline-none hover:bg-gray-800"
99
:class="{
10-
'hocus-default': !props.disabled,
1110
'opacity-50 cursor-auto': props.disabled,
1211
'rounded-[5px] border-[1px] border-indigo-100': !props.minimal,
1312
'border-transparent': props.minimal,
13+
'bg-white': !props.minimal,
14+
'bg-transparent': props.minimal,
1415
}"
1516
:disabled="props.disabled"
1617
>
1718
<div
1819
class="flex gap-[8px] items-center"
1920
:class="{
20-
'group-hocus:text-indigo-600': !props.disabled,
2121
'text-indigo-600': open,
2222
'text-gray-600': !open,
2323
}"

packages/app/src/runner/SpecRunnerHeaderOpenMode.vue

+18-19
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,26 @@
22
<div
33
id="spec-runner-header"
44
ref="autHeaderEl"
5-
class="min-h-[64px] text-[14px]"
5+
class="h-full bg-gray-1000 border-l-[1px] border-gray-900 min-h-[64px] text-[14px]"
66
>
7-
<div class="flex flex-wrap grow p-[16px] gap-[12px] justify-end">
7+
<div class="flex flex-wrap grow p-[16px] gap-[12px] justify-end h-[64px]">
8+
<button
9+
data-cy="playground-activator"
10+
:disabled="isDisabled"
11+
class="bg-gray-900 border rounded-md flex h-full border-gray-800 outline-solid outline-indigo-500 transition w-[40px] duration-150 items-center justify-center hover:bg-gray-800"
12+
:aria-label="t('runner.selectorPlayground.toggle')"
13+
:class="[selectorPlaygroundStore.show ? 'bg-gray-800 border-gray-700' : 'bg-gray-900']"
14+
@click="togglePlayground"
15+
>
16+
<i-cy-crosshairs_x16 class="icon-dark-gray-300" />
17+
</button>
818
<div
919
data-cy="aut-url"
10-
class="border rounded flex grow border-gray-100 h-[32px] align-middle"
20+
class="border rounded bg-gray-950 flex grow border-gray-800 h-[32px] align-middle"
1121
:class="{
1222
'bg-gray-50': autStore.isLoadingUrl
1323
}"
1424
>
15-
<Button
16-
data-cy="playground-activator"
17-
:disabled="isDisabled"
18-
class="rounded-none border-gray-100 border-r-[1px]"
19-
variant="text"
20-
:aria-label="t('runner.selectorPlayground.toggle')"
21-
@click="togglePlayground"
22-
>
23-
<i-cy-crosshairs_x16
24-
:class="[selectorPlaygroundStore.show ? 'icon-dark-indigo-500' : 'icon-dark-gray-500']"
25-
/>
26-
</Button>
2725
<SpecRunnerDropdown
2826
v-if="selectedBrowser?.displayName"
2927
data-cy="select-browser"
@@ -52,7 +50,7 @@
5250
:value="inputValue"
5351
:placeholder="inputPlaceholder"
5452
aria-label="url of the application under test"
55-
class="aut-url-input flex grow mr-[12px] leading-normal max-w-full text-indigo-500 self-center hocus-link-default truncate"
53+
class="aut-url-input bg-gray-950 flex grow mr-[12px] leading-normal max-w-full text-gray-300 self-center hocus-link-default truncate"
5654
:style="{ zIndex: inputZIndex }"
5755
@input="setStudioUrl"
5856
@click="openExternally"
@@ -69,7 +67,8 @@
6967
<Tag
7068
data-cy="viewport-size"
7169
size="20"
72-
color="white"
70+
color="gray"
71+
:dark="true"
7372
class="self-center rounded-[10px] mr-[5px] pr-[6px] pl-[6px]"
7473
>
7574
<span class="whitespace-nowrap text-[12px]">{{ autStore.viewportWidth }}x{{
@@ -80,7 +79,8 @@
8079
v-if="displayScale"
8180
data-cy="viewport-scale"
8281
size="20"
83-
color="white"
82+
color="gray"
83+
:dark="true"
8484
class="self-center rounded-[10px] mr-[5px] pr-[6px] pl-[6px]"
8585
>
8686
<span class="text-[12px]">
@@ -129,7 +129,6 @@ import Tag from '@cypress-design/vue-tag'
129129
import SelectorPlayground from './selector-playground/SelectorPlayground.vue'
130130
import ExternalLink from '@packages/frontend-shared/src/gql-components/ExternalLink.vue'
131131
import Alert from '@packages/frontend-shared/src/components/Alert.vue'
132-
import Button from '@packages/frontend-shared/src/components/Button.vue'
133132
import StudioControls from './studio/StudioControls.vue'
134133
import StudioUrlPrompt from './studio/StudioUrlPrompt.vue'
135134
import VerticalBrowserListItems from '@packages/frontend-shared/src/gql-components/topnav/VerticalBrowserListItems.vue'

packages/app/src/runner/SpecRunnerHeaderRunMode.vue

+8-6
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
<div
33
id="spec-runner-header"
44
ref="autHeaderEl"
5-
class="min-h-[64px] px-[16px] text-[14px]"
5+
class="bg-gray-1000 border-l-[1px] border-gray-900 min-h-[64px] px-[16px] text-[14px]"
66
>
77
<!-- this is similar to the Open Mode header but it's not interactive, so can be a lot smaller-->
88
<div class="flex grow flex-wrap py-[16px] gap-[12px] justify-end">
99
<div
1010
data-cy="aut-url"
11-
class="border rounded flex grow border-[1px] border-gray-100 h-[32px] align-middle overflow-hidden"
11+
class="border rounded flex grow border-[1px] bg-gray-950 border-gray-800 h-[32px] align-middle overflow-hidden"
1212
:class="{
13-
'bg-gray-50': autStore.isLoadingUrl
13+
'bg-gray-800': autStore.isLoadingUrl
1414
}"
1515
>
1616
<SpecRunnerDropdown data-cy="select-browser">
@@ -23,13 +23,14 @@
2323
/>
2424
</template>
2525
</SpecRunnerDropdown>
26-
<div class="mr-[12px] flex grow text-gray-600 items-center truncate">
26+
<div class="mr-[12px] flex grow text-gray-300 items-center truncate">
2727
{{ testingType === 'e2e' ? autStore.url : 'URL navigation disabled in component testing' }}
2828
</div>
2929
<Tag
3030
data-cy="viewport-size"
3131
size="20"
32-
color="white"
32+
color="gray"
33+
:dark="true"
3334
class="self-center rounded-[10px] mr-[5px] pr-[6px] pl-[6px]"
3435
>
3536
<span class="whitespace-nowrap text-[12px]">{{ autStore.viewportWidth }}x{{
@@ -40,7 +41,8 @@
4041
v-if="displayScale"
4142
data-cy="viewport-scale"
4243
size="20"
43-
color="white"
44+
color="gray"
45+
:dark="true"
4446
class="self-center rounded-[10px] mr-[5px] pr-[6px] pl-[6px]"
4547
>
4648
<span class="text-[12px]">

packages/app/src/runner/SpecRunnerRunMode.vue

-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
v-if="!hideRunnerUi"
4040
:event-manager="eventManager"
4141
:get-aut-iframe="getAutIframeModel"
42-
class="bg-white"
4342
/>
4443
</HideDuringScreenshot>
4544
<RemoveClassesDuringScreenshotting

0 commit comments

Comments
 (0)