[15 min fix] Update flaky test in loggedOutFlows (#14271)

* fix flake in save click test

* rename data attr
This commit is contained in:
Suzanne Aitchison 2021-07-19 14:25:41 +01:00 committed by GitHub
parent 2ad463f078
commit ca5de50308
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View file

@ -29,6 +29,7 @@ function highlightButton(button) {
button.classList.remove('selected');
}
button.addEventListener('click', reactToReadingListButtonClick);
button.dataset.saveInitialized = true;
}
function addReadingListCountToHomePage() {

View file

@ -4,8 +4,10 @@ describe('Show log in modal', () => {
cy.visit('/');
});
it.skip('should show a log in modal on Feed bookmark click', () => {
it('should show a log in modal on Feed bookmark click', () => {
cy.findAllByRole('button', { name: /Save/ }).first().as('bookmarkButton');
// Wait for the click handler to be attached to the button
cy.get('@bookmarkButton').should('have.attr', 'data-save-initialized');
cy.get('@bookmarkButton').click();