diff --git a/.github/workflows/E2E_On_PR.yml b/.github/workflows/E2E_On_PR.yml index 119cf4207..ed658e494 100755 --- a/.github/workflows/E2E_On_PR.yml +++ b/.github/workflows/E2E_On_PR.yml @@ -1,7 +1,6 @@ name: Cypress E2E Automation [develop branch] on: pull_request: - types: [opened, reopened] branches: [develop, develop**, develop-**] concurrency: @@ -59,7 +58,7 @@ jobs: run: | ${{ matrix.make }} - - name: Waiting for Ngrok tunnel + - name: Waiting for Ngrok run: | URL="${{ matrix.url }}" TIMEOUT=120 @@ -102,7 +101,7 @@ jobs: - name: Archive videos and screenshots if: ${{ always() }} - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: Cypress_Mollie_videos_screenshots_${{ matrix.prestashop }} retention-days: 2 diff --git a/Makefile b/Makefile index de3a68b13..e675d76ee 100755 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ module = mollie # target: fix-lint - Launch php cs fixer fix-lint: - docker-compose run --rm php sh -c "vendor/bin/php-cs-fixer fix --using-cache=no" + docker compose run --rm php sh -c "vendor/bin/php-cs-fixer fix --using-cache=no" # Launch the PS build and E2E Cypress app automatically. Eexample: make VERSION=1785 e2eh1785_local, make VERSION=8 e2eh8_local etc. # Warning: .env with secrets must be imported if you wanna test locally! This checks the .env existence, ignoring if there is no such on your machine. @@ -17,9 +17,9 @@ endif e2eh$(VERSION)_local: composer install # detaching containers - docker-compose -f docker-compose.$(VERSION).yml up -d --force-recreate + docker compose -f docker-compose.$(VERSION).yml up -d --force-recreate # sees what containers are running - docker-compose -f docker-compose.$(VERSION).yml ps + docker compose -f docker-compose.$(VERSION).yml ps make waiting-for-containers-local make seeding-customized-sql make installing-uninstalling-enabling-module @@ -29,9 +29,9 @@ e2eh$(VERSION)_local: # For CI build with PS autoinstall e2eh$(VERSION): # detaching containers - docker-compose -f docker-compose.$(VERSION).yml up -d --force-recreate + docker compose -f docker-compose.$(VERSION).yml up -d --force-recreate # sees what containers are running - docker-compose -f docker-compose.$(VERSION).yml ps + docker compose -f docker-compose.$(VERSION).yml ps make waiting-for-containers-CI make seeding-customized-sql make installing-uninstalling-enabling-module diff --git a/controllers/front/return.php b/controllers/front/return.php index d5c664310..18783dc22 100644 --- a/controllers/front/return.php +++ b/controllers/front/return.php @@ -107,7 +107,13 @@ public function initContent() } if (false === $data['mollie_info']) { $data['mollie_info'] = []; - $data['msg_details'] = $this->module->l('There is no order with this ID.', self::FILE_NAME); + //NOTE: information instead of error as this might occur due to cancellation of the payment + $logger->info(sprintf('There is no order with this order number - %s', (string) $orderNumber)); + + $data['msg_details'] = $this->module->l('Your payment was not successful. Try again.', self::FILE_NAME); + $this->setWarning($data['msg_details']); + + Tools::redirect(Context::getContext()->link->getPageLink('cart', true)); } elseif (PaymentMethod::BANKTRANSFER === $data['mollie_info']['method'] && PaymentStatus::STATUS_OPEN === $data['mollie_info']['bank_status'] ) { diff --git a/cypress/e2e/ps8/05_mollie.ps8.PaymentTestsPaymentsAPI.js b/cypress/e2e/ps8/05_mollie.ps8.PaymentTestsPaymentsAPI.js index 8b0657a29..2aa23bbc0 100755 --- a/cypress/e2e/ps8/05_mollie.ps8.PaymentTestsPaymentsAPI.js +++ b/cypress/e2e/ps8/05_mollie.ps8.PaymentTestsPaymentsAPI.js @@ -161,8 +161,6 @@ it('C339391: 56 Przelewy24 Checkouting [Payments API]', () => { cy.contains('Przelewy24').click({force:true}) cy.get('.condition-label > .js-terms').click({force:true}) cy.contains('Place order').click() - cy.get('.input-float > input').type('testing@testing.com') - cy.get('[class="button form__button"]').click() cy.get('[value="paid"]').click() cy.get('[class="button form__button"]').click() cy.get('#content-hook_order_confirmation > .card-block').should('be.visible')