Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: paypal card test #475

Merged
merged 60 commits into from
Jun 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
6d2e08b
feat: paypal card test
doproiescu-plenty May 24, 2024
edafac2
feat: update paypal test
doproiescu-plenty May 27, 2024
23694cd
Update paypal-card-test.yaml
doproiescu-plenty May 27, 2024
814fbbb
fix: paypal test path
doproiescu-plenty May 28, 2024
cbe0658
fix: paypal test path
doproiescu-plenty May 29, 2024
9ef8632
fix: paypal card test path
doproiescu-plenty May 29, 2024
848870f
chore: modify spec path
abocsan-plenty May 29, 2024
af9b21f
chore: modify spec path
abocsan-plenty May 29, 2024
2ff714e
chore: modify spec path
abocsan-plenty May 29, 2024
2775e9a
Merge branch 'main' into feat/paypal-test
doproiescu-plenty Jun 3, 2024
39d802b
fix: spec path
ksted Jun 3, 2024
fa877bb
fix: remove command parameter
ksted Jun 3, 2024
1982deb
fix: add project parameter
ksted Jun 3, 2024
582307d
fix: add start parameter
ksted Jun 3, 2024
812b33b
fix: spec path
ksted Jun 3, 2024
da9f985
Rename paypalCreditCard.cy.ts to paypalCreditCard.spec.cy.ts
ksted Jun 3, 2024
d545402
fix: spec path
ksted Jun 3, 2024
50c9738
fix: add wait-on parameter
ksted Jun 3, 2024
700fdf4
Merge branch 'main' into feat/paypal-test
doproiescu-plenty Jun 4, 2024
73a5339
Merge branch 'main' into feat/paypal-test
doproiescu-plenty Jun 5, 2024
33d0ece
Merge branch 'main' of github.com:plentymarkets/storefront-nuxt3-boil…
abocsan-plenty Jun 6, 2024
107f649
Update cypress.config.ts
doproiescu-plenty Jun 6, 2024
3bbc8a7
Merge branch 'main' into feat/paypal-test
doproiescu-plenty Jun 6, 2024
780cf17
Merge branch 'main' into feat/paypal-test
doproiescu-plenty Jun 10, 2024
8377d3e
Merge branch 'feat/paypal-test' of github.com:plentymarkets/storefron…
abocsan-plenty Jun 10, 2024
a9fd5ce
Merge branch 'main' of github.com:plentymarkets/storefront-nuxt3-boil…
abocsan-plenty Jun 10, 2024
a53cb10
chore: modify spec location
abocsan-plenty Jun 10, 2024
bdcc564
chore: modify spec location
abocsan-plenty Jun 10, 2024
f8296cb
chore: modify spec location
abocsan-plenty Jun 10, 2024
50bd372
chore: modify spec location
abocsan-plenty Jun 10, 2024
47bb6af
chore: modify spec location
abocsan-plenty Jun 10, 2024
5861a78
chore: modify spec location
abocsan-plenty Jun 10, 2024
654d3ae
chore: modify spec location
abocsan-plenty Jun 10, 2024
d007737
chore: modify spec regex
abocsan-plenty Jun 10, 2024
9d454fa
chore: changelog
abocsan-plenty Jun 10, 2024
8043308
chore: changelog
abocsan-plenty Jun 10, 2024
2c9f435
chore: tests actions start
abocsan-plenty Jun 11, 2024
61000f5
Merge branch 'main' into feat/paypal-test
abocsan-plenty Jun 11, 2024
e7dcee1
chore: tests actions start
abocsan-plenty Jun 11, 2024
5202ebc
Merge remote-tracking branch 'origin/feat/paypal-test' into feat/payp…
abocsan-plenty Jun 11, 2024
13fb4ab
chore: tests actions start
abocsan-plenty Jun 11, 2024
bc3bb87
Merge branch 'main' of github.com:plentymarkets/storefront-nuxt3-boil…
abocsan-plenty Jun 11, 2024
b064fe4
chore: tests actions start
abocsan-plenty Jun 11, 2024
72ba328
chore: revert action
abocsan-plenty Jun 11, 2024
65f4ff7
chore: e2e action
abocsan-plenty Jun 11, 2024
1590349
chore: e2e action
abocsan-plenty Jun 11, 2024
d098ca3
chore: e2e action
abocsan-plenty Jun 11, 2024
fbca055
chore: e2e action
abocsan-plenty Jun 11, 2024
0226759
chore: e2e action
abocsan-plenty Jun 11, 2024
698c644
chore: test paypal credit card action
abocsan-plenty Jun 11, 2024
17dc2e3
Merge branch 'main' into feat/paypal-test
abocsan-plenty Jun 11, 2024
d9ed346
chore: test paypal credit card action
abocsan-plenty Jun 11, 2024
2e3cc7c
Merge remote-tracking branch 'origin/feat/paypal-test' into feat/payp…
abocsan-plenty Jun 11, 2024
3253de0
chore: test paypal credit card action
abocsan-plenty Jun 11, 2024
e615a50
chore: added unit tests to paypal card action
abocsan-plenty Jun 11, 2024
231613d
chore: set environment file separately from unit tests
abocsan-plenty Jun 11, 2024
9e667e6
chore: renaming of action
abocsan-plenty Jun 12, 2024
979eb0e
Merge branch 'main' into feat/paypal-test
abocsan-plenty Jun 12, 2024
96924f6
Merge branch 'main' into feat/paypal-test
abocsan-plenty Jun 12, 2024
8fce837
Merge branch 'main' into feat/paypal-test
abocsan-plenty Jun 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 72 additions & 0 deletions .github/workflows/quarantine-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Quarantine Tests

