Skip to content

Commit

Permalink
Fix failing cypress tests
Browse files Browse the repository at this point in the history
  • Loading branch information
wpalani committed Jul 13, 2023
1 parent 56fc01a commit 4309838
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions inc/RestApi/SettingsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ public function get_current_settings() {

$settings = array(
'comingSoon' => ( 'true' === get_option( 'nfd_coming_soon', 'false' ) ),
'autoUpdatesAll' => $major && $plugins && $themes,
'autoUpdatesMajorCore' => $major,
'autoUpdatesMinorCore' => $minor,
'autoUpdatesPlugins' => $plugins,
Expand Down
8 changes: 7 additions & 1 deletion tests/cypress/integration/coming-soon.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,20 @@ describe('Coming Soon', function () {
// if already checked, turn off
cy.get('[data-id="coming-soon-toggle"]').click();
// wait
cy.wait(100);
cy.wait(200);
}
// turn on
cy.get('[data-id="coming-soon-toggle"]').click();
cy.wait(200);
});

cy.get('.hgwp-app-settings-coming-soon .yst-alert--info').scrollIntoView()
.contains('Coming Soon')
.should('be.visible');
});

it('Displays Coming Soon in Site Status Admin Toolbar', () => {
cy.reload();
cy.get('#wp-toolbar #wp-admin-bar-hostgator-coming_soon')
.contains('a', 'Coming Soon Active')
.should('be.visible');
Expand Down

0 comments on commit 4309838

Please sign in to comment.