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

Adds test that checks that Core and Container WC clientAPI are the same #4057

Merged
merged 21 commits into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
9ddab02
Adds integration test for client API
walmazacn Dec 9, 2024
c6e3af4
Adds Prettier fixes
walmazacn Dec 9, 2024
2c73e8b
Merge branch 'main' into 3663-test-core-and-container-client-api
walmazacn Dec 9, 2024
4d066e2
Fixes test config
walmazacn Dec 9, 2024
dcf306a
Merge branch '3663-test-core-and-container-client-api' of https://git…
walmazacn Dec 9, 2024
9fbc434
Fixes test config
walmazacn Dec 9, 2024
aa435c6
Fixes test config
walmazacn Dec 10, 2024
b6d81fc
Fixes test config
walmazacn Dec 10, 2024
cfd679f
Merge branch 'main' into 3663-test-core-and-container-client-api
walmazacn Dec 11, 2024
bf8dda3
Merge branch 'main' into 3663-test-core-and-container-client-api
JohannesDoberer Dec 16, 2024
9cd9564
Fixes code review issue
walmazacn Dec 16, 2024
e8b3e18
Fixes Prettier issues
walmazacn Dec 16, 2024
bbf5fc8
Enables current route test for core WC
walmazacn Dec 16, 2024
c82a8a8
Merge branch 'main' into 3663-test-core-and-container-client-api
walmazacn Dec 16, 2024
c1fc17e
Merge branch 'main' into 3663-test-core-and-container-client-api
walmazacn Dec 17, 2024
2688fd0
Merge branch 'main' into 3663-test-core-and-container-client-api
walmazacn Dec 18, 2024
d6b6a2d
Fixes spec logic
walmazacn Dec 18, 2024
f40a84f
Adds latest deps
walmazacn Dec 19, 2024
00e589d
Merge branch 'main' into 3663-test-core-and-container-client-api
walmazacn Dec 19, 2024
f963562
Removes redundant command
walmazacn Dec 19, 2024
e605af8
Merge branch 'main' into 3663-test-core-and-container-client-api
walmazacn Dec 20, 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
25 changes: 12 additions & 13 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ env:
CYPRESS_DASHBOARD_RECORD_KEY: ${{ secrets.CYPRESS_DASHBOARD }}

jobs:
prepare:
prepare:
uses: ./.github/workflows/prepare.yml
secrets: inherit
with:
Expand Down Expand Up @@ -42,14 +42,14 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20.14.0'
node-version: '20.14.0'
- uses: actions/cache@v4
with:
path: |
~/tmp_build
~/cypress-binary-cache
key: buildcache-${{ github.ref }}
- run: cp -r ~/tmp_build/* .
- run: cp -r ~/tmp_build/* .
- run: npm i -g cypress
- run: npm i -g live-server
- run: bash ./test/mockengine.sh || exit 1
Expand All @@ -62,17 +62,16 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20.14.0'
node-version: '20.14.0'
- uses: actions/cache@v4
with:
path: |
~/tmp_build
~/cypress-binary-cache
key: buildcache-${{ github.ref }}
- run: cp -r ~/tmp_build/* .
- run: cp -r ~/tmp_build/* .
- run: npm test --prefix container || exit 1



container_e2e_tests:
name: Container E2E Tests
runs-on: ubuntu-latest
Expand All @@ -84,22 +83,21 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20.14.0'
node-version: '20.14.0'
- uses: actions/cache@v4
with:
path: |
~/tmp_build
~/cypress-binary-cache
key: buildcache-${{ github.ref }}
- run: cp -r ~/tmp_build/* .
- run: cp -r ~/tmp_build/* .
- run: bash ./container/run-container-e2e.sh || exit 1


e2e:
name: Integration Tests
needs: prepare
runs-on: ubuntu-latest

env:
USE_CYPRESS_DASHBOARD: true # enable when trying to debug
steps:
Expand All @@ -115,9 +113,10 @@ jobs:
- run: cp -r ~/tmp_build/* .
- run: sudo apt-get install libgconf-2-4 libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb
- run: npm install --prefix test/e2e-test-application @babel/plugin-proposal-class-properties
- run: ls test
- run: ls test
- run: bash ./test/e2e-js.sh || exit 1
- run: bash ./test/e2e-angular.sh || exit 1
- run: bash ./test/e2e-client-api.sh || exit 1

docu_check:
name: Check Documentation
Expand All @@ -126,6 +125,6 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20.14.0'
node-version: '20.14.0'
- run: cd ./scripts && npm ci
- run: bash ./scripts/docuCheck.sh
1 change: 1 addition & 0 deletions bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const folders = [
'test/e2e-test-application',
'test/e2e-test-application/externalMf',
'test/e2e-js-test-application',
'test/e2e-client-api-test-app',
'client-frameworks-support/testing-utilities/test'
];
// Check for verbose flag
Expand Down
6 changes: 5 additions & 1 deletion scripts/testCompatibility.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,25 +53,29 @@ cd $BASE_DIR/../
source $BASE_DIR/shared/bashHelpers.sh

declare -a APP_FOLDERS=(
"/test/e2e-client-api-test-app"
"/test/e2e-test-application"
"/test/e2e-js-test-application"
"/test/e2e-test-application/externalMf"
)

# Used for setting up webserver and killing them
declare -a APP_PORTS=(
3000 # e2e-client-api-test-app
4200 # e2e-test-application
4500 # e2e-js-test-application
8090 # externalMf
)

declare -a APP_PUBLIC_FOLDERS=(
"public" # e2e-client-api-test-app
"dist" # e2e-test-application
"public" # e2e-js-test-application
"externalMf" # externalMf
)

declare -a APP_PATH_CHECK=(
"/index.html" # e2e-client-api-test-app
"/luigi-core/luigi.js" # e2e-test-application
"/index.html" # e2e-js-test-application
"/customUserSettingsMf.html" # externalMf
Expand Down Expand Up @@ -145,7 +149,7 @@ verifyInstallation() {

echoe "Installing all packages and symlink cross dependencies"
cd "$LUIGI_DIR"
npm run bootstrap
npm run bootstrap

echoe "Bundling packages"
npm run bundle
Expand Down
10 changes: 10 additions & 0 deletions symbolic-links.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@
"destination": "client-frameworks-support/client-support-angular",
"scope": "@luigi-project/testing-utilities"
},
{
"source": "client/public",
"destination": "test/e2e-client-api-test-app",
"scope": "@luigi-project/client"
},
{
"source": "core/public",
"destination": "test/e2e-client-api-test-app",
"scope": "@luigi-project/core"
},
{
"source": "client/public",
"destination": "test/e2e-js-test-application",
Expand Down
6 changes: 6 additions & 0 deletions test/e2e-client-api-test-app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/cypress/screenshots
/public/assets/*
21 changes: 21 additions & 0 deletions test/e2e-client-api-test-app/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Luigi JS application for checking if Core and Container WC clientAPI are the same

## Overview

This is the JS-based sample application which runs with the Luigi framework

## Development

To run this application, follow these steps:

1. First, install all dependencies to serve your application locally by running the following:
```bash
npm install
```

2. Then start the application with the command below:
```bash
npm start
```

3. Open it in your browser by going to [http://localhost:3000](http://localhost:3000)
12 changes: 12 additions & 0 deletions test/e2e-client-api-test-app/cypress.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
const { defineConfig } = require('cypress');

module.exports = defineConfig({
projectId: 'czq7qc',
includeShadowDom: true,
e2e: {
viewportWidth: 1250,
viewportHeight: 790,
chromeWebSecurity: false,
supportFile: false
}
});
Loading
Loading