diff --git a/.github/workflows/ui-tests.js.yml b/.github/workflows/ui-tests.js.yml
index 13e9511b4..94d5a05d5 100644
--- a/.github/workflows/ui-tests.js.yml
+++ b/.github/workflows/ui-tests.js.yml
@@ -7,34 +7,67 @@ on:
branches: [ "main" ]
paths:
- frontend/**
+ - tracker/**
pull_request:
branches: [ "dev", "main" ]
paths:
- frontend/**
+ - tracker/**
env:
API: ${{ secrets.E2E_API_ORIGIN }}
ASSETS: ${{ secrets.E2E_ASSETS_ORIGIN }}
APIEDP: ${{ secrets.E2E_EDP_ORIGIN }}
CY_ACC: ${{ secrets.CYPRESS_ACCOUNT }}
CY_PASS: ${{ secrets.CYPRESS_PASSWORD }}
+ FOSS_PROJECT_KEY: ${{ secrets.FOSS_PROJECT_KEY }}
+ FOSS_INGEST: ${{ secrets.FOSS_INGEST }}
jobs:
- build:
- runs-on: ubuntu-22.04
- name: Visual Testing
- defaults:
- run:
- working-directory: ./frontend
+ build-and-test:
+ runs-on: macos-latest
+ name: Build and test Tracker plus Replayer
strategy:
matrix:
- node-version: [16.x]
- # See supported Node.js release schedule at https://nodejs.org/en/about/releases/
-
+ node-version: [ 16.x ]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
+ - name: Cache tracker modules
+ uses: actions/cache@v1
+ with:
+ path: tracker/tracker/node_modules
+ key: ${{ runner.OS }}-test_tracker_build-${{ hashFiles('**/yarn.lock') }}
+ restore-keys: |
+ test_tracker_build{{ runner.OS }}-build-
+ test_tracker_build{{ runner.OS }}-
+ - name: Setup Testing packages
+ run: |
+ cd tracker/tracker
+ npm i -g yarn
+ yarn
+# - name: Jest tests
+# run: yarn test
+ - name: Build tracker inst
+ run: |
+ cd tracker/tracker
+ yarn build
+ - name: Setup Testing UI Env
+ run: |
+ cd tracker/tracker-testing-playground
+ echo "REACT_APP_KEY=$FOSS_PROJECT_KEY" >> .env
+ echo "REACT_APP_INGEST=$FOSS_INGEST" >> .env
+ - name: Setup Testing packages
+ run: |
+ cd tracker/tracker-testing-playground
+ yarn
+ - name: Wait for Testing Frontend
+ run: |
+ cd tracker/tracker-testing-playground
+ yarn start &> ui.log &
+ npx wait-on http://localhost:3000
+ cd ../../frontend
- name: Cache node modules
uses: actions/cache@v1
with:
@@ -45,6 +78,7 @@ jobs:
${{ runner.OS }}-
- name: Setup env
run: |
+ cd frontend
echo "NODE_ENV=development" >> .env
echo "SOURCEMAP=true" >> .env
echo "ORIGIN=$API" >> .env
@@ -66,21 +100,29 @@ jobs:
- name: Setup packages
run: |
- npm i -g yarn
+ cd frontend
yarn
- name: Run unit tests
- run: yarn test
+ run: |
+ cd frontend
+ yarn test
- name: Run Frontend
- run: yarn start &> server.log &
+ run: |
+ cd frontend
+ yarn start &> frontend.log &
- name: Wait for frontend
- run: npx wait-on http://0.0.0.0:3333
+ run: |
+ cd frontend
+ npx wait-on http://0.0.0.0:3333
- name: (Chrome) Run visual tests
- run: yarn cy:test
+ run: |
+ cd frontend
+ yarn cy:test
# firefox have different viewport somehow
# - name: (Firefox) Run visual tests
# run: yarn cy:test-firefox
- - name: (Edge) Run visual tests
- run: yarn cy:test-edge
+# - name: (Edge) Run visual tests
+# run: yarn cy:test-edge
- name: Upload Debug
if: ${{ failure() }}
uses: actions/upload-artifact@v3
diff --git a/frontend/app/components/Login/Login.js b/frontend/app/components/Login/Login.js
index ae43b0308..9a0bdcde8 100644
--- a/frontend/app/components/Login/Login.js
+++ b/frontend/app/components/Login/Login.js
@@ -103,6 +103,7 @@ class Login extends React.Component {
) : null}
{/*
*/}
-