on:
push:
branches:
- main

permissions:
contents: read
packages: read

jobs:
quarantine tests:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Enable corepack
run: corepack enable

- name: Setup node
uses: actions/setup-node@v3
with:
node-version: '20.5'
cache: 'yarn'
registry-url: "https://npm.pkg.github.com"

- name: Set yarn version
run: |
yarn set version stable
yarn set version 3.6.4

- name: Setup .yarnrc.yml
run: |
yarn config set nodeLinker node-modules
yarn config set npmScopes.plentymarkets.npmRegistryServer "https://npm.pkg.github.com"
yarn config set npmScopes.plentymarkets.npmAlwaysAuth true
yarn config set npmScopes.plentymarkets.npmAuthToken $NODE_AUTH_TOKEN
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Install Dependencies
run: yarn --immutable

- name: Set environment
run: |
touch apps/web/.env
cat <<EOT >> apps/web/.env
API_SECURITY_TOKEN=${{ secrets.API_SECURITY_TOKEN }}
API_ENDPOINT=https://mevofvd5omld.c01-14.plentymarkets.com
CLOUDFLARE_TURNSTILE_SITE_KEY="0x4AAAAAAANx3aXDh7UR35x0" >> apps/web/.env
${{ vars.CONFIG }}
EOT

- name: E2E tests
uses: cypress-io/github-action@v5
with:
build: yarn build
install: false
command: yarn test:cypress-quarantine
env:
PAYPAL_EMAIL: ${{ secrets.PAYPAL_EMAIL }}
PAYPAL_PASSWORD: ${{ secrets.PAYPAL_PASSWORD }}

- uses: actions/upload-artifact@v3
if: failure()
with:
name: cypress-screenshots
path: apps/web/__tests__/report/screenshots
if-no-files-found: ignore
7 changes: 5 additions & 2 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
- name: Install Dependencies
run: yarn --immutable

- name: Unit tests
- name: Set environment
run: |
touch apps/web/.env
cat <<EOT >> apps/web/.env
Expand All @@ -52,6 +52,9 @@ jobs:
CLOUDFLARE_TURNSTILE_SITE_KEY="0x4AAAAAAANx3aXDh7UR35x0" >> apps/web/.env
${{ vars.CONFIG }}
EOT

- name: Unit tests
run: |
pushd ${{ github.workspace }}/apps/server/
yarn start &
pushd ${{ github.workspace }}/apps/web/
Expand All @@ -62,8 +65,8 @@ jobs:
uses: cypress-io/github-action@v5
with:
build: yarn build
command: yarn test:cypress
install: false
command: yarn test:cypress
env:
PAYPAL_EMAIL: ${{ secrets.PAYPAL_EMAIL }}
PAYPAL_PASSWORD: ${{ secrets.PAYPAL_PASSWORD }}
Expand Down
39 changes: 39 additions & 0 deletions apps/web/__tests__/test/quarantine/paypalCreditCard.spec.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import { CartPageObject } from '../../support/pageObjects/CartPageObject';
import { CheckoutPageObject } from '../../support/pageObjects/CheckoutPageObject';
import { HomePageObject } from '../../support/pageObjects/HomePageObject';
import { ProductListPageObject } from '../../support/pageObjects/ProductListPageObject';
import { paths } from '../../../utils/paths';

