Skip to content

Commit

Permalink
ps8 test updates
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonasB88 committed Nov 13, 2023
1 parent b0cfbab commit 89a2fe2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,10 @@ it('C339305: 01 Connecting test API successsfully', () => {
it('C339338: 02 Enabling Mollie carriers in Prestashop successfully', () => {
cy.visit('/admin1/')
cy.get('[id="subtab-AdminPaymentPreferences"]').find('[href]').eq(0).click({force:true})
cy.get('[class="js-multiple-choice-table-select-column"]').eq(6).click()
cy.get('[class="btn btn-primary"]').eq(3).click()
cy.get('[class="js-multiple-choice-table-select-column"]').each(($element) => { // checks all the checkboxes in the loop, if not checked
cy.wrap($element).click()
})
cy.get('[id="form-carrier-restrictions-save-button"]').click()
})
it('C339339: 03 Checking the Advanced Settings tab, verifying the Front-end components, Saving the form, checking if there are no Errors in Console', () => {
cy.visit('/admin1/')
Expand Down Expand Up @@ -108,6 +110,7 @@ it('C339339: 03 Checking the Advanced Settings tab, verifying the Front-end comp
cy.get('[name="MOLLIE_DISPLAY_ERRORS"]').should('exist')
cy.get('[name="MOLLIE_DEBUG_LOG"]').should('exist')
cy.get('[name="MOLLIE_SUBSCRIPTION_ORDER_CARRIER_ID"]').should('be.visible') // checking the Subscriptions carriers select
cy.get('[name="MOLLIE_SUBSCRIPTION_ORDER_CARRIER_ID"]').select('Click and collect')
cy.get('#module_form_submit_btn').click({force:true}) //checking the saving
cy.get('[class="alert alert-success"]').should('be.visible') //checking if saving returns green alert
//cy.window() will check if there are no Errors in console
Expand Down
7 changes: 5 additions & 2 deletions cypress/e2e/ps8/01_mollie.ps8.ModuleConfiguration.specs.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,10 @@ it('C339305: Connecting test API successsfully', () => {
it('C339338: Enabling Mollie carriers in Prestashop successfully', () => {
cy.visit('/admin1/')
cy.get('[id="subtab-AdminPaymentPreferences"]').find('[href]').eq(0).click({force:true})
cy.get('[class="js-multiple-choice-table-select-column"]').eq(6).click()
cy.get('[class="btn btn-primary"]').eq(3).click()
cy.get('[class="js-multiple-choice-table-select-column"]').each(($element) => { // checks all the checkboxes in the loop, if not checked
cy.wrap($element).click()
})
cy.get('[id="form-carrier-restrictions-save-button"]').click()
})
it('C339339: Checking the Advanced Settings tab, verifying the Front-end components, Saving the form, checking if there are no Errors in Console', () => {
cy.visit('/admin1/')
Expand Down Expand Up @@ -78,6 +80,7 @@ it('C339339: Checking the Advanced Settings tab, verifying the Front-end compone
cy.get('[name="MOLLIE_DISPLAY_ERRORS"]').should('exist')
cy.get('[name="MOLLIE_DEBUG_LOG"]').should('exist')
cy.get('[name="MOLLIE_SUBSCRIPTION_ORDER_CARRIER_ID"]').should('be.visible') // checking the Subscriptions carriers select
cy.get('[name="MOLLIE_SUBSCRIPTION_ORDER_CARRIER_ID"]').select('Click and collect')
cy.get('#module_form_submit_btn').click({force:true}) //checking the saving
cy.get('[class="alert alert-success"]').should('be.visible') //checking if saving returns green alert
//cy.window() will check if there are no Errors in console
Expand Down
2 changes: 2 additions & 0 deletions cypress/e2e/ps8/06_mollie.ps8.Subscriptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,14 @@ it('C176305: Check if Subscription options added in Product BO', () => {
cy.contains('Product with combinations').click()
cy.get('[id="tab_step3"]').click()
cy.contains('Daily').click({force:true})
cy.contains('None').click({force:true})
cy.get('[class="token"]').should('be.visible')
cy.get('#create-combinations').click()
cy.wait(5000)
cy.reload()
cy.wait(5000)
cy.contains('Mollie Subscription - Daily').should('be.visible')
cy.contains('Mollie Subscription - None').should('be.visible')
cy.get('[class="attribute-quantity"]').last().find('[type="text"]').clear().type('999')
cy.get('#submit').click()
cy.get('.growl-message').contains('Settings updated.')
Expand Down

0 comments on commit 89a2fe2

Please sign in to comment.