-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: fix testcases after package bump IV
- Loading branch information
Showing
8 changed files
with
18 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -185,7 +185,7 @@ describe( | |
cy.findByLabelText('HiddenButton').should('not.be.visible'); | ||
cy.findByLabelText('Announcements').should('be.visible'); | ||
cy.findByRole('button', { name: 'help' }).should('be.visible'); | ||
cy.findByRole('button', { name: 'open and close list of options' }).should('not.exist'); | ||
cy.findByRole('button', { name: 'Open and close list of options' }).should('not.exist'); | ||
cy.findByRole('button', { name: 'user', label: 'user' }).should('be.visible'); | ||
}); | ||
|
||
|
@@ -210,18 +210,18 @@ describe( | |
|
||
cy.findByLabelText('Announcements').should('not.exist'); | ||
cy.findByRole('button', { name: 'help' }).should('not.exist'); | ||
cy.findByRole('button', { name: 'open and close list of options' }).click(); | ||
cy.findByRole('button', { name: 'Open and close list of options' }).click(); | ||
cy.findByRole('menuitem', { name: 'Announcements' }) | ||
.should('be.visible') | ||
.click() | ||
.should(() => { | ||
expect(onClick).to.have.been.called; | ||
}); | ||
cy.findByRole('button', { name: 'open and close list of options' }) | ||
cy.findByRole('button', { name: 'Open and close list of options' }) | ||
.find('svg') | ||
.invoke('attr', 'description') | ||
.should('eq', 'Open menu'); | ||
cy.findByRole('button', { name: 'open and close list of options' }).click(); | ||
cy.findByRole('button', { name: 'Open and close list of options' }).click(); | ||
cy.findByRole('menuitem', { name: 'help' }).should('be.visible').click(); | ||
cy.findByRole('button', { name: 'help' }) | ||
.find('svg') | ||
|
@@ -236,19 +236,19 @@ describe( | |
.findByTestId('action-btn__panel') | ||
.should('not.exist'); | ||
|
||
cy.findByRole('button', { name: 'open and close list of options' }).click(); | ||
cy.findByRole('button', { name: 'Open and close list of options' }).click(); | ||
cy.findByRole('menuitem', { name: 'user' }).click(); | ||
cy.findByText('[email protected]').should('be.visible'); | ||
cy.findByTestId('menuitem', { name: 'user' }) | ||
.find('svg') | ||
.invoke('attr', 'description') | ||
.should('eq', 'Close menu'); | ||
cy.findByTestId('menuitem', { name: 'user' }).click(); | ||
cy.findByRole('button', { name: 'open and close list of options' }).should('be.visible'); | ||
cy.findByRole('button', { name: 'Open and close list of options' }).should('be.visible'); | ||
|
||
// click the left side specifically to _not_ click the svg element right in the center | ||
// to ensure overflow also opens when clicking the button element. | ||
cy.findByRole('button', { name: 'open and close list of options' }).click(5, 5, { | ||
cy.findByRole('button', { name: 'Open and close list of options' }).click(5, 5, { | ||
force: true, | ||
}); | ||
cy.findByRole('menuitem', { name: 'Announcements' }).should('be.visible'); | ||
|
@@ -278,7 +278,7 @@ describe( | |
|
||
cy.findByLabelText('Announcements').should('not.exist'); | ||
cy.findByRole('button', { name: 'help' }).should('not.exist'); | ||
cy.findByRole('button', { name: 'open and close list of options' }).click(); | ||
cy.findByRole('button', { name: 'Open and close list of options' }).click(); | ||
cy.findByRole('menuitem', { name: 'Announcements' }) | ||
.should('be.visible') | ||
.click() | ||
|
@@ -303,7 +303,7 @@ describe( | |
|
||
mount(<Header {...commonProps} isActionItemVisible={isActionItemVisible} />); | ||
|
||
cy.findByRole('button', { name: 'open and close list of options' }).click(); | ||
cy.findByRole('button', { name: 'Open and close list of options' }).click(); | ||
cy.findByRole('menuitem', { name: 'Announcements' }).should('be.visible'); | ||
cy.findByRole('button', { name: 'Custom icon 1', label: 'Custom icon 1' }).should( | ||
'not.exist' | ||
|
@@ -324,7 +324,7 @@ describe( | |
|
||
mount(<Header {...commonProps} />); | ||
|
||
cy.findByRole('button', { name: 'open and close list of options' }).click(); | ||
cy.findByRole('button', { name: 'Open and close list of options' }).click(); | ||
cy.findByRole('menuitem', { name: 'Announcements' }).should('be.visible'); | ||
// I don't know if this is actually necessary in cypress, but just to be safe. | ||
cy.window().then((win) => { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters