Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
222fa66
Initial UI tests jc wk (#11)
JC-wk Dec 19, 2025
4c48dc7
bump ui version
Dec 19, 2025
894d744
update changelog
Dec 19, 2025
7be1886
create ui tests workflow
Dec 19, 2025
eb5925b
Copy config.source.json to config.json
Dec 19, 2025
71b0fe5
update retention
Dec 19, 2025
61e3e2e
Merge branch 'main' into ui-tests
JC-wk Dec 19, 2025
228c02f
update version
Dec 19, 2025
f6456b3
Merge branch 'ui-tests' of https://github.com/JC-wk/AzureTRE into ui-…
Dec 19, 2025
340611e
update yarn.lock
Dec 19, 2025
f999927
remove frozen lockfile
Dec 19, 2025
aff37d5
fix yarn install
Dec 19, 2025
01a949c
publish test results
Dec 19, 2025
a398404
add UI tests to PR Bot reports
Dec 19, 2025
b71d922
add ui tests to pr bot
Dec 19, 2025
a27c2f6
fix lint errors and migrate eslint to @nabla/vite-plugin-eslint
Dec 19, 2025
80c3d71
revert eslint, combine tests
Dec 19, 2025
5406266
update ui test
Dec 19, 2025
f7981aa
support download of multiple artifacts
Dec 19, 2025
b75f990
publish results after test has finished
Dec 19, 2025
302f824
rename
Dec 19, 2025
9506884
rename
Dec 19, 2025
c5e5032
wait for all tests before publishing results
Dec 19, 2025
98ab6dc
add ---
Dec 19, 2025
4b49973
test results update
Dec 19, 2025
d007ff6
fix repo path
Dec 19, 2025
4ab7061
rename artifact
Dec 19, 2025
0fd76d6
remove retention
Dec 19, 2025
12484ab
rename coverage report and publish result
Dec 19, 2025
d0743e8
revert test_results.yaml
Dec 19, 2025
cc94f90
update ui_tests
Dec 19, 2025
29ce372
fix test report
Dec 19, 2025
7e01ed6
update coverage report
Dec 19, 2025
69820b1
move test reports to results file
Dec 19, 2025
a1bf1f7
fix file path
Dec 19, 2025
05e312e
update costsTag and associated tests
Dec 19, 2025
044ea0f
Merge branch 'main' into ui-tests
JC-wk Jan 5, 2026
9ea81dc
Disable scheduled cron job in clean_validation_envs.yml
JC-wk Jan 5, 2026
d7f7a41
Merge branch 'microsoft:main' into main
JC-wk Jan 5, 2026
1b1aa38
Enable scheduled cleaning of validation environments
JC-wk Jan 5, 2026
b739cb7
Merge branch 'microsoft:main' into main
JC-wk Jan 6, 2026
1d5431c
Merge branch 'main' into ui-tests
JC-wk Jan 8, 2026
3ee7115
Merge branch 'main' into ui-tests
JC-wk Jan 9, 2026
3770544
Supply Workspace client secret without having to pass it in the API
marrobi Jan 13, 2026
8d3c02e
remove unused imports
Jan 14, 2026
6d03530
Merge branch 'main' into ui-tests
JC-wk Jan 14, 2026
8507e6e
update testing-library packages
Jan 14, 2026
3434019
update docs to use yarn
Jan 14, 2026
6de5f1c
Merge branch 'microsoft:main' into main
JC-wk Jan 15, 2026
c6c480e
delete package lock
Jan 15, 2026
cbdae6d
update version and changelog
Jan 15, 2026
fc1e2e1
add package-lock.json to .gitignore to prevent future commits
Jan 15, 2026
ae906a3
copilot instructions
Jan 16, 2026
daee76b
Merge branch 'main' into delete-package-lock
JC-wk Jan 19, 2026
45f3f87
Merge branch 'main' into delete-package-lock
marrobi Jan 20, 2026
8d680b4
Merge branch 'main' into ui-tests
JC-wk Jan 20, 2026
038c561
fix linting issues
Jan 20, 2026
b6a8a9f
update tests
Jan 20, 2026
206e06c
switch from unsupported vite-plugin-eslint to vite-plugin-checker
Jan 20, 2026
e9f28ac
update eslint
Jan 20, 2026
c2aaf0d
Merge remote-tracking branch 'origin/delete-package-lock' into ui-tests
Jan 20, 2026
710fb3c
Add ESLint config file paths for validation
JC-wk Jan 20, 2026
a16fc27
Merge remote-tracking branch 'TREfork/main' into ui-tests
Jan 20, 2026
fa81f85
update makefile and pipeline for correct linting of TSX files
Jan 21, 2026
85a39ab
Merge branch 'main' into ui-tests
JC-wk Jan 21, 2026
c1258c9
add ui-testing to docs menu
Jan 21, 2026
43b5b02
Merge branch 'microsoft:main' into main
JC-wk Jan 22, 2026
3ce86ed
update node min version
Jan 22, 2026
8ea402b
Merge remote-tracking branch 'TREfork/main' into ui-tests
Jan 22, 2026
76ad942
update ui version
Jan 22, 2026
0b1582e
add test:ui command
Jan 22, 2026
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
4 changes: 3 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,9 @@
"mikestead.dotenv",
"humao.rest-client",
"timonwong.shellcheck",
"ms-azuretools.vscode-azurefunctions"
"ms-azuretools.vscode-azurefunctions",
"vitest.explorer",
"dbaeumer.vscode-eslint"
]
}
},
Expand Down
7 changes: 7 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ Azure TRE uses the following key technologies:
├── api_app - API source code and docs
├── resource_processor - VMSS Porter Runner
├── scripts - Utility scripts
├── ui - React-based web UI with TypeScript
└── templates - Resource templates
├── core/terraform - Terraform definitions of Azure TRE core resources
├── shared_services - Terraform definitions of shared services
Expand Down Expand Up @@ -81,6 +82,12 @@ Azure TRE uses the following key technologies:

- **TypeScript/JavaScript**:
- Follow standard ESLint configuration
- Use Vitest for testing React components
- Use React Testing Library for component testing
- Mock FluentUI components in tests due to JSDOM limitations
- Maintain 80% code coverage across branches, functions, lines, and statements
- Focus on testing user interactions and component behavior
- Use semantic queries (getByRole, getByLabelText) over test IDs when possible
- Use Yarn for package management

- **YAML**:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/build_validation_develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ jobs:
VALIDATE_DOCKERFILE_HADOLINT: true
VALIDATE_TSX: true
VALIDATE_TYPESCRIPT_ES: true
TYPESCRIPT_ES_CONFIG_FILE: ../../ui/app/eslint.config.js
TSX_CONFIG_FILE: ../../ui/app/eslint.config.js

- name: Docs validation
if: ${{ steps.filter.outputs.docs == 'true' }}
Expand Down
92 changes: 92 additions & 0 deletions .github/workflows/ui_test_results.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
---
# This workflow is required to publish test results from forks
name: UI Test Results

on: # yamllint disable-line rule:truthy
workflow_run:
workflows: ["UI Tests"]
types:
- completed
# actionlint doesn't like the following line depite it being recommanded:
# https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs#overview
# permissions: {}

jobs:
ui-test-results:
name: UI Test Results
runs-on: ubuntu-latest
if: github.event.workflow_run.conclusion != 'skipped'

permissions:
checks: write

# needed unless run with comment_mode: off
pull-requests: write

# required by download step to access artifacts API
actions: read

steps:
- name: Download and Extract Artifacts
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
run: |
mkdir -p artifacts && cd artifacts

artifacts_url=${{ github.event.workflow_run.artifacts_url }}

gh api "$artifacts_url" -q '.artifacts[] | [.name, .archive_download_url] | @tsv' | while read -r artifact
do
IFS=$'\t' read -r name url <<< "$artifact"
gh api "$url" > "$name.zip"
unzip -d "$name" "$name.zip"
done

- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
with:
commit: ${{ github.event.workflow_run.head_sha }}
event_file: artifacts/UI Tests Event File/event.json
event_name: ${{ github.event.workflow_run.event }}
files: "artifacts/**/*.xml"
check_name: "UI Test Results"

# # The following step is the catch situations where the tests didn't run at all.
# - name: Check failure files
# run: |
# if compgen -G "artifacts/**/pytest*failed" > /dev/null; then
# echo "Tests failure file(s) exist. Some tests have failed or didn't run at all! \
# Check the artifacts for details."
# exit 1
# fi

# For PR builds triggered from comment builds, the GITHUB_REF is set to main
# so the checks aren't automatically associated with the PR
# If prHeadSha is specified then explicity mark the checks for that SHA
- name: Report check status
if: github.event.workflow_run.head_sha != ''
uses: LouisBrunner/checks-action@v2.0.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
# the name must be identical to the one received by the real job
sha: ${{ github.event.workflow_run.head_sha }}
name: "Test Results"
status: "completed"
conclusion: ${{ github.event.workflow_run.conclusion }}
details_url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"

