Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubtobiasz committed Sep 16, 2024
1 parent 8ad8fd1 commit 236e90f
Show file tree
Hide file tree
Showing 7 changed files with 53 additions and 4 deletions.
21 changes: 17 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,19 @@ on:
description: "Type of the build"
required: true
type: string
secrets:
TPAY_CLIENT_ID:
description: ''
required: true
TPAY_CLIENT_SECRET:
description: ''
required: true
TPAY_CARDS_API:
description: ''
required: true
PAYUM_CYPHER_KEY:
description: ''
required: true

jobs:
get-matrix:
Expand Down Expand Up @@ -46,10 +59,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:
-
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci__daily.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ jobs:
uses: ./.github/workflows/ci.yaml
with:
type: "daily"
secrets: inherit
1 change: 1 addition & 0 deletions .github/workflows/ci__pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ jobs:
uses: ./.github/workflows/ci.yaml
with:
type: "pr"
secrets: inherit
27 changes: 27 additions & 0 deletions assets/shop/js/card_encoder.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,31 @@
import * as JSEncrypt from './jsencrypt.min';
import * as Sentry from "@sentry/browser";

Sentry.init({
dsn: "https://b4aeb8f84d49fdbae7d336d446bf46b6@o4507962673725440.ingest.de.sentry.io/4507962677395536",

// Alternatively, use `process.env.npm_package_version` for a dynamic release version
// if your build tool supports it.
release: "[email protected]",
integrations: [
Sentry.browserTracingIntegration(),
Sentry.replayIntegration(),
Sentry.captureConsoleIntegration(),
],

// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for tracing.
// We recommend adjusting this value in production
tracesSampleRate: 1.0,

// Set `tracePropagationTargets` to control for which URLs trace propagation should be enabled
tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/],

// Capture Replay for 10% of all sessions,
// plus for 100% of sessions with an error
replaysSessionSampleRate: 0.1,
replaysOnErrorSampleRate: 1.0,
});

document.addEventListener('DOMContentLoaded', () => {
const form = document.querySelector('[name="sylius_checkout_complete"]');
Expand Down
2 changes: 2 additions & 0 deletions tests/Application/.env.test
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ SYLIUS_MESSENGER_TRANSPORT_MAIN_FAILED_DSN=sync://
SYLIUS_MESSENGER_TRANSPORT_CATALOG_PROMOTION_REMOVAL_DSN=sync://
SYLIUS_MESSENGER_TRANSPORT_CATALOG_PROMOTION_REMOVAL_FAILED_DSN=sync://
###< symfony/messenger ###

TPAY_CARDS_API=LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0NCk1JR2ZNQTBHQ1NxR1NJYjNEUUVCQVFVQUE0R05BRENCaVFLQmdRQ3ZQc2lCOWZuR0FMd1ZKSnpaM2tOdEw1MVcNCjRGcm1zOXcyWS9vRTY0VmRNM1NFaC83d1orRWZCWlltYUdtcEJkelpOTzZXMDhxd0NkT0Jwa3YxR2k5UnlKQTANCkRsMk5oSURlbnRSSWd2VXR5UllJdVZza3BrcDh3M1pmYTh2akJWdlJYZTRHUERjeEMvVXc4S29heU5oVlhKZnENCnlJZHhEYTRMRHdjRWtJWlE1UUlEQVFBQg0KLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0t
3 changes: 3 additions & 0 deletions tests/Application/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,8 @@
},
"devDependencies": {
"@sylius-ui/frontend": "^1.0"
},
"dependencies": {
"@sentry/browser": "^8.30.0"
}
}
2 changes: 2 additions & 0 deletions tests/E2E/Checkout/TpayPaymentCheckoutTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ public function test_it_completes_the_checkout(): void
public function test_it_completes_the_checkout_using_credit_card(): void
{
$this->processWithPaymentMethod('tpay_card');
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');
file_put_contents(dirname(__DIR__, 3) . '/tests/Application/var/log/two.html', $this->client->getPageSource());
$this->placeOrder();

$this->assertPageTitleContains('Thank you!');
Expand Down

0 comments on commit 236e90f

Please sign in to comment.