Skip to content

Commit

Permalink
Merge branch 'master' into cmdct-3352x
Browse files Browse the repository at this point in the history
  • Loading branch information
britt-mo committed Mar 27, 2024
2 parents e7ef896 + 5e43043 commit a6cb52c
Show file tree
Hide file tree
Showing 73 changed files with 656 additions and 5,821 deletions.
3 changes: 0 additions & 3 deletions .github/setBranchName.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ GITHUB_REFNAME="${1}"
[ -z "${GITHUB_REFNAME}" ] && echo "Error setting branch name. No input given." && exit 1

case ${GITHUB_REFNAME} in
$([[ "$GITHUB_REFNAME" =~ ^dependabot/.* ]] && echo ${GITHUB_REFNAME}))
echo ${GITHUB_REFNAME} | md5sum | head -c 10 | sed 's/^/x/'
;;
$([[ "$GITHUB_REFNAME" =~ ^snyk-* ]] && echo ${GITHUB_REFNAME}))
echo ${GITHUB_REFNAME##*-} | head -c 10 | sed 's/^/s/'
;;
Expand Down
29 changes: 0 additions & 29 deletions .github/workflows/dependabot-auto-approve.yml

This file was deleted.

3 changes: 1 addition & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches:
- "*"
- "dependabot/**"
- "!skipci*"

concurrency:
Expand All @@ -28,7 +27,7 @@ jobs:
SLS_DEPRECATION_DISABLE: "*" # Turn off deprecation warnings in the pipeline
steps:
- uses: actions/checkout@v4
- name: set branch_name # Some integrations (Dependabot & Snyk) build very long branch names. This is a switch to make long branch names shorter.
- name: set branch_name # Some integrations (Snyk) build very long branch names. This is a switch to make long branch names shorter.
run: |
BRANCH_NAME=$(./.github/setBranchName.sh ${{ github.ref_name }})
echo "branch_name=${BRANCH_NAME}" >> $GITHUB_ENV
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/snyk-auto-merge.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# Adapted from https://docs.github.com/en/code-security/dependabot/working-with-dependabot/automating-dependabot-with-github-actions
name: Snyk auto-merge
on:
pull_request:
Expand All @@ -9,7 +8,7 @@ permissions:
contents: write

jobs:
dependabot:
snyk:
runs-on: ubuntu-latest
if: ${{ github.actor == 'mdct-github-service-account' }}
steps:
Expand All @@ -19,7 +18,6 @@ jobs:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Enable auto-merge for Snyk PRs
if: ${{ steps.metadata.outputs.update-type != 'version-update:semver-major'}}
run: gh pr merge --auto --squash "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
Expand Down
2 changes: 1 addition & 1 deletion services/ui-src/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<!-- Tealium Analytics Tag Manager -->
<script>
var tealiumEnvMap = {
"mdctqmr.cms.gov": "production",
"mdctqmr.cms.gov": "prod",
"mdctqmrval.cms.gov": "qa",
};
var tealiumEnv = tealiumEnvMap[window.location.hostname] || "dev";
Expand Down
42 changes: 42 additions & 0 deletions services/ui-src/src/components/Rate/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,24 @@ describe("Test the Rate component", () => {

expect(rateTextBox).toHaveDisplayValue("1");
});

test("rounds auto-calculated rate up or down as expected", async () => {
const numeratorTextBox = await screen.findByLabelText("Numerator");
const denominatorTextBox = await screen.findByLabelText("Denominator");
const rateTextBox = await screen.findByLabelText("Rate");

// 3/9*100 = 3.333... -> 33.3
fireEvent.type(numeratorTextBox, "3");
fireEvent.type(denominatorTextBox, "9");

expect(rateTextBox).toHaveDisplayValue("33.3");

// 6/9*100 = 66.666... -> 66.7
fireEvent.type(numeratorTextBox, "6");
fireEvent.type(denominatorTextBox, "9");

expect(rateTextBox).toHaveDisplayValue("66.7");
});
});

describe("Test non-readonly rate component", () => {
Expand All @@ -109,6 +127,30 @@ describe("Test non-readonly rate component", () => {

expect(rateTextBox).toHaveDisplayValue("43");
});

test("Ensure that warning appears if N=0, D>0, then R should be = 0 for user entered rates.", () => {
renderWithHookForm(<TestComponent2 />, {
defaultValues: {
"test-component": [
{
numerator: "1",
denominator: "1",
rate: "1",
},
],
},
});

// Change the numerator from 1 to 0

const numeratorTextBox = screen.getByLabelText("Numerator");

fireEvent.type(numeratorTextBox, "0");

expect(numeratorTextBox).toHaveDisplayValue("0");
const rateTextBox = screen.getByLabelText("Rate");
expect(rateTextBox).toHaveDisplayValue("0.0");
});
});

const TestComponentWithTotal = () => {
Expand Down
3 changes: 3 additions & 0 deletions services/ui-src/src/labels/2021/commonQuestionsLabel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ export const commonQuestionsLabel = {
"For each data source selected above, describe which reporting entities used each data source (e.g., health plans, FFS). If the data source differed across health plans or delivery systems, identify the number of plans that used each data source:",
srcDescription: "Data Source Description",
},
DataSourceCahps: {
describeDataSrc: "Describe the data source:",
},
DefinitionsOfPopulation: {
defineDenomOther: "Define the other denominator population:",
explainExcludedPop: "Explain which populations are excluded and why:",
Expand Down
3 changes: 3 additions & 0 deletions services/ui-src/src/labels/2022/commonQuestionsLabel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ export const commonQuestionsLabel = {
srcExplanationText:
"For each data source selected above, describe which reporting entities used each data source (e.g., health plans, FFS). If the data source differed across health plans or delivery systems, identify the number of plans that used each data source:",
},
DataSourceCahps: {
describeDataSrc: "Describe the data source:",
},
DefinitionsOfPopulation: {
defineDenomOther: "Define the other denominator population:",
explainExcludedPop: "Explain which populations are excluded and why:",
Expand Down
11 changes: 11 additions & 0 deletions services/ui-src/src/labels/2023/commonQuestionsLabel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ export const commonQuestionsLabel = {
srcExplanationText:
"For each data source selected above, describe which reporting entities used each data source (e.g., health plans, FFS). If the data source differed across health plans or delivery systems, identify the number of plans or delivery systems that used each data source.",
},
DataSourceCahps: {
describeDataSrc:
"Describe the data source (<em>text in this field is included in publicly-reported state-specific comments</em>):",
},
DefinitionsOfPopulation: {
defineDenomOther:
"Define the other denominator population (<em>text in this field is included in publicly-reported state-specific comments</em>):",
Expand All @@ -67,6 +71,13 @@ export const commonQuestionsLabel = {
" resource.",
],
},
DeviationFromMeasureSpecification: {
header: "Deviations from Measure Specifications",
section:
"Did your calculation of the measure deviate from the measure specification in any way?",
deviationReason:
"Explain the deviation(s) (<em>text in this field is included in publicly-reported state-specific comments</em>):",
},
MeasureSpecifications: {
options: [
{
Expand Down
11 changes: 11 additions & 0 deletions services/ui-src/src/labels/2024/commonQuestionsLabel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ export const commonQuestionsLabel = {
srcExplanationText:
"For each data source selected above, describe which reporting entities used each data source (e.g., health plans, FFS). If the data source differed across health plans or delivery systems, identify the number of plans or delivery systems that used each data source.",
},
DataSourceCahps: {
describeDataSrc:
"Describe the data source (<em>text in this field is included in publicly-reported state-specific comments</em>):",
},
DefinitionsOfPopulation: {
defineDenomOther:
"Define the other denominator population (<em>text in this field is included in publicly-reported state-specific comments</em>):",
Expand All @@ -67,6 +71,13 @@ export const commonQuestionsLabel = {
" resource.",
],
},
DeviationFromMeasureSpecification: {
header: "Deviations from Measure Specifications",
section:
"Did your calculation of the measure deviate from the measure specification in any way?",
deviationReason:
"Explain the deviation(s) (<em>text in this field is included in publicly-reported state-specific comments</em>):",
},
MeasureSpecifications: {
options: [
{
Expand Down

This file was deleted.

Loading

0 comments on commit a6cb52c

Please sign in to comment.