Skip to content

Next GUI E2E Tests

Next GUI E2E Tests #12

Workflow file for this run

name: Automated tests for pos-cli GUI
on:
pull_request:
branches: [ master ]
push:
branches: [ master ]
jobs:
tests:
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v1.38.0-jammy
env:
MPKIT_EMAIL: ${{ secrets.MPKIT_EMAIL }}
MPKIT_TOKEN: ${{ secrets.MPKIT_TOKEN }}
MPKIT_URL: ${{ secrets.MPKIT_URL }}
CI: true
steps:
- name: Checkout test instance code
uses: actions/checkout@v4
with:
repository: Platform-OS/pos-cli-gui-qa
path: instance
- name: Checkout pos-cli code
uses: actions/checkout@v4
with:
path: pos-cli
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Install pos-cli
run: |
npm install -g @platformos/pos-cli
- name: Seed the test instance with test data
working-directory: ./instance
timeout-minutes: 6
shell: sh
run: |
set -eu
pos-cli deploy
pos-cli data clean --auto-confirm
pos-cli data import --path=seed/data.zip --zip
- name: Build GUI
working-directory: ./pos-cli/gui/next
shell: sh
run: |
set -eu
npm install
npm run build
- name: Run express server, vite preview server and tests
working-directory: ./pos-cli/gui/next
shell: sh
run: |
set -eu
pos-cli gui serve &
npm run preview &
sleep 5 && npx playwright test
- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 4