diff --git a/.github/workflows/_matrix.json b/.github/workflows/_matrix.json index b1ef6340..b8ea5a12 100644 --- a/.github/workflows/_matrix.json +++ b/.github/workflows/_matrix.json @@ -2,13 +2,6 @@ "pr": { "ci": { "include": [ - { - "php": "8.1", - "sylius": "1.12.x", - "symfony": "5.4.x", - "mysql": "8.0", - "state_machine": "winzou_state_machine" - }, { "php": "8.3", "sylius": "1.13.x", diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index da22f8fe..f33de4d2 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -46,10 +46,10 @@ jobs: PANTHER_NO_SANDBOX: 1 PANTHER_CHROME_ARGUMENTS: '--disable-dev-shm-usage --window-size=1400,900' TPAY_API_URL: 'http://localhost:4000' - TPAY_CLIENT_ID: '{{ secrets.TPAY_CLIENT_ID }}' - TPAY_CLIENT_SECRET: '{{ secrets.TPAY_CLIENT_SECRET }}' - TPAY_CARDS_API: '{{ secrets.TPAY_CARDS_API }}' - PAYUM_CYPHER_KEY: '{{ secrets.PAYUM_CYPHER_KEY }}' + TPAY_CLIENT_ID: ${{ secrets.TPAY_CLIENT_ID }} + TPAY_CLIENT_SECRET: ${{ secrets.TPAY_CLIENT_SECRET }} + TPAY_CARDS_API: ${{ secrets.TPAY_CARDS_API }} + PAYUM_CYPHER_KEY: ${{ secrets.PAYUM_CYPHER_KEY }} steps: - diff --git a/tests/E2E/Checkout/TpayPaymentCheckoutTest.php b/tests/E2E/Checkout/TpayPaymentCheckoutTest.php index 1e2cd745..02dba807 100644 --- a/tests/E2E/Checkout/TpayPaymentCheckoutTest.php +++ b/tests/E2E/Checkout/TpayPaymentCheckoutTest.php @@ -49,7 +49,14 @@ public function test_it_completes_the_checkout(): void public function test_it_completes_the_checkout_using_credit_card(): void { $this->processWithPaymentMethod('tpay_card'); + $this->client->wait(1); + $this->client->takeScreenshot(dirname(__DIR__, 3) . '/tests/Application/var/log/one.png'); + file_put_contents(dirname(__DIR__, 3) . '/tests/Application/var/log/one.html', $this->client->getPageSource()); $this->fillCardData('John Doe', self::CARD_NUMBER, '123', '01', '2029'); + + $this->client->wait(1); + $this->client->takeScreenshot(dirname(__DIR__, 3) . '/tests/Application/var/log/two.png'); + file_put_contents(dirname(__DIR__, 3) . '/tests/Application/var/log/two.html', $this->client->getPageSource()); $this->placeOrder(); $this->assertPageTitleContains('Thank you!'); diff --git a/tests/E2E/Helper/Order/TpayTrait.php b/tests/E2E/Helper/Order/TpayTrait.php index 9b8af404..78eddb43 100644 --- a/tests/E2E/Helper/Order/TpayTrait.php +++ b/tests/E2E/Helper/Order/TpayTrait.php @@ -14,10 +14,23 @@ trait TpayTrait { public function fillCardData(string $holderName, string $cardNumber, string $cvv, string $month, string $year): void { - $this->client->findElement(WebDriverBy::id('sylius_checkout_complete_tpay_card_holder_name'))->sendKeys($holderName); - $this->client->findElement(WebDriverBy::id('sylius_checkout_complete_tpay_card_number'))->sendKeys($cardNumber); - $this->client->findElement(WebDriverBy::id('sylius_checkout_complete_tpay_card_cvv'))->sendKeys($cvv); - $this->client->findElement(WebDriverBy::id('sylius_checkout_complete_tpay_card_expiration_date_year'))->sendKeys($year); + $this->client->executeScript( + sprintf('document.querySelector(\'#sylius_checkout_complete_tpay_card_holder_name\').value = "%s"', $holderName), + ); + + $this->client->executeScript( + sprintf('document.querySelector(\'#sylius_checkout_complete_tpay_card_number\').value = "%s"', $cardNumber), + ); + $this->client->executeScript( + sprintf('document.querySelector(\'#sylius_checkout_complete_tpay_card_cvv\').value = "%s"', $cvv), + ); + $this->client->executeScript( + sprintf('document.querySelector(\'#sylius_checkout_complete_tpay_card_expiration_date_year\').value = "%s"', $year), + ); +// $this->client->findElement(WebDriverBy::id('sylius_checkout_complete_tpay_card_holder_name'))->sendKeys($holderName); +// $this->client->findElement(WebDriverBy::id('sylius_checkout_complete_tpay_card_number'))->sendKeys($cardNumber); +// $this->client->findElement(WebDriverBy::id('sylius_checkout_complete_tpay_card_cvv'))->sendKeys($cvv); +// $this->client->findElement(WebDriverBy::id('sylius_checkout_complete_tpay_card_expiration_date_year'))->sendKeys($year); } public function fillBlikToken(string $blikToken): void