Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
0df6097
Add dynamic Playwright test runner and enhance env support
ginnyyadav Aug 22, 2025
69b21ac
Update CircleCI workflow to remove test job
ginnyyadav Aug 22, 2025
65080fd
Add Playwright test framework and Xray integration
ginnyyadav Aug 25, 2025
7f30cae
Refactor Xray reporter and update .gitignore
ginnyyadav Aug 25, 2025
71874d0
Update CLAUDE.md with expanded test and config details
ginnyyadav Aug 25, 2025
93a784c
Refactor helpers, fix globals, and update docs
ginnyyadav Aug 25, 2025
a7118e8
let's actually test on ci
ginnyyadav Aug 25, 2025
070a25c
Remove test evidence steps from CircleCI config
ginnyyadav Aug 25, 2025
5cfc4b3
Send Slack notifications only from first parallel node
ginnyyadav Aug 25, 2025
e8bf054
Improve Xray integration and CI pipeline
ginnyyadav Feb 11, 2026
4601dd0
linting
ginnyyadav Feb 11, 2026
f4ee158
CircleCI: set env vars conditionally; change default env
ginnyyadav Feb 11, 2026
31f72ad
Add dynamic Playwright test runner and enhance env support
ginnyyadav Aug 22, 2025
e1ce98e
Update CircleCI workflow to remove test job
ginnyyadav Aug 22, 2025
7dd78e8
Add Playwright test framework and Xray integration
ginnyyadav Aug 25, 2025
0f8cedd
Refactor Xray reporter and update .gitignore
ginnyyadav Aug 25, 2025
82c00cb
Update CLAUDE.md with expanded test and config details
ginnyyadav Aug 25, 2025
a817bc2
Refactor helpers, fix globals, and update docs
ginnyyadav Aug 25, 2025
be5592c
let's actually test on ci
ginnyyadav Aug 25, 2025
65c0778
Remove test evidence steps from CircleCI config
ginnyyadav Aug 25, 2025
8d95fcc
Send Slack notifications only from first parallel node
ginnyyadav Aug 25, 2025
ad14a9e
Improve Xray integration and CI pipeline
ginnyyadav Feb 11, 2026
b6bd30b
CircleCI: set env vars conditionally; change default env
ginnyyadav Feb 11, 2026
15ee97a
Remove generated build and dist artifacts
ginnyyadav Feb 12, 2026
cd6c0f8
Update CircleCI orb versions
ginnyyadav Feb 12, 2026
9325f66
Add TEST_TAGS parsing to Playwright grep
ginnyyadav Feb 12, 2026
6bcdd4c
Cleanup tests: remove duplicate steps & imports
ginnyyadav Feb 12, 2026
3b7076b
debugging CI test tags
ginnyyadav Feb 12, 2026
a6c4887
more debugging for CI test tags
ginnyyadav Feb 12, 2026
8faf31c
More debugging
ginnyyadav Feb 12, 2026
bb6318b
Where are the tests hiding...
ginnyyadav Feb 12, 2026
5d3559d
Clean up Playwright config and CI debug steps
ginnyyadav Feb 13, 2026
7fbd80e
Upgrade Playwright, add tag filtering, use regexes
ginnyyadav Feb 13, 2026
4f1f52e
Add CircleCI test-list debug and config tweaks
ginnyyadav Feb 13, 2026
055daa1
Include shard arg when running Playwright tests
ginnyyadav Feb 13, 2026
d69cb38
Remove Playwright test discovery debug steps
ginnyyadav Feb 13, 2026
f8eb221
Set Playwright headless based on CI env
ginnyyadav Feb 13, 2026
5f2f8ec
Try again to Run Playwright headless in CI
ginnyyadav Feb 13, 2026
ef8f9db
Reduce Playwright CI retries from 2 to 1
ginnyyadav Feb 13, 2026
7aafdeb
Use basename of attachment.path for filename
ginnyyadav Feb 13, 2026
75ea189
Update README to Playwright test guide
ginnyyadav Feb 13, 2026
9a3a300
Linting Fixes: Add retry naming and remove duplicate stepCounter
ginnyyadav Feb 13, 2026
96952d3
Skip execution info when reusing testExecKey
ginnyyadav Feb 13, 2026
172d0ff
Merge branch 'Hook-up-CircleCI-and-JIRA' of https://github.com/tidepo…
Foscottl-TP Feb 17, 2026
e6c6a24
Have automated tests upload to QAE project unless otherwise specified
ginnyyadav Feb 23, 2026
d38ecd5
Remove build folder from tracking - now properly ignored
Foscottl-TP Feb 24, 2026
2907fab
Merge branch 'Hook-up-CircleCI-and-JIRA' of https://github.com/tidepo…
Foscottl-TP Feb 24, 2026
6f9bb44
Add MRN/email inputs and patient edit helpers
Foscottl-TP Feb 24, 2026
fca8041
Use TypeScript xray reporter in Playwright config
Foscottl-TP Mar 2, 2026
f926321
Use source reporter path in Playwright config
Foscottl-TP Mar 2, 2026
aa664e1
Make Playwright headless on CI
Foscottl-TP Mar 2, 2026
2e3c812
Update config.yml
ginnyyadav Mar 2, 2026
ed8f944
Update Docker image
ginnyyadav Mar 2, 2026
4456c8f
Lower retries on CI
ginnyyadav Mar 2, 2026
3c7e1db
Remove debug logs and conditionally set info
ginnyyadav Mar 2, 2026
5b22c44
Refactor field validation to remove early continue
ginnyyadav Mar 2, 2026
7cb900f
Prefer pipeline parameters in CircleCI config
ginnyyadav Mar 2, 2026
5187f7e
Add retry to patient search and multi-workspace PatientFilter test
Foscottl-TP Mar 5, 2026
6f19023
Create TEST_FORMAT_GUIDE.md
Foscottl-TP Mar 9, 2026
d1bcfbc
Update int env URL to external.integration
Foscottl-TP Apr 6, 2026
7502add
Revert email on PUT validation failure in tests
Foscottl-TP Apr 9, 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
289 changes: 152 additions & 137 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,16 @@ orbs:
parameters:
testEnvironment:
type: string
default: 'qa1'
default: 'qa2'
testExecKey:
type: string
default: 'none'
testTags:
type: string
default: ''
xrayProjectKey:
type: string
default: 'SAND'
jobs:
code-quality-check:
working_directory: ~/tidepool-org/webuitests
Expand All @@ -33,15 +39,19 @@ jobs:
test:
working_directory: ~/tidepool-org/webuitests
docker:
- image: mcr.microsoft.com/playwright:v1.54.1-noble
- image: mcr.microsoft.com/playwright:v1.57.0-noble
parallelism: 4
environment:
TEST_EXECUTION_KEY: << pipeline.parameters.testExecKey >>
TARGET_ENV: << pipeline.parameters.testEnvironment >>
steps:
- checkout
- node/install
- run: node --version
# Pipeline parameters always take precedence over project-level env vars
- run:
name: Set environment variables
command: |
echo "export TARGET_ENV=\"<< pipeline.parameters.testEnvironment >>\"" >> $BASH_ENV
echo "export TEST_EXECUTION_KEY=\"<< pipeline.parameters.testExecKey >>\"" >> $BASH_ENV
echo "export TEST_TAGS=\"<< pipeline.parameters.testTags >>\"" >> $BASH_ENV
- restore_cache:
keys:
- dependency-cache-{{ checksum "package.json" }}
Expand All @@ -57,67 +67,109 @@ jobs:
name: Install Playwright Dependencies
command: npx playwright install --with-deps

