-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
fix(ui): display duplicate aliases in command log #16382
Conversation
Thanks for taking the time to open a PR!
|
Test summaryRun details
View run in Cypress Dashboard ➡️ This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why don't the tests have the proper classes for the display?
Inside test
Outside test
I feel like this should reflect reality.
Anyway, I fixed the css so that:
- the weird circular alias shouldn't show anymore.
- there is a max width on the matched aliases because it was really gnarly if there were more than 5 matches or so.
Not sure how great of a solution this is for people reviewing videos of the run.
Changes look great @jennifer-shehane. Finally, the weird cut-off-pill shape has been fixed! |
@flotwig So the percy screenshots looks a little off with my css changes, but...again, I'm not sure if this is accurate to real situations that would happen. I can try to recreate locally, but at least the dup one in the screenshots doesn't look like that usually. https://percy.io/cypress-io/cypress/builds/10298521 |
I think the percy discrepencies are a zoom issue or something, because the css doesn't display the same as the snapshots when at 100%. @flotwig Is this what's meant to be addressed in the other command log issue, but why are there duplicate logs for requests in this example 5 - 10 - 10? It looks a lot clearer with the aliases displayed in this PR anyway. it('test cy.intercept()', () => {
cy.intercept('/u*').as('getUrl1')
cy.intercept('/us*').as('getUrl2')
cy.intercept('/use*').as('getUrl3')
cy.intercept('/user*').as('getUrl4')
cy.intercept('/users*').as('getUrl5')
cy.visit('https://example.com')
cy.window().then((win) => {
const xhr = new win.XMLHttpRequest()
xhr.open('GET', '/users')
xhr.send()
})
cy.window().then((win) => {
const xhr = new win.XMLHttpRequest()
xhr.open('GET', '/users')
xhr.send()
})
cy.window().then((win) => {
const xhr = new win.XMLHttpRequest()
xhr.open('GET', '/users')
xhr.send()
})
cy.window().then((win) => {
const xhr = new win.XMLHttpRequest()
xhr.open('GET', '/users')
xhr.send()
})
cy.window().then((win) => {
const xhr = new win.XMLHttpRequest()
xhr.open('GET', '/users')
xhr.send()
})
cy.wait('@getUrl1')
cy.wait('@getUrl2')
cy.wait('@getUrl3')
cy.wait('@getUrl4')
cy.wait('@getUrl5')
}) |
@jennifer-shehane the browser is probably retrying the request, since presumably it's failing? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
super
* develop: remove unused deps from webpack-preprocessor (#16384) feat: exclude html pwa plugin in webpack dev server (#16388) fix(ui): display duplicate aliases in command log (#16382) fix(ui): show req stub/fn when a handler is supplied (#16383) feat(component-testing): Expose CT through CLI module API (#16368)
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
User facing changelog
cy.intercept()
andcy.route()
requests with multiple aliases are displayed in the command log.Additional details
How has the user experience changed?
The aliases are now displayed in one line (ignore the lack of badge background, this is just a test):
But the list can still be expanded, in which case it's unjoined:
PR Tasks
cypress-documentation
?type definitions
?cypress.schema.json
?