Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run e2e GUI tests in CI #242

Merged
merged 1 commit into from
Mar 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
52 changes: 51 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,59 @@ jobs:
# name: zowe-cics-client
# path: dist/*

e2e-test:
runs-on: ubuntu-latest

services:
wiremock:
image: wiremock/wiremock
ports:
- 8080:8080
volumes:
- ${{ github.workspace }}/packages/vsce/__tests__/__e2e__/resources/wiremock:/home/wiremock
options: --name wiremock

steps:
- name: Change workspace folder so wiremock service can write
run: sudo chown -R $USER:$USER $GITHUB_WORKSPACE

- name: Checkout
uses: actions/checkout@v4

- name: Restart Wiremock with new mappings
run: docker restart wiremock

- name: Use Node.js 22.x
uses: actions/setup-node@v4
with:
node-version: 22.x

- name: Install Dependencies
run: npm ci

- name: Build Source
id: build
run: npm run build

- name: List Wiremock mappings
if: ${{ always() && steps.build.outcome == 'success' }}
run: curl localhost:8080/__admin/mappings

- name: Test Wiremock route
if: ${{ always() && steps.build.outcome == 'success' }}
run: curl localhost:8080/CICSSystemManagement/CICSResultCache/E06EB1264D925C60

- name: E2E Tests
if: ${{ always() && steps.build.outcome == 'success' }}
uses: coactions/setup-xvfb@v1
with:
run: npm run test:e2e

release:
if: github.event_name == 'push' && github.ref_protected
needs: test
needs:
- test
- e2e-test
runs-on: ubuntu-latest
permissions:
contents: write
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<response xmlns="http://www.ibm.com/xmlns/prod/CICS/smw2int"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.ibm.com/xmlns/prod/CICS/smw2int https://my.host:12345/CICSSystemManagement/schema/CICSSystemManagement.xsd"
version="3.0" connect_version="0620">
<resultsummary api_response1="1024" api_response2="0" api_response1_alt="OK" api_response2_alt=""
recordcount="2" displayed_recordcount="2" />
<records>
<cicscicsplex _keydata="C3C9C3E2C5E7F6F2C9E8C3E6C5D7C3D4" accesstype="LOCAL" botrsupd="1"
cmasname="MYCMAS" mpstatus="YES" plexname="MYPLEX" readrs="200" rspoolid="DFHRSTAT"
status="ACTIVE" sysid="EPCM" toprsupd="5" transitcmas="" transitcnt="0" updaters="15" />
<cicscicsplex _keydata="C4E4D4D4E8F9F0F7C9E8C3E6C5D7C3D4" accesstype="LOCAL" botrsupd="1"
cmasname="MYCMAS" mpstatus="YES" plexname="DUMMY" readrs="200" rspoolid="DFHRSTAT"
status="ACTIVE" sysid="EPCM" toprsupd="5" transitcmas="" transitcnt="0" updaters="15" />
</records>
</response>
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"request": {
"method": "GET",
"url": "/CICSSystemManagement/CICSResultCache/E06EB1264D925C60"
},
"response": {
"status": 200,
"bodyFileName": "ok-cache-plex.xml",
"headers": {
"Content-Type": "text/xml"
}
}
}
Loading