Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(Unification): Update Command Group UI #20465

Merged
merged 120 commits into from
Apr 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
120 commits
Select commit Hold shift + click to select a range
1eb2151
seems like a good check-in point.
emilyrohrbough Feb 11, 2022
e64dc87
latest changes. getting close.
emilyrohrbough Feb 15, 2022
ac70cde
some clean up.
emilyrohrbough Feb 15, 2022
1da8184
rename cmd to command. (rename was for classing global styles when te…
emilyrohrbough Feb 15, 2022
26477c6
random clean up.
emilyrohrbough Feb 15, 2022
29abb65
add more examples for the tests cases that need verified.
emilyrohrbough Feb 15, 2022
dbf8f03
Cypress is incorrectly applying viewport width & height for test type.
emilyrohrbough Feb 15, 2022
fe929d6
further clean up & pass previously existing command tests.
emilyrohrbough Feb 15, 2022
659447e
skip these tests for now to generate percy screenshots
emilyrohrbough Feb 15, 2022
8b840e3
ci fails with .only
emilyrohrbough Feb 15, 2022
a214488
idk why this is failing here.
emilyrohrbough Feb 15, 2022
6cc464f
more updates.
emilyrohrbough Feb 15, 2022
fc3199b
will this compare my percy screenshots to the 10.0 branch instead of …
emilyrohrbough Feb 16, 2022
9cae572
hmmm
emilyrohrbough Feb 16, 2022
9b4cc70
fix breaking change with global styles shared with runner.
emilyrohrbough Feb 16, 2022
4f96fde
tweak to styles
emilyrohrbough Feb 22, 2022
ac984cd
Merge branch '10.0-release' into refactor-cmd-ui
emilyrohrbough Feb 22, 2022
1f2492d
should be it
emilyrohrbough Feb 22, 2022
ed8593a
clean up
emilyrohrbough Feb 22, 2022
76a3df3
Merge branch '10.0-release' into refactor-cmd-ui
emilyrohrbough Feb 22, 2022
e3bb847
Merge branch 'refactor-cmd-ui' of https://github.com/cypress-io/cypre…
emilyrohrbough Feb 22, 2022
022feff
easier to review
emilyrohrbough Feb 22, 2022
dc9088c
clean up
emilyrohrbough Feb 22, 2022
15fc94d
small changes
emilyrohrbough Feb 22, 2022
d557f79
.
emilyrohrbough Feb 22, 2022
592fbf4
small styles
emilyrohrbough Feb 22, 2022
a3f6cd6
Merge branch '10.0-release' into refactor-cmd-ui
emilyrohrbough Feb 22, 2022
7ed8250
clean up
emilyrohrbough Feb 23, 2022
ec870c5
Merge branch '10.0-release' into refactor-cmd-ui
emilyrohrbough Feb 23, 2022
2ad81bb
check in - new styles getting there
emilyrohrbough Feb 24, 2022
c0b69c6
revert name back to command
emilyrohrbough Feb 24, 2022
d54b4ac
clean up
emilyrohrbough Feb 24, 2022
9483bc8
clean up
emilyrohrbough Feb 24, 2022
1645a20
Merge branch '10.0-release' into refactor-cmd-ui
emilyrohrbough Feb 24, 2022
c7ea938
add additional tests for indicators, assert commands and command groups
emilyrohrbough Feb 24, 2022
ac1858d
this
emilyrohrbough Feb 24, 2022
c1ef568
Merge branch 'refactor-cmd-ui' of https://github.com/cypress-io/cypre…
emilyrohrbough Feb 24, 2022
b8273db
Merge branch '10.0-release' into refactor-cmd-ui
emilyrohrbough Feb 24, 2022
484a53a
small updates
emilyrohrbough Feb 24, 2022
8ca000e
Merge branch 'refactor-cmd-ui' of https://github.com/cypress-io/cypre…
emilyrohrbough Feb 24, 2022
d1bdee4
clean up
emilyrohrbough Feb 24, 2022
84d600f
padding was wrong.
emilyrohrbough Feb 24, 2022
ee6b142
Merge branch 'refactor-cmd-ui' into new-cmd-log-styles
emilyrohrbough Feb 24, 2022
8d85c17
Update command.tsx
emilyrohrbough Feb 24, 2022
57c0fb3
padding off by 2px
emilyrohrbough Feb 24, 2022
841ff93
correct colors
emilyrohrbough Feb 24, 2022
d0f2adc
Merge branch 'refactor-cmd-ui' into new-cmd-log-styles
emilyrohrbough Feb 24, 2022
f45c984
updates
emilyrohrbough Feb 24, 2022
c5756ce
fix method sizing
emilyrohrbough Feb 25, 2022
ae43e36
update agent ui to use the name
emilyrohrbough Feb 25, 2022
e9577c2
Merge branch 'refactor-cmd-ui' into new-cmd-log-styles
emilyrohrbough Feb 25, 2022
f9cd0d3
update styles from sync with A
emilyrohrbough Feb 25, 2022
cece589
Merge branch '10.0-release' into new-cmd-log-styles
emilyrohrbough Mar 1, 2022
f72843a
round 1 of log logic better than prev
emilyrohrbough Mar 2, 2022
3332916
updates
emilyrohrbough Mar 2, 2022
12b972a
updates
emilyrohrbough Mar 2, 2022
05c5783
build binary
emilyrohrbough Mar 3, 2022
c0651c9
Merge branch '10.0-release' into new-cmd-log-styles
emilyrohrbough Mar 3, 2022
77e3879
updates
emilyrohrbough Mar 3, 2022
3559933
rd 1 with fix for yielded subject
emilyrohrbough Mar 3, 2022
54fc59f
easier to use IMO
emilyrohrbough Mar 3, 2022
c2c5929
clean up my fun test message
emilyrohrbough Mar 3, 2022
30de8c2
fix issue were detached alias was attempted to use the group-end cmd …
emilyrohrbough Mar 3, 2022
c326aa2
update reporter tests to match new behavior
emilyrohrbough Mar 3, 2022
66dccc4
Merge branch 'cmd-group-logic' into new-cmd-log-styles
emilyrohrbough Mar 3, 2022
5bb0a28
clean up
emilyrohrbough Mar 3, 2022
51c744f
add types.
emilyrohrbough Mar 4, 2022
5fabea2
Merge branch '10.0-release' into cmd-group-logic
emilyrohrbough Mar 4, 2022
c9468e0
whoops
emilyrohrbough Mar 4, 2022
cd0ee86
t push
emilyrohrbough Mar 4, 2022
e6b0478
Merge branch 'cmd-group-logic' into new-cmd-log-styles
emilyrohrbough Mar 4, 2022
aa1dcd1
clean up
emilyrohrbough Mar 4, 2022
231c182
Merge branch '10.0-release' into new-cmd-log-styles
emilyrohrbough Mar 8, 2022
5b3272c
latest changes
emilyrohrbough Mar 9, 2022
24baca9
fix circle
emilyrohrbough Mar 9, 2022
04e8f13
shoot add darwin so A can install
emilyrohrbough Mar 9, 2022
d58eba1
Merge branch '10.0-release' into cmd-group-logic
emilyrohrbough Mar 17, 2022
36531ec
Merge branch 'cmd-group-logic' into new-cmd-log-styles
emilyrohrbough Mar 17, 2022
1644964
fix
emilyrohrbough Mar 29, 2022
b681370
Merge branch '10.0-release' into new-cmd-log-styles
emilyrohrbough Mar 29, 2022
1967266
new cmd pin icon; fix cmd visibiliy bug
emilyrohrbough Mar 29, 2022
8a649be
fix cmd indentation first attempt & many attempts
emilyrohrbough Mar 29, 2022
c3d420b
end log if failure associated with log start cmd
emilyrohrbough Mar 29, 2022
5a17299
fix 1 px overlap which made dotted lines ugly
emilyrohrbough Mar 29, 2022
341bc63
fix method arg wrapping
emilyrohrbough Mar 29, 2022
287d49b
fix cmd message wrapping / overflow
emilyrohrbough Mar 29, 2022
249c1c1
hover styles of nested commands
emilyrohrbough Mar 29, 2022
0bbf23a
Merge branch '10.0-release' into new-cmd-log-styles
emilyrohrbough Mar 29, 2022
b73b151
Merge branch '10.0-release' into new-cmd-log-styles
emilyrohrbough Apr 6, 2022
6acd07f
later PR
emilyrohrbough Apr 6, 2022
f0f28f3
Merge remote-tracking branch 'origin/new-cmd-group-9.x' into cmd-grou…
emilyrohrbough Apr 7, 2022
9d97084
clean up
emilyrohrbough Apr 7, 2022
8dfd2aa
remove from this PR's set of changes
emilyrohrbough Apr 7, 2022
235cbe9
remove changes from scope
emilyrohrbough Apr 7, 2022
d48eaad
clean up
emilyrohrbough Apr 11, 2022
301fd7e
revert within changes
emilyrohrbough Apr 11, 2022
24ebd86
Merge branch '10.0-release' into new-cmd-log-styles
emilyrohrbough Apr 11, 2022
e2d9fb1
align
emilyrohrbough Apr 11, 2022
ba0e082
Merge branch 'new-cmd-log-styles' of https://github.com/cypress-io/cy…
emilyrohrbough Apr 11, 2022
f6bd9d5
clean up
emilyrohrbough Apr 11, 2022
d40debe
whoops
emilyrohrbough Apr 12, 2022
84c34b3
Merge branch '10.0-release' into new-cmd-log-styles
emilyrohrbough Apr 12, 2022
4259279
clean up.
emilyrohrbough Apr 13, 2022
9cb645d
fix progress bar.
emilyrohrbough Apr 13, 2022
ba9d81c
Merge branch '10.0-release' into new-cmd-log-styles
emilyrohrbough Apr 13, 2022
160e5c4
fix some tests
emilyrohrbough Apr 13, 2022
39341d5
Merge branch 'new-cmd-log-styles' of https://github.com/cypress-io/cy…
emilyrohrbough Apr 13, 2022
3f038a8
clean up tests.
emilyrohrbough Apr 13, 2022
b9c77ca
update styles per design feedback from A
emilyrohrbough Apr 20, 2022
2274a15
fix progress bar styles.
emilyrohrbough Apr 20, 2022
a20898c
fix tests
emilyrohrbough Apr 20, 2022
ea8d188
Merge branch '10.0-release' into new-cmd-log-styles
emilyrohrbough Apr 20, 2022
30e1def
few more tests
emilyrohrbough Apr 21, 2022
77c1f71
clean up
emilyrohrbough Apr 21, 2022
03b7593
Merge branch '10.0-release' into new-cmd-log-styles
emilyrohrbough Apr 21, 2022
158061c
Feedback from A
emilyrohrbough Apr 22, 2022
4a4ef0b
PR & design feedback.
emilyrohrbough Apr 25, 2022
8107885
PR feedback - don't add click event when its unnecessary
emilyrohrbough Apr 26, 2022
b580c25
Merge branch '10.0-release' into new-cmd-log-styles
emilyrohrbough Apr 26, 2022
38d64e4
Merge branch '10.0-release' into new-cmd-log-styles
emilyrohrbough Apr 27, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 13 additions & 9 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ mainBuildFilters: &mainBuildFilters
only:
- develop
- 10.0-release
- chore/cutover-to-bundled-react-mount
- new-cmd-log-styles

# uncomment & add to the branch conditions below to disable the main linux
# flow if we don't want to test it for a certain branch
Expand All @@ -47,7 +47,7 @@ macWorkflowFilters: &mac-workflow-filters
or:
- equal: [ develop, << pipeline.git.branch >> ]
- equal: [ '10.0-release', << pipeline.git.branch >> ]
- equal: [ chore/cutover-to-bundled-react-mount, << pipeline.git.branch >> ]
- equal: [ new-cmd-log-styles, << pipeline.git.branch >> ]
- matches:
pattern: "-release$"
value: << pipeline.git.branch >>
Expand Down Expand Up @@ -108,6 +108,16 @@ executors:
PLATFORM: windows

commands:
verify_should_persist_artifacts:
steps:
- run:
name: Check current branch to persist artifacts
command: |
if [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "new-cmd-log-styles" && "$CIRCLE_BRANCH" != "10.0-release" ]]; then
echo "Not uploading artifacts or posting install comment for this branch."
circleci-agent step halt
fi

