Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/fature/docker-build-on-release' …
Browse files Browse the repository at this point in the history
…into fature/docker-build-on-release
  • Loading branch information
brankologeecom committed Dec 24, 2024
2 parents 1056e6d + 65a8cb6 commit a2df336
Show file tree
Hide file tree
Showing 9 changed files with 48 additions and 16 deletions.
24 changes: 23 additions & 1 deletion .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
timeout-minutes: 20
strategy:
fail-fast: false
if: ${{ github.actor != 'renovate[bot]' || github.actor != 'lgtm-com[bot]' }}
if: ${{ github.actor != 'renovate[bot]' && github.actor != 'lgtm-com[bot]' }}
# Prevent bots from initiating E2E pipeline
steps:
- name: Clone Code
Expand Down Expand Up @@ -66,3 +66,25 @@ jobs:
with:
name: html-report
path: test-report

- name: Copy Adyen api logs from container if available
if: always()
run: |
# Create a local directory for logs
mkdir -p logs
# Check if the log file exists in the container
if docker exec shopware6 test -f /var/www/html/var/log/adyen/api.log; then
echo "Log file exists. Copying..."
docker cp shopware6:/var/www/html/var/log/adyen/api.log logs
else
echo "Log file does not exist. Skipping copy."
fi
shell: bash

- name: Upload Adyen api Logs
if: always()
uses: actions/upload-artifact@v3
with:
name: adyen-api-logs
path: logs/*
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ export default class KlarnaPaymentPage {

if (await this.paymentTypeSelectButton.isVisible()) {
await this.paymentTypeSelectButton.click();
await this.paymentTypeSelectButton.click();
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ export class ShippingDetailsPage extends SPRBasePage {
this.editSalutationDropDown = this.editAddressEditorWrapper.locator("#billing-addresspersonalSalutation");
this.editFirstNameField = this.editAddressEditorWrapper.locator("#billing-addresspersonalFirstName");
this.editLastNameField = this.editAddressEditorWrapper.locator("#billing-addresspersonalLastName");
this.editAddressField = this.editAddressEditorWrapper.locator("#billing-addressAddressStreet");
this.editPostCodeField = this.editAddressEditorWrapper.locator("#billing-addressAddressZipcode");
this.editCityField = this.editAddressEditorWrapper.locator("#billing-addressAddressCity");
this.editCountrySelectDropdown = this.editAddressEditorWrapper.locator("#billing-addressAddressCountry");
this.editStateSelectDropDown = this.editAddressEditorWrapper.locator("#billing-addressAddressCountryState");
this.editAddressField = this.editAddressEditorWrapper.locator("#billing-edit-addressAddressStreet");
this.editPostCodeField = this.editAddressEditorWrapper.locator("#billing-edit-addressAddressZipcode");
this.editCityField = this.editAddressEditorWrapper.locator("#billing-edit-addressAddressCity");
this.editCountrySelectDropdown = this.editAddressEditorWrapper.locator("#billing-edit-addressAddressCountry");
this.editStateSelectDropDown = this.editAddressEditorWrapper.locator("#billing-edit-addressAddressCountryState");

this.editSaveAddressButton = this.editAddressEditorWrapper.locator("button[type='submit']");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ test.describe.parallel("Payment via ClearPay", () => {
await doPrePaymentChecks(page);
});

// Requires specific locations (VPN)
test.skip("should succeed", async ({ page }) => {

await payViaClearPay(page);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { PayPalPaymentPage } from "../../common/redirect/PayPalPaymentPage.js";
const paymentResources = new PaymentResources();
const users = paymentResources.guestUser;

test.describe.skip("Payment via PayPal", () => {
test.describe("Payment via PayPal", () => {
test.beforeEach(async ({ page }) => {
await goToShippingWithFullCart(page);
await proceedToPaymentAs(page, users.regular);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ test.describe("Payment via SEPA Direct debit", () => {
});

// Depends on ECP-8525
test.fixme("should succeed", async ({ page }) => {
test("should succeed", async ({ page }) => {
const paymentDetailPage = new PaymentDetailsPage(page);
const sepaPaymentSection = await paymentDetailPage.selectSepaDirectDebit();

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/templates/docker-compose.playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ services:
volumes:
- ../scripts/e2e.sh:/e2e.sh
- ../e2e/adyen-integration-tools-tests/:/tmp/adyen-integration-tools-tests/
- ../../../test-report:/tmp/test-report
- ../../test-report:/tmp/test-report

networks:
localnetwork:
Expand Down
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@
.DS_Store

#composer
vendor/
vendor/

#github actions
.github/test-report
.github/workflows/e2e/adyen-integration-tools-tests/projects/shopware/test-results
16 changes: 11 additions & 5 deletions src/Handlers/AbstractPaymentMethodHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -292,13 +292,16 @@ public function pay(
*/
$stateData = $requestStateData ?? $storedStateData ?? [];

$billieData = [];
$companyName = $dataBag->get('companyName');
$registrationNumber = $dataBag->get('registrationNumber');

$billieData = [
'companyName' => $companyName,
'registrationNumber' => $registrationNumber,
];
if ($companyName && $registrationNumber) {
$billieData = [
'companyName' => $companyName,
'registrationNumber' => $registrationNumber,
];
}

/*
* If there are more than one stateData and /payments calls have been completed,
Expand Down Expand Up @@ -773,7 +776,10 @@ private function getPaymentRequest(
$billieData = []
) {
$transactionId = $transaction->getOrderTransaction()->getId();
$stateData['billieData'] = $billieData;
if ($billieData !== []) {
$stateData['billieData'] = $billieData;
}

try {
$request = $this->preparePaymentsRequest(
$salesChannelContext,
Expand Down

0 comments on commit a2df336

Please sign in to comment.