-
Notifications
You must be signed in to change notification settings - Fork 221
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(common): Remove uuid and update unique id generation #1408
Changes from all commits
c120a03
b983bfc
81e7828
9041420
e976ed0
dbc9535
b581fdc
6e38744
01d45d9
8be6b18
3655f6a
3923ae4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,7 +52,7 @@ describe('Tooltip', () => { | |
}); | ||
|
||
it('should close the tooltip', () => { | ||
cy.findByRole('tooltip').should('not.be.visible'); | ||
cy.findByRole('tooltip').should('not.exist'); | ||
}); | ||
}); | ||
|
||
|
@@ -62,7 +62,7 @@ describe('Tooltip', () => { | |
}); | ||
|
||
it('should not close the tooltip', () => { | ||
cy.findByRole('tooltip').should('not.be.visible'); | ||
cy.findByRole('tooltip').should('not.exist'); | ||
}); | ||
}); | ||
}); | ||
|
@@ -82,7 +82,7 @@ describe('Tooltip', () => { | |
}); | ||
|
||
it('should close the tooltip', () => { | ||
cy.findByRole('tooltip').should('not.be.visible'); | ||
cy.findByRole('tooltip').should('not.exist'); | ||
}); | ||
}); | ||
|
||
|
@@ -104,7 +104,7 @@ describe('Tooltip', () => { | |
}); | ||
|
||
it('should close immediately, not waiting for blur or intent', () => { | ||
cy.findByRole('tooltip', {timeout: 0}).should('not.be.visible'); | ||
cy.findByRole('tooltip', {timeout: 0}).should('not.exist'); | ||
}); | ||
}); | ||
}); | ||
|
@@ -155,14 +155,14 @@ describe('Tooltip', () => { | |
}); | ||
|
||
it('the span element should not have an aria-describedby attribute', () => { | ||
cy.get('button').should('not.have.attr', 'aria-describedby'); | ||
cy.get('span').should('not.have.attr', 'aria-describedby'); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was caught by the change in Cypress v6. Before, |
||
}); | ||
|
||
it('the span element should not have an aria-label attribute', () => { | ||
cy.get('button').should('not.have.attr', 'aria-describedby'); | ||
cy.get('span').should('not.have.attr', 'aria-describedby'); | ||
}); | ||
|
||
context('when the "Delete" button is hovered', () => { | ||
context('when the "Some Text" text is hovered', () => { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was a copy/paste error. The tooltip isn't from a delete button, but a span with some text. |
||
beforeEach(() => { | ||
cy.get('span').trigger('mouseover'); | ||
}); | ||
|
@@ -176,11 +176,11 @@ describe('Tooltip', () => { | |
}); | ||
|
||
it('the span element should not have an aria-describedby attribute', () => { | ||
cy.get('button').should('not.have.attr', 'aria-describedby'); | ||
cy.get('span').should('not.have.attr', 'aria-describedby'); | ||
}); | ||
|
||
it('the span element should not have an aria-label attribute', () => { | ||
cy.get('button').should('not.have.attr', 'aria-describedby'); | ||
cy.get('span').should('not.have.attr', 'aria-describedby'); | ||
}); | ||
}); | ||
}); | ||
|
@@ -204,7 +204,7 @@ describe('Tooltip', () => { | |
}); | ||
|
||
it('should not show the tooltip', () => { | ||
cy.findByRole('tooltip').should('not.be.visible'); | ||
cy.findByRole('tooltip').should('not.exist'); | ||
}); | ||
}); | ||
|
||
|
@@ -244,7 +244,7 @@ describe('Tooltip', () => { | |
}); | ||
|
||
it('should not show the tooltip', () => { | ||
cy.findByRole('tooltip').should('not.be.visible'); | ||
cy.findByRole('tooltip').should('not.exist'); | ||
}); | ||
}); | ||
|
||
|
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.
All these were due to a breaking change in Cypress v6.
This "fix" did find legitimate issues with our tests, but I feel like we've lost some semantics. I want to know if the element is no longer accessible to the user. Whether it is still in the DOM or just hidden is an implementation detail. Perhaps I'll make an
be.inaccessible
assertion that does this.