-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge dev to main for site-ui-4-July-24-Start-Direct Release
- Loading branch information
Showing
219 changed files
with
127,469 additions
and
1,959 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
NEXT_PUBLIC_CCDA_VALIDATOR_CURES_USCDIV3_SENDER_URL=https://api.github.com/repos/onc-healthit/2015-edition-cures-update-uscdi-v3-testdata/contents/Cures Update Svap Uscdiv3 Sender SUT Test Data | ||
NEXT_PUBLIC_CCDA_VALIDATOR_CURES_USCDIV3_RECEIVER_URL=https://api.github.com/repos/onc-healthit/2015-edition-cures-update-uscdi-v3-testdata/contents/Cures Update Svap Uscdiv3 Receiver SUT Test Data | ||
NEXT_PUBLIC_CCDA_VALIDATOR_CURES_USCDIV3_DOWNLOAD_URL=https://codeload.github.com/onc-healthit/2015-edition-cures-update-uscdi-v3-testdata/zip/master | ||
NEXT_PUBLIC_CCDA_VALIDATOR_CURES_V1_SENDER_URL=https://api.github.com/repos/onc-healthit/2015-edition-cures-update-data/contents/Cures Update Sender SUT Test Data | ||
NEXT_PUBLIC_CCDA_VALIDATOR_CURES_V1_RECEIVER_URL=https://api.github.com/repos/onc-healthit/2015-edition-cures-update-data/contents/Cures Update Receiver SUT Test Data | ||
NEXT_PUBLIC_CCDA_VALIDATOR_CURES_DOWNLOAD_URL=https://codeload.github.com/onc-healthit/2015-edition-cures-update-data/zip/master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
--- | ||
name: Create Build | ||
on: | ||
push: | ||
branches: | ||
- dev | ||
- main | ||
pull_request: | ||
types: [opened, reopened, synchronize] | ||
branches: | ||
- dev | ||
- main | ||
|
||
jobs: | ||
code-quality-check: | ||
name: Test and Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '20.x' | ||
- name: Install Dependencies | ||
run: npm ci --force | ||
- name: Lint | ||
run: npm run lint | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
needs: code-quality-check | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '20.x' | ||
- name: Install Dependencies | ||
run: npm ci --force | ||
- name: Run Build | ||
run: npm run build | ||
- name: Create Build Artifact | ||
run: | | ||
mkdir ./build | ||
cp ./.next -pR ./build/.next | ||
cp ./next.config.js ./build/next.config.js | ||
cp ./package.json ./build/package.json | ||
cp ./package-lock.json ./build/package-lock.json | ||
- name: Upload build folder | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: BuildArtifact | ||
path: ./build | ||
retention-days: 7 | ||
deploy: | ||
name: Deploy to Dev | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'push' && github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/main' | ||
needs: build | ||
steps: | ||
- name: Configure SSH | ||
run: | | ||
mkdir -p ~/.ssh/ | ||
echo "$SSH_KEY" > ~/.ssh/development.key | ||
chmod 600 ~/.ssh/development.key | ||
cat >>~/.ssh/config <<END | ||
Host development | ||
HostName $SSH_HOST | ||
User $SSH_USERNAME | ||
Port $SSH_PORT | ||
IdentityFile ~/.ssh/development.key | ||
StrictHostKeyChecking no | ||
END | ||
env: | ||
SSH_PORT: ${{secrets.SSH_PORT}} | ||
SSH_HOST: ${{secrets.SSH_HOST}} | ||
SSH_USERNAME: ${{secrets.SSH_USERNAME}} | ||
SSH_KEY: ${{secrets.SSH_KEY}} | ||
- name: Download Build Artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: BuildArtifact | ||
path: ./ | ||
- name: Copy Artifact to Environment | ||
run: | | ||
zip -r -o BuildArtifact.zip ./ | ||
scp BuildArtifact.zip development: | ||
ssh development 'ls -la' | ||
- name: Stop application | ||
run: | | ||
ssh development /bin/bash<< EOF | ||
sudo bash | ||
export PATH=$PATH:/root/.nvm/versions/node/v20.12.1/bin | ||
pm2 stop site-ui-4 | ||
EOF | ||
- name: Update site-ui-4 files | ||
run: | | ||
ssh development /bin/bash<< EOF | ||
sudo bash | ||
ls -la | ||
unzip -o BuildArtifact.zip -d /opt/site-ui-4 | ||
EOF | ||
- name: Restart application | ||
run: | | ||
ssh development /bin/bash<< EOF | ||
sudo bash | ||
export PATH=$PATH:/root/.nvm/versions/node/v20.12.1/bin | ||
pm2 startOrRestart /opt/site-ui-4/ecosystem.config.js --env production && pm2 save | ||
EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { defineConfig } from "cypress"; | ||
|
||
export default defineConfig({ | ||
e2e: { | ||
setupNodeEvents(on, config) { | ||
// implement node event listeners here | ||
}, | ||
}, | ||
|
||
component: { | ||
devServer: { | ||
framework: "next", | ||
bundler: "webpack", | ||
}, | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { defineConfig } from 'cypress' | ||
|
||
export default defineConfig({ | ||
env: { | ||
auth_username: 'ADD_USERNAME', | ||
auth_password: 'ADD_PASSWORD', | ||
okta_domain: 'ADD_OKTA_URL', | ||
}, | ||
e2e: { | ||
setupNodeEvents(on, config) { | ||
// implement node event listeners here | ||
}, | ||
testIsolation: false, | ||
baseUrl: 'http://localhost:3000', | ||
viewportWidth: 1280, | ||
viewportHeight: 720, | ||
}, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
import 'cypress-file-upload' | ||
|
||
describe('C-CDA USCDI V1 Validator form', () => { | ||
beforeEach(() => { | ||
cy.visit('/c-cda') | ||
cy.get(`*[title="C-CDA Validator: USCDI v1"]`).click() | ||
cy.get(`*[value="Sender"]`).click() | ||
}) | ||
|
||
it(`should pass validation for file that meets USCDI v1 standards`, () => { | ||
cy.get('#uscdi-v3-full-criteria-select') | ||
.click() | ||
.then(() => { | ||
cy.get(`*[data-value='170.315_b1_ToC_Amb']`).click() | ||
}) | ||
.then(() => { | ||
cy.get('#uscdi-v3-full-scenario-select').click() | ||
}) | ||
.then(() => { | ||
cy.get(`*[data-value='170.315_b1_toc_amb_sample2_v2.pdf']`).click() | ||
}) | ||
cy.get('input[name=ccdaFile]').selectFile('./cypress/e2e/testdata/CCDAValidatorV1/170.315_b1_toc_amb_sample2.xml', { | ||
action: 'drag-drop', | ||
force: true, | ||
}) | ||
cy.get('#validate').click() | ||
cy.get('#validating-dialog-title').should('be.visible') | ||
cy.contains('Results', { timeout: 50000 }).should('exist') | ||
cy.get('#result').should('contain.text', 'Pass') | ||
}) | ||
|
||
it(`should fail validation for file that contain errors or do not comply with USCDI v1 standards`, () => { | ||
cy.get('#uscdi-v3-full-criteria-select') | ||
.click() | ||
.then(() => { | ||
cy.get(`*[data-value='170.315_b1_ToC_Amb']`).click() | ||
}) | ||
.then(() => { | ||
cy.get('#uscdi-v3-full-scenario-select').click() | ||
}) | ||
.then(() => { | ||
cy.get(`*[data-value='170.315_b1_toc_amb_sample1_v2.pdf']`).click() | ||
}) | ||
cy.get('input[name=ccdaFile]').selectFile( | ||
'./cypress/e2e/testdata/CCDAValidatorV1/170.315_b1_toc_amb_sample1_v1.xml', | ||
{ | ||
action: 'drag-drop', | ||
force: true, | ||
} | ||
) | ||
cy.get('#validate').click() | ||
cy.get('#validating-dialog-title').should('be.visible') | ||
cy.contains('Results', { timeout: 150000 }).should('exist') | ||
cy.get('#result').should('contain.text', 'Fail') | ||
}) | ||
}) | ||
|
||
describe('USCDI V1 Validator- Validate with CCDA implementation guide', () => { | ||
beforeEach(() => { | ||
cy.visit('/c-cda') | ||
cy.get(`*[title="C-CDA Validator: USCDI v1"]`).click() | ||
cy.contains(`VALIDATE WITH THE C-CDA IMPLEMENTATION GUIDE ONLY`).click() | ||
}) | ||
|
||
it(`should pass validation for file that meets USCDI v1 standards`, () => { | ||
cy.get('input[name=ccdaFile]').selectFile('./cypress/e2e/testdata/CCDAValidatorV1/170.315_b1_toc_amb_sample2.xml', { | ||
action: 'drag-drop', | ||
force: true, | ||
}) | ||
cy.get('#validate').click() | ||
cy.get('#validating-dialog-title').should('be.visible') | ||
cy.contains('Results', { timeout: 50000 }).should('exist') | ||
cy.get('#result').should('contain.text', 'Pass') | ||
}) | ||
}) |
Oops, something went wrong.