# Run tests with parallel execution
# Run tests with parallel execution and optional tag filtering
- run:
name: Run Playwright Tests
command: npm run test --shard=$CIRCLE_NODE_INDEX/$CIRCLE_NODE_TOTAL
command: |
SHARD_ARG="--shard=$((CIRCLE_NODE_INDEX + 1))/$CIRCLE_NODE_TOTAL"
if [ -n "$TEST_TAGS" ]; then
TAG=$(echo "$TEST_TAGS" | tr '[:upper:]' '[:lower:]')
[[ "$TAG" != @* ]] && TAG="@${TAG}"
npm test -- $SHARD_ARG --grep "$TAG"
else
npm test -- $SHARD_ARG
fi

# Store test results and artifacts
- store_artifacts:
path: playwright-report
- store_artifacts:
path: test-results
- store_test_results:
path: test-output/test-results.xml
# Commit workflow notifications - basic templates for all branches
- slack/notify:
event: fail
mentions: '<@UG56AQFK2>'
template: basic_fail_1
- slack/notify:
event: pass
branch_pattern: main
template: basic_success_1
- slack/notify:
event: pass
branch_pattern: /^(?!main$).*/
template: basic_success_1
- unless:

# Only send notifications from the first node to avoid duplicates
- when:
condition:
and:
- equal: ['testParallel', << pipeline.parameters.testEnvironment >>]
equal: ["0", "${CIRCLE_NODE_INDEX}"]
steps:
- run:
name: Gather Test Evidence
command: node utilities/browserstackEvidenceDownload.js
when: always
- run:
name: Get API token
command: |
echo export token=$(curl -H "Content-Type: application/json" -X POST --data "{ \"client_id\": \"$CLIENT_ID\",\"client_secret\": \"$CLIENT_SECRET\" }" https://xray.cloud.getxray.app/api/v1/authenticate| tr -d '"') >> $BASH_ENV
source $BASH_ENV
when: always
- run:
name: Send Results to XRAY
command: 'curl -H "Content-Type: text/xml" -H "Authorization: Bearer $token" --data @test-output/test-results.xml "https://xray.cloud.getxray.app/api/v1/import/execution/junit?testExecKey=<< pipeline.parameters.testExecKey >>"'
when: always
- run:
name: Add Test Evidence to JIRA
command: node utilities/sendTestEvidenceToJira.js
when: always
- slack/notify:
event: fail
branch_pattern: main
mentions: '<@UG56AQFK2>'
custom: |
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": ":x: *Tidepool Web UI Tests Failed on Main Branch* \n\n:link: <${CIRCLE_BUILD_URL}|View Build Details>"
}
}
]
}
- slack/notify:
event: pass
branch_pattern: main
custom: |
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": ":white_check_mark: *Tidepool Web UI Tests Passed on Main Branch* \n\n:link: <${CIRCLE_BUILD_URL}|View Build Details>"
}
}
]
}
- slack/notify:
event: fail
branch_pattern: develop
mentions: '<@UG56AQFK2>'
custom: |
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": ":x: *Tidepool Web UI Tests Failed on Develop Branch* \n\n:link: <${CIRCLE_BUILD_URL}|View Build Details>"
}
}
]
}
- slack/notify:
event: pass
branch_pattern: develop
custom: |
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": ":white_check_mark: *Tidepool Web UI Tests Passed on Develop Branch* \n\n:link: <${CIRCLE_BUILD_URL}|View Build Details>"
}
}
]
}