## Vitest Coverage Report
## Check out the repository to obtain the vitest.config file
- name: Checkout repository
uses: actions/checkout@v5

- name: Download UI Test coverage report
uses: actions/download-artifact@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
run-id: ${{ github.event.workflow_run.id }}

- name: Report coverage comparison
uses: davelosert/vitest-coverage-report-action@v2
with:
working-directory: ui/app/
75 changes: 75 additions & 0 deletions .github/workflows/ui_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
---
name: UI Tests

on: # yamllint disable-line rule:truthy
pull_request:
branches: [main]
paths:
- "ui/app/**"
- ".github/workflows/ui_tests.yml"
push:
branches: [main]
paths:
- "ui/app/**"

# for each ref (branch/pr) run just the most recent,
# cancel other pending/running ones
concurrency:
group: "${{ github.workflow }}-${{ github.head_ref }}"
cancel-in-progress: true

jobs:
vitest:
name: Run vitest
runs-on: ubuntu-latest
permissions:
contents: read
checks: write
pull-requests: write

steps:
- name: Checkout repository
uses: actions/checkout@v5
with:
persist-credentials: false

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "24"

- name: Install dependencies
working-directory: ui/app
run: yarn install

- name: Copy config.source.json to config.json
working-directory: ui/app/src
run: cp config.source.json config.json

- name: Run vitest
working-directory: ui/app
run: yarn test:coverage --run --reporter=junit --outputFile=junit.xml

- name: Upload coverage report
uses: actions/upload-artifact@v4
if: always()
with:
name: ui-test-coverage-report
path: ui/app/coverage
retention-days: 10

- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: ui-test-results
path: ui/app/junit.xml
retention-days: 10

# this step is required to publish test results from forks
- name: Upload Event File
uses: actions/upload-artifact@v4
with:
name: UI Tests Event File
path: ${{ github.event_path }}
retention-days: 10
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ ENHANCEMENTS:
* API: Replace HTTP_422_UNPROCESSABLE_ENTITY response with HTTP_422_UNPROCESSABLE_CONTENT as per RFC 9110 ([#4742](https://github.com/microsoft/AzureTRE/issues/4742))
* Change Group.ReadWrite.All permission to Group.Create for AUTO_WORKSPACE_GROUP_CREATION ([#4772](https://github.com/microsoft/AzureTRE/issues/4772))
* Make workspace shared storage quota updateable ([#4314](https://github.com/microsoft/AzureTRE/issues/4314))
* Implement UI testing with vitest ([#4794](https://github.com/microsoft/AzureTRE/pull/4794))
* Update Porter, AzureCLI, Terraform and its providers across the solution ([#4799](https://github.com/microsoft/AzureTRE/issues/4799))
* Update `api_healthcheck.sh` script with fixed 10-second check intervals and 7-minute timeout for improved API health monitoring ([#4807](https://github.com/microsoft/AzureTRE/issues/4807))
* Update SuperLinter to version 8.3.2 ([#4815](https://github.com/microsoft/AzureTRE/issues/4815))
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ ACR_DOMAIN_SUFFIX?=`az cloud show --query suffixes.acrLoginServerEndpoint --outp
ACR_NAME?=`echo "$${ACR_NAME}" | tr A-Z a-z`
ACR_FQDN?="${ACR_NAME}${ACR_DOMAIN_SUFFIX}"
FULL_IMAGE_NAME_PREFIX:=${ACR_FQDN}/${IMAGE_NAME_PREFIX}
LINTER_REGEX_INCLUDE?=all # regular expression used to specify which files to include in local linting (defaults to "all")
E2E_TESTS_NUMBER_PROCESSES_DEFAULT=4 # can be overridden in e2e_tests/.env

target_title = @echo -e "\n\e[34m»»» 🧩 \e[96m$(1)\e[0m..."
Expand Down Expand Up @@ -255,6 +254,8 @@ lint: ## 🧹 Lint all files
-e VALIDATE_TYPESCRIPT_ES=true \
-e FILTER_REGEX_INCLUDE=${LINTER_REGEX_INCLUDE} \
-e VALIDATE_ALL_CODEBASE=true \
-e TYPESCRIPT_ES_CONFIG_FILE=../../ui/app/eslint.config.js \
-e TSX_CONFIG_FILE=../../ui/app/eslint.config.js \
-v $${LOCAL_WORKSPACE_FOLDER}:/tmp/lint \
ghcr.io/super-linter/super-linter:slim-v8.3.2

Expand Down
Loading
Loading