-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #53 from Adyen/release/2.3.0
Release/2.3.0
- Loading branch information
Showing
37 changed files
with
805 additions
and
97 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
* @amihajlovski @dcardos @shanikantsingh @shubhamvijaivargiya @zenit2001 | ||
* @amihajlovski @dcardos @shanikantsingh @shubhamvijaivargiya @zenit2001 @shubhamk67 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
name: Salesforce b2b e2e test | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- '**' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build-and-deploy: | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
B2B_E2E_AUTH_URL: ${{ secrets.B2B_E2E_AUTH_URL }} | ||
|
||
steps: | ||
- name: Checkout This Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '20' | ||
|
||
- name: Install Salesforce CLI | ||
run: npm install @salesforce/cli --global | ||
|
||
- name: Create authentication file from secret | ||
run: echo ${B2B_E2E_AUTH_URL} > secret.json | ||
|
||
- name: Authenticate to E2E org | ||
run: sf org login sfdx-url -f secret.json --set-default --alias e2eOrg | ||
|
||
- name: Checkout Apex-Library Repository | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: Adyen/adyen-apex-api-library | ||
ref: develop | ||
path: dependency-repo | ||
|
||
- name: Push Apex Lib Source to the Org | ||
run: | | ||
cd dependency-repo | ||
sf project deploy start --target-org e2eOrg | ||
- name: Checkout This Repository Back | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install xmlstarlet | ||
run: sudo apt-get install -y xmlstarlet | ||
|
||
- name: Update customMetadata XML | ||
run: | | ||
chmod +x ./scripts/updateCustomMetadata.sh | ||
./scripts/updateCustomMetadata.sh | ||
env: | ||
MERCHANT_ACCOUNT: ${{ secrets.B2B_E2E_MERCHANT_ACCOUNT }} | ||
CLIENT_KEY: ${{ secrets.B2B_E2E_CLIENT_KEY }} | ||
HMAC_KEY: ${{ secrets.B2B_E2E_HMAC_KEY }} | ||
|
||
- name: Deploy This Repository Code and run unit tests | ||
run: sf project deploy start --target-org e2eOrg --test-level RunLocalTests --ignore-conflicts | ||
|
||
e2e-testing: | ||
runs-on: ubuntu-latest | ||
needs: build-and-deploy | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: lts/* | ||
|
||
- name: Install dependencies | ||
working-directory: ./e2e | ||
run: npm ci | ||
|
||
- name: Install Playwright dependencies | ||
working-directory: ./e2e | ||
run: npx playwright install --with-deps | ||
|
||
- name: Run Playwright tests | ||
working-directory: ./e2e | ||
run: npx playwright test | ||
env: | ||
STORE_BASE_URL: ${{ secrets.STORE_BASE_URL }} | ||
STORE_ID: ${{ secrets.STORE_ID }} | ||
STORE_USERNAME: ${{ secrets.STORE_USERNAME }} | ||
STORE_PASSWORD: ${{ secrets.STORE_PASSWORD }} | ||
|
||
- uses: actions/upload-artifact@v4 | ||
if: always() | ||
with: | ||
name: playwright-report | ||
path: playwright-report/ | ||
retention-days: 30 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
STORE_BASE_URL = "" | ||
STORE_ID = "" | ||
STORE_USERNAME = "" | ||
STORE_PASSWORD = "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
node_modules/ | ||
/test-results/ | ||
/playwright-report/ | ||
/blob-report/ | ||
/playwright/.cache/ | ||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
export const masterCard3DS2 = "5454545454545454"; | ||
export const visa = "4111111111111111"; | ||
export const amex = "371449635398431"; | ||
|
||
export const wrongExpDate = "1130"; | ||
export const expDate = "0330"; | ||
export const cvc = "737"; | ||
export const amexCvc = "7373"; | ||
|
||
export const threeDSCorrectUser = "user"; | ||
export const threeDSCorrectPassword = "password"; | ||
export const threeDSWrongPassword = "wrong answer"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
import { defineConfig, devices } from '@playwright/test'; | ||
import dotenv from "dotenv"; | ||
|
||
/** | ||
* Read environment variables from file. | ||
* https://github.com/motdotla/dotenv | ||
*/ | ||
dotenv.config(); | ||
|
||
/** | ||
* @see https://playwright.dev/docs/test-configuration | ||
*/ | ||
module.exports = defineConfig({ | ||
testDir: "./tests", | ||
/* Run tests in files in parallel */ | ||
fullyParallel: true, | ||
/* Fail the build on CI if you accidentally left test.only in the source code. */ | ||
forbidOnly: !!process.env.CI, | ||
/* Retry on CI only */ | ||
retries: 0, | ||
/* Opt out of parallel tests on CI. */ | ||
workers: 1, | ||
/* Reporter to use. See https://playwright.dev/docs/test-reporters */ | ||
reporter: "list", | ||
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ | ||
use: { | ||
/* Base URL to use in actions like `await page.goto('/')`. */ | ||
baseURL: process.env.STORE_BASE_URL, | ||
|
||
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ | ||
trace: "on", | ||
}, | ||
|
||
/* Configure projects for major browsers */ | ||
projects: [ | ||
{ | ||
name: "chromium", | ||
use: { ...devices["Desktop Chrome"] }, | ||
}, | ||
|
||
/* Test against mobile viewports. */ | ||
// { | ||
// name: 'Mobile Chrome', | ||
// use: { ...devices['Pixel 5'] }, | ||
// }, | ||
// { | ||
// name: 'Mobile Safari', | ||
// use: { ...devices['iPhone 12'] }, | ||
// }, | ||
|
||
/* Test against branded browsers. */ | ||
// { | ||
// name: 'Microsoft Edge', | ||
// use: { ...devices['Desktop Edge'], channel: 'msedge' }, | ||
// }, | ||
// { | ||
// name: 'Google Chrome', | ||
// use: { ...devices['Desktop Chrome'], channel: 'chrome' }, | ||
// }, | ||
], | ||
|
||
/* Run your local dev server before starting the tests */ | ||
// webServer: { | ||
// command: 'npm run start', | ||
// url: 'http://127.0.0.1:3000', | ||
// reuseExistingServer: !process.env.CI, | ||
// }, | ||
}); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"name": "adyen_salesforce_b2b_e2e_tests", | ||
"version": "1.0.0", | ||
"description": "e2e tests for Adyen Salesforce B2B Lightning", | ||
"main": "index.js", | ||
"scripts": {}, | ||
"keywords": [], | ||
"author": "", | ||
"license": "ISC", | ||
"devDependencies": { | ||
"@playwright/test": "^1.44.1" | ||
}, | ||
"dependencies": { | ||
"dotenv": "^16.4.5" | ||
} | ||
} |
Oops, something went wrong.