scheduled-test:
working_directory: ~/tidepool-org/webuitests
docker:
- image: mcr.microsoft.com/playwright:v1.54.1-noble
- image: mcr.microsoft.com/playwright:v1.57.0-noble
parallelism: 4
environment:
TEST_EXECUTION_KEY: << pipeline.parameters.testExecKey >>
TARGET_ENV: << pipeline.parameters.testEnvironment >>
steps:
- checkout
- node/install
- run: node --version
# Pipeline parameters always take precedence over project-level env vars
- run:
name: Set environment variables
command: |
echo "export TARGET_ENV=\"<< pipeline.parameters.testEnvironment >>\"" >> $BASH_ENV
echo "export TEST_EXECUTION_KEY=\"<< pipeline.parameters.testExecKey >>\"" >> $BASH_ENV
echo "export TEST_TAGS=\"<< pipeline.parameters.testTags >>\"" >> $BASH_ENV
- restore_cache:
keys:
- dependency-cache-{{ checksum "package.json" }}
Expand All @@ -133,109 +185,72 @@ jobs:
name: Install Playwright Dependencies
command: npx playwright install --with-deps

# Run tests with parallel execution
# Run tests with parallel execution and optional tag filtering
- run:
name: Run Playwright Tests
command: npm run test --shard=$CIRCLE_NODE_INDEX/$CIRCLE_NODE_TOTAL
command: |
SHARD_ARG="--shard=$((CIRCLE_NODE_INDEX + 1))/$CIRCLE_NODE_TOTAL"
if [ -n "$TEST_TAGS" ]; then
TAG=$(echo "$TEST_TAGS" | tr '[:upper:]' '[:lower:]')
[[ "$TAG" != @* ]] && TAG="@${TAG}"
npm test -- $SHARD_ARG --grep "$TAG"
else
npm test -- $SHARD_ARG
fi

# Store test results and artifacts
- store_artifacts:
path: playwright-report
- store_artifacts:
path: test-results
- store_test_results:
path: test-output/test-results.xml

- run:
name: Install xmllint
command: apt-get update && apt-get install -y libxml2-utils
when: always

# Parse test results for detailed Slack notification
- run:
name: Parse Test Results
command: |
TOTAL_TESTS=$(xmllint --xpath "string(/testsuites/@tests)" test-output/test-results.xml)
FAILURES=$(xmllint --xpath "string(/testsuites/@failures)" test-output/test-results.xml)
ERRORS=$(xmllint --xpath "string(/testsuites/@errors)" test-output/test-results.xml)
PASSED_TESTS=$((TOTAL_TESTS - FAILURES - ERRORS))
TIME=$(xmllint --xpath "string(/testsuites/@time)" test-output/test-results.xml)
echo "export TOTAL_TESTS=$TOTAL_TESTS" >> $BASH_ENV
echo "export PASSED_TESTS=$PASSED_TESTS" >> $BASH_ENV
echo "export FAILURES=$FAILURES" >> $BASH_ENV
echo "export ERRORS=$ERRORS" >> $BASH_ENV
echo "export TIME=$TIME" >> $BASH_ENV
when: always

# Detailed Slack notifications for scheduled runs
- slack/notify:
event: fail
mentions: '<@UG56AQFK2>'
custom: |
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*:x: Scheduled Tidepool Web UI Tests Failed* :sad_tapani: \n\n :pencil:*Summary* \n\n *$PASSED_TESTS/$TOTAL_TESTS* tests passed \n *$FAILURES* tests failed \n Total time: *$TIME* seconds"
}
},
{
"type": "divider"
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": ":link: *<${CIRCLE_BUILD_URL}|View CircleCI Build Details>*"
}
}
]
}
- slack/notify:
event: pass
custom: |
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*:white_check_mark: Scheduled Tidepool Web UI Tests Passed!* :catjam: \n\n :pencil:*Summary:* \n *$PASSED_TESTS/$TOTAL_TESTS* tests passed \n Total time: *$TIME* seconds \n\n :link: *<${CIRCLE_BUILD_URL}|View CircleCI Build Details>*"
}
}
]
}

- unless:
# Only send notifications from the first node to avoid duplicates
- when:
condition:
and:
- equal: ['testParallel', << pipeline.parameters.testEnvironment >>]
equal: ["0", "${CIRCLE_NODE_INDEX}"]
steps:
- run:
name: Gather Test Evidence
command: node utilities/browserstackEvidenceDownload.js
when: always
- run:
name: Get API token
command: |
echo export token=$(curl -H "Content-Type: application/json" -X POST --data "{ \"client_id\": \"$CLIENT_ID\",\"client_secret\": \"$CLIENT_SECRET\" }" https://xray.cloud.getxray.app/api/v1/authenticate| tr -d '"') >> $BASH_ENV
source $BASH_ENV
when: always
- run:
name: Send Results to XRAY
command: 'curl -H "Content-Type: text/xml" -H "Authorization: Bearer $token" --data @test-output/test-results.xml "https://xray.cloud.getxray.app/api/v1/import/execution/junit?testExecKey=<< pipeline.parameters.testExecKey >>"'
when: always
- run:
name: Add Test Evidence to JIRA
command: node utilities/sendTestEvidenceToJira.js
when: always
- slack/notify:
event: fail
mentions: '<@UG56AQFK2>'
custom: |
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*:x: Scheduled Tidepool Web UI Tests Failed* :sad_tapani: \n\n :pencil:*Summary* \n\n *$PASSED_TESTS/$TOTAL_TESTS* tests passed \n *$FAILURES* tests failed \n Total time: *$TIME* seconds"
}
},
{
"type": "divider"
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": ":link: *<${CIRCLE_BUILD_URL}|View CircleCI Build Details>*"
}
}
]
}
- slack/notify:
event: pass
custom: |
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*:white_check_mark: Scheduled Tidepool Web UI Tests Passed!* :catjam: \n\n :pencil:*Summary:* \n *$PASSED_TESTS/$TOTAL_TESTS* tests passed \n Total time: *$TIME* seconds \n\n :link: *<${CIRCLE_BUILD_URL}|View CircleCI Build Details>*"
}
}
]
}

workflows:
commit-workflow:
jobs:
- code-quality-check
- test:
requires:
- eslint-check
- test
29 changes: 0 additions & 29 deletions .eslintrc.json

This file was deleted.

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ tests_output
.vscode
vrt/diff
vrt/latest
build/
dist/
# ui
screens
test_evidence
Expand Down
Loading
Loading