Skip to content

Commit

Permalink
Merge pull request #1870 from UCSF-IGHS/master
Browse files Browse the repository at this point in the history
Master -> working
  • Loading branch information
alaboso authored Jun 14, 2024
2 parents 16faa63 + 555becb commit f583e23
Show file tree
Hide file tree
Showing 153 changed files with 3,887 additions and 1,079 deletions.
6 changes: 6 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# This is an environment file for configuring dynamic values.
E2E_BASE_URL=https://ohri-dev.globalhealthapp.net/openmrs
E2E_USER_ADMIN_USERNAME=admin
E2E_USER_ADMIN_PASSWORD=Admin123
E2E_LOGIN_DEFAULT_LOCATION_UUID=44c3efb0-2583-4c80-a79e-1f756a03c0a1
# The above location UUID is for the "Outpatient Clinic" location in the reference application
63 changes: 63 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: E2E Tests

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
main:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3

- name: Copy test environment variables
run: |
cp example.env .env
sed -i 's/8080/8180/g' .env
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 18

- name: Cache dependencies
id: cache
uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}

- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: yarn install --immutable

- name: Install Playwright Browsers
run: npx playwright install chromium --with-deps

- name: Run dev server
run: yarn start --sources 'packages/esm-*-app/' --port 8180 & # Refer to O3-1994

- name: Run E2E tests
run: yarn playwright test

- name: Upload Report
uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30

github-action:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3

- name: Run Playwright tests with GitHub Action
run: yarn playwright test
168 changes: 0 additions & 168 deletions .github/workflows/node.dev.js.yml

This file was deleted.

7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,10 @@ build/**

# vscode
.vscode

# Playwright and e2e tests
/test-results/
/playwright-report/
/playwright/.cache/
e2e/storageState.json
.env
Loading

0 comments on commit f583e23

Please sign in to comment.