const checkout = new CheckoutPageObject();
const cart = new CartPageObject();
const homePage = new HomePageObject();
const productListPage = new ProductListPageObject();

describe('Smoke: PayPal credit card order', () => {
beforeEach(() => {
cy.setCookie('vsf-locale', 'en');
cy.setCookie('consent-cookie', '{"Essentials":{"Session":true,"Consent":true,"Session2":true},"External Media":{"Session":false,"Consent":false,"Session2":false},"Functional":{"Session":false,"Consent":false,"Session2":false},"Marketing":{"Session":false,"Consent":false,"Session2":false}}')
});

it('[smoke] Check if status on order gets updated when paying with paypal credit card', () => {
cy.visitAndHydrate(paths.home);

homePage.goToCategory();
productListPage.addToCart();

cart.openCart();
checkout
.goToGuestCheckout()
.goToCheckout()
.fillContactInformationForm()
.addBillingAddress()
.fillBillingAddressForm()
.acceptTerms()
.checkCreditCard()
.placeOrderButton()
.fillCreditCardForm()
.payCreditCard()
.displaySuccessPage()
.displayFullyPaid();
});
});
2 changes: 1 addition & 1 deletion apps/web/__tests__/test/smoke/categoryPage.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ describe('Smoke: Category Page', () => {
});

it('[smoke] Category filters should trigger a product data reload', () => {
// We should configure the system so that the first category is set up with filters.
// We should configure the system so that the first category is set up with filters.
// This way we are independet from the language and the url.
cy.visitAndHydrate('/living-room');

Expand Down
2 changes: 1 addition & 1 deletion apps/web/__tests__/test/unit/i18n.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const haveEqualStructure = (lang1: object, lang2: object) => {
const hasAllKeys = (obj1: object, obj2: object) => {
const obj1WorkingCopy = structuredClone(obj1)
const obj2WorkingCopy = structuredClone(obj2)

const obj1Skeleton = setValuesToEmptyString(obj1WorkingCopy);
const obj2Skeleton = setValuesToEmptyString(obj2WorkingCopy);

Expand Down
3 changes: 2 additions & 1 deletion apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
"test": "vitest run",
"test:coverage": "vitest run --coverage",
"test:watch": "vitest",
"test:cypress": "cypress run --browser chrome --headless",
"test:cypress-quarantine": "cypress run --browser chrome --headless --spec '__tests__/test/quarantine/*.cy.{js,jsx,ts,tsx}'",
"test:cypress": "cypress run --browser chrome --headless --spec '__tests__/test/feature/*.cy.{js,jsx,ts,tsx},__tests__/test/smoke/*.cy.{js,jsx,ts,tsx}'",
"test:cypress-dev": "cypress open --e2e"
},
"dependencies": {
Expand Down
4 changes: 4 additions & 0 deletions docs/changelog/changelog_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
- Registration without cloudflare turnstile configuration is now possible.
- Fixed item image size in recommended product slider.

### Changed

- Moved paypal credit card test into quarantine folder.

## v1.4.1 (2024-06-05) <a href="https://github.com/plentymarkets/plentyshop-pwa/compare/v1.4.0...v1.4.1" target="_blank" rel="noopener"><b>Overview of all changes</b></a>

### New
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"test": "yarn turbo:disable-telemetry && turbo run test",
"test:watch": "yarn turbo:disable-telemetry && turbo run test:watch",
"test:coverage": "yarn turbo:disable-telemetry && npx turbo run test:coverage",
"test:cypress-quarantine": "concurrently -k -s=first \"yarn wait-on http-get://localhost:3000 && yarn turbo:disable-telemetry && turbo run test:cypress-quarantine\" \"yarn start\"",
"test:cypress": "concurrently -k -s=first \"yarn wait-on http-get://localhost:3000 && yarn turbo:disable-telemetry && turbo run test:cypress\" \"yarn start\"",
"test:cypress-dev": "concurrently -k -s=first \"yarn wait-on http-get://localhost:3000 && yarn turbo:disable-telemetry && turbo run test:cypress-dev\" \"yarn dev\"",
"lhci:mobile": "lhci autorun"
Expand Down
3 changes: 3 additions & 0 deletions turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@
"test:watch": {
"cache": false
},
"test:cypress-quarantine": {
"cache": false
},
"test:cypress": {
"cache": false
},
Expand Down
Loading