restore_workspace_binaries:
steps:
- attach_workspace:
Expand Down Expand Up @@ -1716,13 +1726,7 @@ jobs:
- build-binary
- build-cypress-npm-package:
executor: << parameters.executor >>
- run:
name: Check current branch to persist artifacts
command: |
if [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "chore/cutover-to-bundled-react-mount" && "$CIRCLE_BRANCH" != "unify-1036-windows-test-projects" && "$CIRCLE_BRANCH" != "10.0-release" ]]; then
echo "Not uploading artifacts or posting install comment for this branch."
circleci-agent step halt
fi
- verify_should_persist_artifacts
- upload-build-artifacts
- post-install-comment

Expand Down
2 changes: 1 addition & 1 deletion packages/app/cypress/e2e/runner/runner.ui.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ describe('src/cypress/runner', () => {
failCount: 1,
})

cy.get('.command-number:contains(25)').should('be.visible')
cy.get('.command-number-column:contains(25)').should('be.visible')
})

it('file with empty suites only displays no tests found', () => {
Expand Down
74 changes: 16 additions & 58 deletions packages/driver/cypress/e2e/commands/actions/click.cy.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
const { _, $, Promise } = Cypress
const {
assertLogLength,
getCommandLogWithText,
findReactInstance,
withMutableReporterState,
clickCommandLog,
attachListeners,
shouldBeCalledWithCount,
Expand Down Expand Up @@ -4762,23 +4759,10 @@ describe('mouse state', () => {

cy.get('input:first').click()

cy.wrap(null)
.should(() => {
spyTableName.resetHistory()
spyTableData.resetHistory()

return withMutableReporterState(() => {
const commandLogEl = getCommandLogWithText('click')

const reactCommandInstance = findReactInstance(commandLogEl.get(0))

reactCommandInstance.props.appState.isRunning = false

commandLogEl.find('.command-wrapper').click()

expect(spyTableName).calledWith('Mouse Events')
expect(spyTableData).calledOnce
})
clickCommandLog('click')
.then(() => {
expect(spyTableName).calledWith('Mouse Events')
expect(spyTableData).calledOnce
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is A LOT more readable 👍

})
})

Expand All @@ -4788,26 +4772,13 @@ describe('mouse state', () => {

cy.get('input:first').dblclick()

cy.wrap(null, { timeout: 1000 })
.should(() => {
spyTableName.resetHistory()
spyTableData.resetHistory()

return withMutableReporterState(() => {
const commandLogEl = getCommandLogWithText('click')

const reactCommandInstance = findReactInstance(commandLogEl.get(0))

reactCommandInstance.props.appState.isRunning = false

commandLogEl.find('.command-wrapper').click()

expect(spyTableName).calledWith('Mouse Events')
expect(spyTableData).calledOnce
expect(spyTableData.lastCall.args[0]).property('8').includes({ 'Event Type': 'click' })
expect(spyTableData.lastCall.args[0]).property('13').includes({ 'Event Type': 'click' })
expect(spyTableData.lastCall.args[0]).property('14').includes({ 'Event Type': 'dblclick' })
})
clickCommandLog('click')
.then(() => {
expect(spyTableName).calledWith('Mouse Events')
expect(spyTableData).calledOnce
expect(spyTableData.lastCall.args[0]).property('8').includes({ 'Event Type': 'click' })
expect(spyTableData.lastCall.args[0]).property('13').includes({ 'Event Type': 'click' })
expect(spyTableData.lastCall.args[0]).property('14').includes({ 'Event Type': 'dblclick' })
})
})

Expand All @@ -4817,24 +4788,11 @@ describe('mouse state', () => {

cy.get('input:first').rightclick()

cy.wrap(null)
.should(() => {
spyTableName.resetHistory()
spyTableData.resetHistory()

return withMutableReporterState(() => {
const commandLogEl = getCommandLogWithText('click')

const reactCommandInstance = findReactInstance(commandLogEl.get(0))

reactCommandInstance.props.appState.isRunning = false

commandLogEl.find('.command-wrapper').click()

expect(spyTableName).calledWith('Mouse Events')
expect(spyTableData).calledOnce
expect(spyTableData.lastCall.args[0]).property('8').includes({ 'Event Type': 'contextmenu' })
})
clickCommandLog('click')
.then(() => {
expect(spyTableName).calledWith('Mouse Events')
expect(spyTableData).calledOnce
expect(spyTableData.lastCall.args[0]).property('8').includes({ 'Event Type': 'contextmenu' })
})
})
})
Expand Down
27 changes: 8 additions & 19 deletions packages/driver/cypress/e2e/commands/actions/type.cy.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
const { _, $ } = Cypress
const { Promise } = Cypress
const {
getCommandLogWithText,
findReactInstance,
withMutableReporterState,
clickCommandLog,
attachKeyListeners,
keyEvents,
trimInnerText,
Expand Down Expand Up @@ -3027,23 +3025,14 @@ describe('src/cy/commands/actions/type - #type', () => {
it('can print table of keys on click', () => {
cy.get('input:first').type('foo')

.then(() => {
return withMutableReporterState(() => {
const spyTableName = cy.spy(top.console, 'group')
const spyTableData = cy.spy(top.console, 'table')

const commandLogEl = getCommandLogWithText('foo', 'message-text')

const reactCommandInstance = findReactInstance(commandLogEl[0])

reactCommandInstance.props.appState.isRunning = false
const spyTableName = cy.spy(top.console, 'group')
const spyTableData = cy.spy(top.console, 'table')

$(commandLogEl).find('.command-wrapper').click()

expect(spyTableName.firstCall).calledWith('Mouse Events')
expect(spyTableName.secondCall).calledWith('Keyboard Events')
expect(spyTableData).calledTwice
})
clickCommandLog('foo', 'message-text')
.then(() => {
expect(spyTableName.firstCall).calledWith('Mouse Events')
expect(spyTableName.secondCall).calledWith('Keyboard Events')
expect(spyTableData).calledTwice
})
})
})
Expand Down
5 changes: 3 additions & 2 deletions packages/driver/cypress/e2e/e2e/dom_hitbox.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,14 @@ const ensureCorrectHighlightPositions = (sel) => {
const doc = els.content[0].ownerDocument

const contentHighlightCenter = [dims.content.x + dims.content.width / 2, dims.content.y + dims.content.height / 2]
const highlightedEl = doc.elementFromPoint(...contentHighlightCenter)

expect(doc.elementFromPoint(...contentHighlightCenter)).eq(els.content[0])
expect(highlightedEl).eq(els.content[0])

expectToBeInside(dims.content, dims.padding, 'content to be inside padding')
expectToBeInside(dims.padding, dims.border, 'padding to be inside border')
if (sel) {
// assert convering bounding-box of element
// assert converting bounding-box of element
expectToBeEqual(dims.border, cy.$$(sel)[0].getBoundingClientRect(), 'border-box to match selector bounding-box')
}
})
Expand Down
5 changes: 2 additions & 3 deletions packages/driver/cypress/support/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,9 @@ export const clickCommandLog = (sel, type) => {
}

reactCommandInstance.props.appState.isRunning = false
const inner = $(commandLogEl).find('.command-wrapper-text')

$(commandLogEl).find('.command-wrapper')
.click()
.get(0).scrollIntoView()
inner.get(0).click()

// make sure command was pinned, otherwise throw a better error message
expect(cy.$$('.runnable-active .command-pin', top.document).length, 'command should be pinned').ok
Expand Down
3 changes: 2 additions & 1 deletion packages/driver/src/cypress/log.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import $errUtils from './error_utils'
const groupsOrTableRe = /^(groups|table)$/
const parentOrChildRe = /parent|child|system/
const SNAPSHOT_PROPS = 'id snapshots $el url coords highlightAttr scrollBy viewportWidth viewportHeight'.split(' ')
const DISPLAY_PROPS = 'id alias aliasType callCount displayName end err event functionName hookId instrument isStubbed group message method name numElements showError numResponses referencesAlias renderProps state testId timeout type url visible wallClockStartedAt testCurrentRetry'.split(' ')
const DISPLAY_PROPS = 'id alias aliasType callCount displayName end err event functionName groupLevel hookId instrument isStubbed group message method name numElements showError numResponses referencesAlias renderProps state testId timeout type url visible wallClockStartedAt testCurrentRetry'.split(' ')
const BLACKLIST_PROPS = 'snapshots'.split(' ')

let counter = 0
Expand Down Expand Up @@ -206,6 +206,7 @@ const defaults = function (state: Cypress.State, config, obj) {

if (logGroupIds.length) {
obj.group = _.last(logGroupIds)
obj.groupLevel = logGroupIds.length
}

if (obj.groupEnd) {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading