@shopbite-de/storefront 1.2.8 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.dockerignore +3 -1
- package/.github/workflows/build.yaml +30 -1
- package/.github/workflows/ci.yaml +37 -51
- package/api-types/storeApiSchema.json +279 -81
- package/api-types/storeApiTypes.d.ts +155 -113
- package/app/app.vue +1 -1
- package/app/components/Checkout/DeliveryTimeSelect.vue +1 -1
- package/app/components/Checkout/Summary.vue +1 -1
- package/app/components/Header.vue +1 -1
- package/app/components/Product/Card.vue +2 -1
- package/app/composables/useDeliveryTime.ts +1 -1
- package/app/composables/{usePizzaToppings.ts → useShopBiteConfig.ts} +5 -5
- package/app/layouts/listing.vue +1 -1
- package/compose.yml +0 -3
- package/container +0 -0
- package/node.dockerfile +7 -2
- package/package.json +31 -23
- package/playwright.config.ts +77 -0
- package/test/e2e/simple-checkout-as-recurring-customer.test.ts +149 -0
- package/test/nuxt/useAddToCart.test.ts +162 -0
- package/test/nuxt/useDeliveryTime.test.ts +61 -0
- package/test/nuxt/useInterval.test.ts +59 -0
- package/test/nuxt/useProductConfigurator.test.ts +87 -0
- package/{app/composables → test/nuxt}/useProductEvents.test.ts +1 -1
- package/test/nuxt/useProductVariants.test.ts +89 -0
- package/test/nuxt/useProductVariantsZwei.test.ts +48 -0
- package/test/nuxt/useScrollAnimation.test.ts +96 -0
- package/test/nuxt/useShopBiteConfig.test.ts +61 -0
- package/test/nuxt/useTopSellers.test.ts +50 -0
- package/test/nuxt/useWishlistActions.test.ts +124 -0
- package/vitest.config.ts +23 -0
package/.dockerignore
CHANGED
|
@@ -12,7 +12,7 @@ jobs:
|
|
|
12
12
|
|
|
13
13
|
steps:
|
|
14
14
|
- name: Checkout repository
|
|
15
|
-
uses: actions/checkout@
|
|
15
|
+
uses: actions/checkout@v6
|
|
16
16
|
|
|
17
17
|
- name: Log in to the Container registry
|
|
18
18
|
uses: docker/login-action@v3
|
|
@@ -46,3 +46,32 @@ jobs:
|
|
|
46
46
|
push: true
|
|
47
47
|
tags: ${{ steps.meta-app.outputs.tags }}
|
|
48
48
|
labels: ${{ steps.meta-app.outputs.labels }}
|
|
49
|
+
|
|
50
|
+
release-npm:
|
|
51
|
+
runs-on: ubuntu-latest
|
|
52
|
+
needs: build-and-push
|
|
53
|
+
permissions:
|
|
54
|
+
contents: read
|
|
55
|
+
id-token: write
|
|
56
|
+
steps:
|
|
57
|
+
- name: Checkout repository
|
|
58
|
+
uses: actions/checkout@v6
|
|
59
|
+
|
|
60
|
+
- name: Install Node.js
|
|
61
|
+
uses: actions/setup-node@v6
|
|
62
|
+
with:
|
|
63
|
+
node-version: '24'
|
|
64
|
+
registry-url: 'https://registry.npmjs.org'
|
|
65
|
+
|
|
66
|
+
- name: Install pnpm
|
|
67
|
+
uses: pnpm/action-setup@v4
|
|
68
|
+
with:
|
|
69
|
+
version: 10.26.2
|
|
70
|
+
|
|
71
|
+
- name: Install dependencies
|
|
72
|
+
run: pnpm install --frozen-lockfile
|
|
73
|
+
|
|
74
|
+
- name: Publish to npm
|
|
75
|
+
run: pnpm publish --no-git-checks --access public
|
|
76
|
+
env:
|
|
77
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
@@ -5,55 +5,26 @@ on:
|
|
|
5
5
|
pull_request:
|
|
6
6
|
types: [opened, synchronize]
|
|
7
7
|
jobs:
|
|
8
|
-
|
|
9
|
-
name:
|
|
10
|
-
|
|
8
|
+
test:
|
|
9
|
+
name: Run unit and e2e tests
|
|
10
|
+
environment: test
|
|
11
11
|
env:
|
|
12
|
+
NUXT_PUBLIC_APP_ENV: 'test'
|
|
13
|
+
NUXT_PUBLIC_STORE_URL: 'http://localhost:3005'
|
|
14
|
+
NUXT_PUBLIC_SHOPWARE_DEV_STORE_FRONT_URL: 'http://localhost:3005'
|
|
15
|
+
PORT: '3005'
|
|
12
16
|
NUXT_PUBLIC_SHOPWARE_ENDPOINT: ${{ secrets.NUXT_PUBLIC_SHOPWARE_ENDPOINT }}
|
|
13
17
|
NUXT_PUBLIC_SHOPWARE_ACCESS_TOKEN: ${{ secrets.NUXT_PUBLIC_SHOPWARE_ACCESS_TOKEN }}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
- name: Install Node.js
|
|
20
|
-
uses: actions/setup-node@v6
|
|
21
|
-
with:
|
|
22
|
-
node-version: '24'
|
|
23
|
-
|
|
24
|
-
- name: Install pnpm
|
|
25
|
-
uses: pnpm/action-setup@v4
|
|
26
|
-
|
|
27
|
-
- name: Get pnpm store directory
|
|
28
|
-
id: pnpm-cache
|
|
29
|
-
shell: bash
|
|
30
|
-
run: |
|
|
31
|
-
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
|
|
32
|
-
|
|
33
|
-
- name: Setup pnpm cache
|
|
34
|
-
uses: actions/cache@v4
|
|
35
|
-
with:
|
|
36
|
-
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
|
|
37
|
-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
38
|
-
restore-keys: |
|
|
39
|
-
${{ runner.os }}-pnpm-store-
|
|
40
|
-
|
|
41
|
-
- name: Install dependencies
|
|
42
|
-
run: pnpm install --frozen-lockfile
|
|
43
|
-
|
|
44
|
-
- name: Build
|
|
45
|
-
env:
|
|
46
|
-
NODE_OPTIONS: "--max_old_space_size=4096"
|
|
47
|
-
run: pnpm run build
|
|
48
|
-
test:
|
|
49
|
-
name: Run Unit tests
|
|
18
|
+
NUXT_PUBLIC_SITE_COUNTRY_ID: ${{ secrets.NUXT_PUBLIC_SITE_COUNTRY_ID }}
|
|
19
|
+
GEOPIFY: ${{ secrets.GEOPIFY }}
|
|
20
|
+
TEST_USER: ${{ secrets.TEST_USER }}
|
|
21
|
+
TEST_USER_PASS: ${{ secrets.TEST_USER_PASS }}
|
|
50
22
|
if: github.event.pull_request.draft == false
|
|
51
|
-
needs: init
|
|
52
23
|
timeout-minutes: 15
|
|
53
24
|
runs-on: ubuntu-latest
|
|
54
25
|
steps:
|
|
55
26
|
- name: Check out code
|
|
56
|
-
uses: actions/checkout@
|
|
27
|
+
uses: actions/checkout@v6
|
|
57
28
|
|
|
58
29
|
- name: Fetch main
|
|
59
30
|
run: git fetch origin main
|
|
@@ -66,7 +37,7 @@ jobs:
|
|
|
66
37
|
- name: Enable corepack and pnpm
|
|
67
38
|
run: |
|
|
68
39
|
corepack enable
|
|
69
|
-
corepack prepare pnpm@10.
|
|
40
|
+
corepack prepare pnpm@10.26.2 --activate
|
|
70
41
|
|
|
71
42
|
- name: Install build dependencies
|
|
72
43
|
run: |
|
|
@@ -74,7 +45,7 @@ jobs:
|
|
|
74
45
|
sudo apt-get install -y build-essential python3
|
|
75
46
|
|
|
76
47
|
- name: Cache pnpm dependencies
|
|
77
|
-
uses: actions/cache@
|
|
48
|
+
uses: actions/cache@v5
|
|
78
49
|
with:
|
|
79
50
|
path: |
|
|
80
51
|
/home/runner/.local/share/pnpm/store/v3
|
|
@@ -85,18 +56,33 @@ jobs:
|
|
|
85
56
|
|
|
86
57
|
- name: Install dependencies
|
|
87
58
|
run: pnpm install --frozen-lockfile --prefer-offline
|
|
88
|
-
working-directory: ${{ inputs.workdir }}
|
|
89
59
|
|
|
90
60
|
- name: Rebuild native modules
|
|
91
61
|
run: pnpm rebuild better-sqlite3
|
|
92
|
-
working-directory: ${{ inputs.workdir }}
|
|
93
62
|
|
|
94
|
-
- name:
|
|
63
|
+
- name: Build
|
|
95
64
|
env:
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
65
|
+
NODE_OPTIONS: "--max_old_space_size=4096"
|
|
66
|
+
run: pnpm run build
|
|
67
|
+
|
|
68
|
+
- name: Install Playwright Browsers
|
|
69
|
+
run: pnpm exec playwright install --with-deps chromium
|
|
70
|
+
|
|
71
|
+
- name: Unit tests
|
|
72
|
+
run: pnpm test:unit
|
|
73
|
+
|
|
74
|
+
- name: E2E tests
|
|
75
|
+
env:
|
|
76
|
+
TEST_USER: ${{ secrets.TEST_USER }}
|
|
77
|
+
TEST_USER_PASS: ${{ secrets.TEST_USER_PASS }}
|
|
78
|
+
|
|
79
|
+
run: pnpm test:e2e
|
|
80
|
+
|
|
81
|
+
- uses: actions/upload-artifact@v6
|
|
82
|
+
if: ${{ !cancelled() }}
|
|
83
|
+
with:
|
|
84
|
+
name: playwright-report
|
|
85
|
+
path: playwright-report/
|
|
86
|
+
retention-days: 30
|
|
99
87
|
|
|
100
|
-
run: pnpm test
|
|
101
|
-
working-directory: ${{ inputs.workdir }}
|
|
102
88
|
|