-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #324 from newfold-labs/update/tests
Update/tests
- Loading branch information
Showing
15 changed files
with
634 additions
and
625 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
<?php return array('dependencies' => array('lodash', 'moment', 'react', 'wp-api-fetch', 'wp-data', 'wp-date', 'wp-dom-ready', 'wp-element', 'wp-i18n', 'wp-url'), 'version' => 'befd0e22adb79ae95781'); | ||
|
||
<?php return array('dependencies' => array('lodash', 'moment', 'react', 'react-dom', 'wp-api-fetch', 'wp-data', 'wp-date', 'wp-dom-ready', 'wp-element', 'wp-i18n', 'wp-url'), 'version' => 'fcffdffca026344a7b49'); |
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
90 changes: 90 additions & 0 deletions
90
tests/cypress/integration/Home/ecommerce-coming-soon.cy.js
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 |
---|---|---|
@@ -0,0 +1,90 @@ | ||
import { GetPluginId } from '../wp-module-support/pluginID.cy'; | ||
import { | ||
wpLogin, | ||
comingSoon, | ||
uninstallPlugins, | ||
} from '../wp-module-support/utils.cy'; | ||
import { EventsAPI, APIList } from '../wp-module-support/eventsAPIs.cy'; | ||
|
||
const customCommandTimeout = 20000; | ||
const pluginId = GetPluginId(); | ||
const hg_region = 'br'; | ||
|
||
describe( | ||
'e-commerce Home Page- Coming soon mode', | ||
{ testIsolation: true }, | ||
() => { | ||
beforeEach( () => { | ||
wpLogin(); | ||
uninstallPlugins(); | ||
comingSoon( true ); | ||
cy.visit( '/wp-admin/admin.php?page=' + pluginId + '#/home' ); | ||
} ); | ||
|
||
it( 'Verify Congrats on your new site message, coming soon alert', () => { | ||
cy.get( '.nfd-gap-4 .nfd-title.nfd-title--2', { | ||
timeout: customCommandTimeout, | ||
} ) | ||
.eq( 0 ) | ||
.should( 'exist' ); | ||
cy.get( '.nfd-alert.nfd-alert--warning', { | ||
timeout: customCommandTimeout, | ||
} ) | ||
.as( 'comingsoonalert' ) | ||
.should( 'exist' ); | ||
cy.get( '@comingsoonalert' ) | ||
.find( '.nfd-validation-icon' ) | ||
.should( 'exist' ); | ||
cy.get( '@comingsoonalert' ) | ||
.find( '.nfd-validation-message' ) | ||
.should( 'exist' ); | ||
} ); | ||
|
||
it( 'Verify Site Preview flex and View your site option', () => { | ||
cy.get( '.nfd-justify-start > .nfd-flex-col > .nfd-absolute', { | ||
timeout: customCommandTimeout, | ||
} ) | ||
.as( 'sitePreviewFlex' ) | ||
.should( 'exist' ); | ||
cy.get( '@sitePreviewFlex' ) | ||
.trigger( 'mouseover' ) | ||
.find( '[data-cy="view-site"]' ) | ||
.should( 'exist' ) | ||
.invoke( 'removeAttr', 'target' ) | ||
.click(); | ||
cy.url().should( 'eq', Cypress.config().baseUrl + '/' ); | ||
cy.go( 'back' ); | ||
} ); | ||
|
||
it( 'Verify presense of Ready to go to live? canvas', () => { | ||
cy.get( '.nfd-px-4', { timeout: customCommandTimeout } ) | ||
.as( 'readyToGoNextLevel' ) | ||
.should( 'exist' ); | ||
cy.get( '@readyToGoNextLevel', { timeout: customCommandTimeout } ) | ||
.find( '.nfd-flex-1 h1' ) | ||
.should( 'exist' ); | ||
cy.get( '@readyToGoNextLevel' ) | ||
.find( '.nfd-flex-1 span' ) | ||
.should( 'exist' ); | ||
cy.get( '@readyToGoNextLevel', { timeout: customCommandTimeout } ) | ||
.find( '#view-site' ) | ||
.should( 'exist' ); | ||
cy.get( '@readyToGoNextLevel' ) | ||
.find( '#launch-site' ) | ||
.should( 'exist' ); | ||
} ); | ||
|
||
it( 'Verify Visit your site and Launch your site functionality', () => { | ||
cy.get( '.nfd-flex-none > .nfd-button--secondary', { | ||
timeout: customCommandTimeout, | ||
} ) | ||
.invoke( 'removeAttr', 'target' ) | ||
.click(); | ||
cy.url().should( 'eq', Cypress.config().baseUrl + '/' ); | ||
cy.go( 'back' ); | ||
cy.get( '.nfd-flex-none > .nfd-button--upsell' ).click(); | ||
cy.get('[data-testid="siteStatus"]').should('not.exist'); | ||
cy.get( '.nfd-notification--success' ).should( 'exist' ); | ||
} ); | ||
} | ||
); |
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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { GetPluginId } from '../wp-module-support/pluginID.cy'; | ||
import { | ||
wpLogin, | ||
comingSoon, | ||
uninstallPlugins, | ||
} from '../wp-module-support/utils.cy'; | ||
|
||
const customCommandTimeout = 20000; | ||
const pluginId = GetPluginId(); | ||
|
||
describe( 'e-commerce Home Page- Live Mode', { testIsolation: true }, () => { | ||
beforeEach( () => { | ||
wpLogin(); | ||
uninstallPlugins(); | ||
comingSoon( false ); | ||
cy.visit( '/wp-admin/admin.php?page=' + pluginId + '#/home' ); | ||
} ); | ||
|
||
it( 'Verify presense of Ready to go to next level? canvas', () => { | ||
cy.get( '.nfd-flex.nfd-gap-4', { timeout: customCommandTimeout } ) | ||
.eq( 2 ) | ||
.as( 'readyToGoNextLevel' ) | ||
.should( 'exist' ); | ||
cy.get( '@readyToGoNextLevel', { timeout: customCommandTimeout } ) | ||
.find( 'h1' ) | ||
.should( 'exist' ); | ||
cy.get( '@readyToGoNextLevel' ).find( 'div span' ).should( 'exist' ); | ||
} ); | ||
|
||
it( 'Verify by default View Site option should be displayed', () => { | ||
cy.get( '.nfd-button--primary', { | ||
timeout: customCommandTimeout, | ||
} ) | ||
.eq( 1 ) | ||
.should( 'exist' ) | ||
.invoke( 'removeAttr', 'target' ) | ||
.click(); | ||
cy.url().should( 'eq', Cypress.config().baseUrl + '/' ); | ||
} ); | ||
} ); |
Oops, something went wrong.