Skip to content

Commit 2d4b778

Browse files
Merge branch 'develop' into ryanm/chore/full-snapshot-threaded
2 parents c9c0575 + 6b28356 commit 2d4b778

Some content is hidden

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

49 files changed

+611
-540
lines changed

.circleci/workflows.yml

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

33
chrome-stable-version: &chrome-stable-version "135.0.7049.84"
4-
chrome-beta-version: &chrome-beta-version "136.0.7103.17"
4+
chrome-beta-version: &chrome-beta-version "136.0.7103.25"
55
firefox-stable-version: &firefox-stable-version "137.0"
66

77
orbs:

.gitignore

+4-1
Original file line numberDiff line numberDiff line change
@@ -398,4 +398,7 @@ tooling/v8-snapshot/cache/prod-win32
398398
system-tests/lib/validations
399399

400400
.nx/cache
401-
.nx/workspace-data
401+
.nx/workspace-data
402+
403+
# IDE files
404+
.cursor

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+
## 14.3.1
3+
4+
_Released 4/22/2025 (PENDING)_
5+
6+
**Misc:**
7+
8+
- The UI of the reporter and URL were updated to a darker gray background for better color contrast. Addressed in [#31475](https://github.com/cypress-io/cypress/pull/31475).
9+
210
## 14.3.0
311

412
_Released 4/8/2025_

packages/app/src/runner/SpecRunnerHeaderOpenMode.vue

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
<div
33
id="spec-runner-header"
44
ref="autHeaderEl"
5-
class="h-full bg-gray-1000 border-l-[1px] border-gray-900 min-h-[64px] text-[14px]"
5+
class="h-full bg-gray-1100 border-l-[1px] border-gray-900 min-h-[64px] text-[14px]"
66
>
77
<div class="flex flex-wrap grow p-[16px] gap-[12px] justify-end h-[64px]">
88
<button
99
data-cy="playground-activator"
1010
: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"
11+
class="bg-gray-1100 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"
1212
:aria-label="t('runner.selectorPlayground.toggle')"
13-
:class="[selectorPlaygroundStore.show ? 'bg-gray-800 border-gray-700' : 'bg-gray-900']"
13+
:class="[selectorPlaygroundStore.show ? 'bg-gray-800 border-gray-700' : 'bg-gray-1100']"
1414
@click="togglePlayground"
1515
>
1616
<i-cy-crosshairs_x16 class="icon-dark-gray-300" />

packages/app/src/runner/SpecRunnerHeaderRunMode.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<div
33
id="spec-runner-header"
44
ref="autHeaderEl"
5-
class="bg-gray-1000 border-l-[1px] border-gray-900 min-h-[64px] px-[16px] text-[14px]"
5+
class="bg-gray-1100 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">

packages/app/src/store/mobx-runner-store.ts

+31-15
Original file line numberDiff line numberDiff line change
@@ -15,31 +15,47 @@ const defaults = {
1515
} as const
1616

1717
export class MobxRunnerStore {
18-
@observable spec?: Cypress.Spec
19-
@observable specs: Cypress.Spec[] = []
20-
@observable specRunId?: string
21-
@observable isLoading = true
22-
@observable width: number
23-
@observable height: number
24-
@observable automation?: AutomationStatus
25-
@observable canSaveStudioLogs = false
18+
spec?: Cypress.Spec
19+
specs: Cypress.Spec[] = []
20+
specRunId?: string
21+
isLoading = true
22+
width: number
23+
height: number
24+
automation?: AutomationStatus
25+
canSaveStudioLogs = false
2626

2727
constructor (testingType: Cypress.TestingType) {
28-
makeObservable(this)
28+
makeObservable(this, {
29+
spec: observable,
30+
specs: observable,
31+
specRunId: observable,
32+
isLoading: observable,
33+
width: observable,
34+
height: observable,
35+
automation: observable,
36+
canSaveStudioLogs: observable,
37+
setCanSaveStudioLogs: action,
38+
setSpec: action,
39+
checkCurrentSpecStillExists: action,
40+
setSpecs: action,
41+
setIsLoading: action,
42+
updateDimensions: action,
43+
})
44+
2945
this.width = defaults[testingType].width
3046
this.height = defaults[testingType].height
3147
}
3248

33-
@action setCanSaveStudioLogs (canSave: boolean) {
49+
setCanSaveStudioLogs (canSave: boolean) {
3450
this.canSaveStudioLogs = canSave
3551
}
3652

37-
@action setSpec (spec: Cypress.Spec | undefined) {
53+
setSpec (spec: Cypress.Spec | undefined) {
3854
this.spec = spec
3955
this.specRunId = nanoid()
4056
}
4157

42-
@action checkCurrentSpecStillExists (specs: Cypress.Spec[]) {
58+
checkCurrentSpecStillExists (specs: Cypress.Spec[]) {
4359
const newSpecsAbsolutes = new Set(specs.map((spec) => spec.absolute))
4460

4561
this.specs.forEach((oldSpec) => {
@@ -49,16 +65,16 @@ export class MobxRunnerStore {
4965
})
5066
}
5167

52-
@action setSpecs (specs: Cypress.Spec[]) {
68+
setSpecs (specs: Cypress.Spec[]) {
5369
this.checkCurrentSpecStillExists(specs)
5470
this.specs = specs
5571
}
5672

57-
@action setIsLoading (isLoading: boolean) {
73+
setIsLoading (isLoading: boolean) {
5874
this.isLoading = isLoading
5975
}
6076

61-
@action updateDimensions (width: number, height: number) {
77+
updateDimensions (width: number, height: number) {
6278
this.height = height
6379
this.width = width
6480
}

packages/app/tsconfig.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@
1212
"../frontend-shared/cypress/**/*.ts"
1313
],
1414
"compilerOptions": {
15-
"noImplicitThis": true,
15+
// needed for mobx
1616
"useDefineForClassFields": true,
17+
"noImplicitThis": true,
1718
"paths": {
1819
"@cy/i18n": ["../frontend-shared/src/locales/i18n"],
1920
"@cy/components/*": ["../frontend-shared/src/components/*"],

packages/data-context/src/data/coreDataShape.ts

+2-11
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { FoundBrowser, Editor, AllowedState, AllModeOptions, TestingType, BrowserStatus, PACKAGE_MANAGERS, AuthStateName, MIGRATION_STEPS, MigrationStep, BannerState, StudioManagerShape } from '@packages/types'
1+
import { FoundBrowser, Editor, AllowedState, AllModeOptions, TestingType, BrowserStatus, PACKAGE_MANAGERS, AuthStateName, MIGRATION_STEPS, MigrationStep, StudioManagerShape } from '@packages/types'
22
import { WizardBundler, CT_FRAMEWORKS, resolveComponentFrameworkDefinition, ErroredFramework } from '@packages/scaffold-config'
33
import type { NexusGenObjects } from '@packages/graphql/src/gen/nxs.gen'
44
// tslint:disable-next-line no-implicit-dependencies - electron dep needs to be defined
@@ -22,7 +22,7 @@ export interface AuthenticatedUserShape {
2222

2323
export interface ProjectShape {
2424
projectRoot: string
25-
savedState?: () => Promise<Maybe<SavedStateShape>>
25+
savedState?: () => Promise<AllowedState>
2626
}
2727

2828
export interface ServersDataShape {
@@ -47,15 +47,6 @@ export interface LocalSettingsDataShape {
4747
preferences: AllowedState
4848
}
4949

50-
export interface SavedStateShape {
51-
firstOpened?: number | null
52-
lastOpened?: number | null
53-
promptsShown?: object | null
54-
banners?: BannerState | null
55-
lastProjectId?: string | null
56-
specFilter?: string | null
57-
}
58-
5950
export interface ConfigChildProcessShape {
6051
/**
6152
* Child process executing the config & sourcing plugin events

packages/frontend-shared/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"devDependencies": {
3232
"@antfu/utils": "^0.7.8",
3333
"@babel/code-frame": "7.26.2",
34-
"@cypress-design/css": "^1.0.0",
34+
"@cypress-design/css": "^1.1.0",
3535
"@faker-js/faker": "9.6.0",
3636
"@graphql-codegen/plugin-helpers": "2.3.2",
3737
"@graphql-typed-document-node/core": "^3.1.0",

packages/reporter/src/agents/agent-model.ts

+6-3
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,16 @@ export interface AgentProps extends InstrumentProps {
77
}
88

99
export default class Agent extends Instrument {
10-
@observable callCount: number = 0
11-
@observable functionName: string
10+
callCount: number = 0
11+
functionName: string
1212

1313
constructor (props: AgentProps) {
1414
super(props)
1515

16-
makeObservable(this)
16+
makeObservable(this, {
17+
callCount: observable,
18+
functionName: observable,
19+
})
1720

1821
this.callCount = props.callCount
1922
this.functionName = props.functionName

packages/reporter/src/attempts/attempt-model.ts

+55-27
Original file line numberDiff line numberDiff line change
@@ -14,40 +14,68 @@ import type Log from '../instruments/instrument-model'
1414
import Session, { SessionProps } from '../sessions/sessions-model'
1515

1616
export default class Attempt {
17-
@observable agents: Agent[] = []
18-
@observable sessions: Record<string, Session> = {}
19-
@observable commands: Command[] = []
20-
@observable err?: Err = undefined
21-
@observable hooks: Hook[] = []
17+
agents: Agent[] = []
18+
sessions: Record<string, Session> = {}
19+
commands: Command[] = []
20+
err?: Err = undefined
21+
hooks: Hook[] = []
2222
// TODO: make this an enum with states: 'QUEUED, ACTIVE, INACTIVE'
23-
@observable isActive: boolean | null = null
24-
@observable routes: Route[] = []
25-
@observable _state?: TestState | null = null
26-
@observable _testOuterStatus?: TestState = undefined
27-
@observable _invocationCount: number = 0
28-
@observable invocationDetails?: FileDetails
23+
isActive: boolean | null = null
24+
routes: Route[] = []
25+
_state?: TestState | null = null
26+
_testOuterStatus?: TestState = undefined
27+
_invocationCount: number = 0
28+
invocationDetails?: FileDetails
2929
// eslint-disable-next-line @typescript-eslint/no-unused-vars
30-
@observable hookCount: { [name in HookName]: number } = {
30+
hookCount: { [name in HookName]: number } = {
3131
'before all': 0,
3232
'before each': 0,
3333
'after all': 0,
3434
'after each': 0,
3535
'test body': 0,
3636
'studio commands': 0,
3737
}
38-
@observable _isOpen: boolean|null = null
38+
_isOpen: boolean|null = null
3939

40-
@observable isOpenWhenLast: boolean | null = null
40+
isOpenWhenLast: boolean | null = null
4141
_callbackAfterUpdate: Function | null = null
4242
testId: string
4343

44-
@observable id: number
44+
id: number
4545
test: Test
4646

4747
_logs: {[key: string]: Log} = {}
4848

4949
constructor (props: TestProps, test: Test) {
50-
makeObservable(this)
50+
makeObservable(this, {
51+
agents: observable,
52+
sessions: observable,
53+
commands: observable,
54+
err: observable,
55+
hooks: observable,
56+
isActive: observable,
57+
routes: observable,
58+
_state: observable,
59+
_testOuterStatus: observable,
60+
_invocationCount: observable,
61+
invocationDetails: observable,
62+
hookCount: observable,
63+
_isOpen: observable,
64+
isOpenWhenLast: observable,
65+
id: observable,
66+
hasCommands: computed,
67+
isLongRunning: computed,
68+
_hasLongRunningCommand: computed,
69+
state: computed,
70+
error: computed,
71+
isLast: computed,
72+
isOpen: computed,
73+
start: action,
74+
update: action,
75+
setIsOpen: action,
76+
finish: action,
77+
})
78+
5179
this.testId = props.id
5280
this.id = props.currentRetry || 0
5381
this.test = test
@@ -66,25 +94,25 @@ export default class Attempt {
6694
_.each(props.routes, this.addLog)
6795
}
6896

69-
@computed get hasCommands () {
97+
get hasCommands () {
7098
return !!this.commands.length
7199
}
72100

73-
@computed get isLongRunning () {
101+
get isLongRunning () {
74102
return this.isActive && this._hasLongRunningCommand
75103
}
76104

77-
@computed get _hasLongRunningCommand () {
105+
get _hasLongRunningCommand () {
78106
return _.some(this.commands, (command) => {
79107
return command.isLongRunning
80108
})
81109
}
82110

83-
@computed get state () {
111+
get state () {
84112
return this._state || (this.isActive ? 'active' : 'processing')
85113
}
86114

87-
@computed get error () {
115+
get error () {
88116
const command = this.err?.isCommandErr ? this.commandMatchingErr() : undefined
89117

90118
return {
@@ -94,11 +122,11 @@ export default class Attempt {
94122
}
95123
}
96124

97-
@computed get isLast () {
125+
get isLast () {
98126
return this.id === this.test.lastAttempt.id
99127
}
100128

101-
@computed get isOpen () {
129+
get isOpen () {
102130
if (this._isOpen !== null) {
103131
return this._isOpen
104132
}
@@ -166,11 +194,11 @@ export default class Attempt {
166194
.last()
167195
}
168196

169-
@action start () {
197+
start () {
170198
this.isActive = true
171199
}
172200

173-
@action update (props: UpdatableTestProps) {
201+
update (props: UpdatableTestProps) {
174202
if (props.state) {
175203
this._state = props.state
176204
}
@@ -200,11 +228,11 @@ export default class Attempt {
200228
}
201229
}
202230

203-
@action setIsOpen (isOpen: boolean) {
231+
setIsOpen (isOpen: boolean) {
204232
this._isOpen = isOpen
205233
}
206234

207-
@action finish (props: UpdatableTestProps, isInteractive: boolean) {
235+
finish (props: UpdatableTestProps, isInteractive: boolean) {
208236
this.update(props)
209237
this.isActive = false
210238

packages/reporter/src/attempts/attempts.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@
115115
cursor: pointer;
116116

117117
&:hover {
118-
background-color: $gray-1000;
118+
background-color: $gray-1100;
119119
}
120120
}
121121

0 commit comments

Comments
 (0)