Skip to content

Commit

Permalink
improving the cloudsync test
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonasB88 committed Apr 2, 2024
1 parent a80f2b4 commit 8f4abf5
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 14 deletions.
2 changes: 1 addition & 1 deletion cypress.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ module.exports = defineConfig({
// return config;
// },
experimentalMemoryManagement: true,
excludeSpecPattern: ['index.php'],
excludeSpecPattern: ['index.php', 'cypress/e2e/ps1785'],
specPattern: 'cypress/e2e/**/*.{js,jsx,ts,tsx}',
},
})
5 changes: 4 additions & 1 deletion cypress/e2e/ps1785/07_mollie.ps1785.Cloudsync.specs.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,11 @@ describe('PS8 Cloudsync tests', () => {
cy.viewport(1920,1080)
cy.CachingBOFOPS1785()
})
it('Checking if Cloudsync UI is appearing in the module', () => {
it('Checking if CloudSync UI is appearing in the module', () => {
cy.OpeningModuleDashboardURL()
cy.CloudSyncUI()
})
it('Linking the Shop to the PS CloudSync', () => {
cy.CloudSyncLink()
});
})
3 changes: 0 additions & 3 deletions cypress/e2e/ps8/01_mollie.ps8.ModuleConfiguration.specs.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,4 @@ it('C688473: Checking the Subscriptions FAQ, and console errors', () => {
cy.get(':nth-child(6) > .col-lg-12 > .card').should('be.visible')
cy.matchImage(); // let's make a snapshot for visual regression testing later, if UI matches
});
it.only('Linking the Shop to the PS CloudSync', () => {
cy.CloudSyncLink()
});
})
6 changes: 5 additions & 1 deletion cypress/e2e/ps8/07_mollie.ps8.Cloudsync.specs.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,12 @@ describe('PS8 Cloudsync tests', () => {
cy.viewport(1920,1080)
cy.CachingBOFOPS8()
})
it('Checking if Cloudsync UI is appearing in the module', () => {
it('Checking if the CloudSync UI is appearing in the module', () => {
cy.OpeningModuleDashboardURL()
cy.CloudSyncUI()
})
it('Checking if the PS Accounts / Popup UI is appearing in the module', () => {
cy.OpeningModuleDashboardURL()
cy.PsAccountsUI()
});
})
10 changes: 2 additions & 8 deletions cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,15 +252,9 @@ Cypress.Commands.add("selectSubscriptionsCarriersCheck", {cacheAcrossSpecs: true
cy.contains('Options saved successfully.').should('be.visible') //checking if saving returns green alert
})
Cypress.Commands.add("CloudSyncUI", {cacheAcrossSpecs: true}, () => {
cy.get('prestashop-accounts').should('be.visible')
cy.get('[id="prestashop-cloudsync"]').should('be.visible')
cy.get('prestashop-accounts').click(1650, 100)
// wip, looking for modal inner interaction
cy.iframe('[id^="uid_"]').find('button').should('be.visible')
})
Cypress.Commands.add("CloudSyncLink", {cacheAcrossSpecs: true}, () => {
cy.visit('/admin1/')
cy.get('.mi-mollie').click({fore:true})
cy.get('#subtab-AdminMollieModule').click()
Cypress.Commands.add("PsAccountsUI", {cacheAcrossSpecs: true}, () => {
cy.get('prestashop-accounts').shadow().find('[id="associate-shop-button"]').click()
// Wait for the popup window to open
cy.window().then(win => {
Expand Down

0 comments on commit 8f4abf5

Please sign in to comment.