diff --git a/cypress/e2e/load-wp.cy.js b/cypress/e2e/load-wp.cy.js index 813a3e789..8c468911a 100644 --- a/cypress/e2e/load-wp.cy.js +++ b/cypress/e2e/load-wp.cy.js @@ -1,9 +1,9 @@ -describe( 'Run a pull', function() { +describe( 'Visit backend sites', function() { // Go to WordPress login page and login. beforeEach( function() { cy.visit( '/wp-login.php' ); cy.wait( 1000 ); - cy.get( '#user_login' ).type( Cypress.env( "wpUser" ) ); + cy.get( '#user_login' ).type( Cypress.env( "wpAdmin" ) ); cy.get( '#user_pass' ).type( Cypress.env( "wpPassword" ) ); cy.get( '#wp-submit' ).click(); } ); @@ -19,55 +19,63 @@ describe( 'Run a pull', function() { cy.screenshot( 'wp-admin-dashboard' ) } ); - it ('can load the CB pages', function() { + it ('can load the CB dashboard', function() { cy.visit( '/wp-admin/admin.php?page=cb-dashboard' ); cy.contains("Welcome to CommonsBooking."); cy.screenshot( 'wp-admin-cb-dashboard' ) + } ); - //Timeframes menu page + it ('can load the timeframes menu page', function() { cy.visit( '/wp-admin/edit.php?post_type=cb_timeframe' ); cy.contains("Timeframes"); cy.screenshot( 'wp-admin-cb-timeframes' ) + } ); - //Items menu page + it ('can load the items menu page', function() { cy.visit( '/wp-admin/edit.php?post_type=cb_item' ); cy.contains("Items"); cy.screenshot( 'wp-admin-cb-items' ) + } ); - //Locations menu page + it ('can load the locations menu page', function() { cy.visit( '/wp-admin/edit.php?post_type=cb_location' ); cy.contains("Locations"); cy.screenshot( 'wp-admin-cb-locations' ) + } ); - //Bookings menu page + it ('can load the bookings menu page', function() { cy.visit( '/wp-admin/edit.php?post_type=cb_booking' ); cy.contains("Bookings"); cy.screenshot( 'wp-admin-cb-bookings' ) + } ); - //Maps menu page + it ('can load the maps menu page', function() { cy.visit( '/wp-admin/edit.php?post_type=cb_map' ); cy.contains("Maps"); cy.screenshot( 'wp-admin-cb-maps' ) + } ); - //Restrictions menu page + it ('can load the restrictions menu page', function() { cy.visit( '/wp-admin/edit.php?post_type=cb_restriction' ); cy.contains("Restrictions"); cy.screenshot( 'wp-admin-cb-restrictions' ) + } ); - //Item Categories menu page + it ('can load the item categories menu page', function() { cy.visit( '/wp-admin/edit-tags.php?taxonomy=cb_items_category' ); cy.contains("Item Category"); cy.screenshot( 'wp-admin-cb-item-categories' ) + } ); - //Location Categories menu page + it ('can load the location categories menu page', function() { cy.visit( '/wp-admin/edit-tags.php?taxonomy=cb_locations_category' ); cy.contains("Location Category"); cy.screenshot( 'wp-admin-cb-location-categories' ) + } ); - //Settings page + it ('can load the settings menu page', function() { cy.visit( '/wp-admin/options-general.php?page=commonsbooking_options' ); cy.contains("Welcome to CommonsBooking"); cy.screenshot( 'wp-admin-cb-settings' ) - } ); });