Fix homeFeed flaky spec
This commit is contained in:
parent
627cb203f6
commit
670d82ac3b
1 changed files with 5 additions and 4 deletions
|
|
@ -5,19 +5,20 @@ describe('Logged out Home feed', () => {
|
|||
});
|
||||
|
||||
it("shows a profile preview card for an article's author", () => {
|
||||
cy.findAllByRole('button', { name: 'Admin McAdmin profile details' })
|
||||
cy.get('[aria-label="Admin McAdmin profile details"]')
|
||||
.first()
|
||||
.as('previewButton');
|
||||
cy.get('@previewButton').should('have.attr', 'data-initialized');
|
||||
cy.get('@previewButton').click();
|
||||
cy.get('@previewButton').should('have.attr', 'aria-expanded', 'true');
|
||||
|
||||
cy.findAllByTestId('profile-preview-card')
|
||||
cy.get('[aria-expanded="true"]')
|
||||
.siblings('div')
|
||||
.first()
|
||||
.within(() => {
|
||||
// TODO: check for focus here.
|
||||
cy.findByRole('link', {
|
||||
name: 'Admin McAdmin',
|
||||
});
|
||||
}).should('have.focus');
|
||||
|
||||
// Check all the expected user data sections are present
|
||||
cy.findByText('Admin user summary');
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue