Skip to content

Commit 27254c2

Browse files
misc: Improved the hitbox of grouped commands caret (#32783)
* misc: Improved the hitbox of grouped commands caret * Fix the hitbox and add a test for nested withins * changelog entry * Fix flake in percy snapshot of running test * update snapshot to take at the right state - put spinner icon back but don't animate it
1 parent 8a5afa9 commit 27254c2

File tree

5 files changed

+35
-1
lines changed

5 files changed

+35
-1
lines changed

cli/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ _Released 10/20/2025 (PENDING)_
1414
**Misc:**
1515

1616
- Add top padding for command log labels. Addressed in [#32774](https://github.com/cypress-io/cypress/pull/32774).
17+
- The hitbox for expanding a grouped command has been widened. Addresses [#32778](https://github.com/cypress-io/cypress/issues/32778). Addressed in [#32783](https://github.com/cypress-io/cypress/pull/32783).
1718
- Have cursor on hover of the AUT URL to show as pointer. Addresses [#32777](https://github.com/cypress-io/cypress/issues/32777). Addressed in [#32782](https://github.com/cypress-io/cypress/pull/32782).
1819

1920
**Dependency Updates:**

packages/app/cypress/e2e/runner/support/snapshot-reporter.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ export const snapshotReporter = () => {
3131
// don't display command progress bar in snapshot
3232
$el.attr('style', 'display: none !important')
3333
},
34+
'.runnable-active .runnable-state-icon animate': ($el) => {
35+
// don't animate the test title spinner icon for an active test
36+
$el.attr('repeatCount', '0')
37+
},
3438
},
3539
})
3640
})

packages/app/cypress/e2e/runner/ui-states.cy.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,16 @@ describe('src/cypress/runner ui states', { retries: 0, defaultCommandTimeout: 60
152152
cy.contains('verify element visibility state').should('be.visible').click()
153153
snapshotReporter()
154154
})
155+
156+
it('grouped commands', () => {
157+
loadSpec({
158+
filePath: 'runner/ui-states/commands.cy.js',
159+
passCount: 9,
160+
})
161+
162+
cy.contains('grouped commands').should('be.visible').click()
163+
snapshotReporter()
164+
})
155165
})
156166

157167
it('status codes', () => {

packages/reporter/src/commands/commands.scss

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@
137137
}
138138

139139
.command-wrapper-text-group {
140-
padding-left: 15px;
140+
margin-left: 15px;
141141
width: 100%;
142142
}
143143

@@ -148,6 +148,7 @@
148148
.nested-group-expander {
149149
.command-expander {
150150
position: relative;
151+
151152
margin-left: -16px !important; // Adjust this value to center the caret on the border
152153
}
153154
}
@@ -515,7 +516,11 @@
515516
padding: 0;
516517
align-items: center;
517518
justify-content: center;
519+
max-width: 33px;
518520
height: 28px;
521+
width: 33px;
522+
padding-left: 15px;
523+
margin-left: -15px;
519524

520525
.command-expander {
521526
margin: 0;

system-tests/project-fixtures/runner-specs/cypress/e2e/runner/ui-states/commands.cy.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,4 +142,18 @@ describe('Command Options and UI Display Tests', () => {
142142
cy.get('#scroll-horizontal button')
143143
.should('not.be.visible')
144144
})
145+
146+
it('grouped commands', () => {
147+
cy.visit('cypress/fixtures/uiStates.html')
148+
149+
cy.get('html').within(() => {
150+
cy.get('body').within(() => {
151+
cy.get('form').within(() => {
152+
cy.get('select').first().within(() => {
153+
cy.get('option')
154+
})
155+
})
156+
})
157+
})
158+
})
145159
})

0 commit comments

Comments
 (0)