Skip to content

Commit

Permalink
Merge branch 'develop' into MAT-7407
Browse files Browse the repository at this point in the history
  • Loading branch information
adongare committed Oct 4, 2024
2 parents 7a4a149 + 378a6f8 commit ab18bd8
Show file tree
Hide file tree
Showing 9 changed files with 61 additions and 62 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -329,14 +329,14 @@ describe("PopulationCriteriaHome", () => {
});

await waitFor(() => {
userEvent.click(screen.getByText('"SDE Ethnicity"', { exact: false }));
userEvent.click(screen.getByText("SDE Ethnicity", { exact: false }));
});
expect(
screen.getByRole("button", { name: '"SDE Ethnicity"' })
screen.getByRole("button", { name: "SDE Ethnicity" })
).toBeInTheDocument();

expect(
screen.queryByText('"SDE Ethnicity" - Include in Report Type')
screen.queryByText("SDE Ethnicity - Include in Report Type")
).not.toBeInTheDocument();
});

Expand All @@ -355,14 +355,14 @@ describe("PopulationCriteriaHome", () => {

userEvent.click(screen.getByRole("button", { name: "Open" }));
await waitFor(() => {
userEvent.click(screen.getByText('"SDE Ethnicity"'));
userEvent.click(screen.getByText("SDE Ethnicity"));
});
expect(
screen.getByRole("button", { name: '"SDE Ethnicity"' })
screen.getByRole("button", { name: "SDE Ethnicity" })
).toBeInTheDocument();

expect(
await screen.findByText('"SDE Ethnicity" - Include in Report Type')
await screen.findByText("SDE Ethnicity - Include in Report Type")
).toBeInTheDocument();

const allComboBoxes2 = screen.getAllByRole("combobox");
Expand Down Expand Up @@ -396,10 +396,10 @@ describe("PopulationCriteriaHome", () => {

userEvent.click(screen.getByRole("button", { name: "Open" }));
await waitFor(() => {
userEvent.click(screen.getByText('"SDE Ethnicity"'));
userEvent.click(screen.getByText("SDE Ethnicity"));
});
expect(
screen.getByRole("button", { name: '"SDE Ethnicity"' })
screen.getByRole("button", { name: "SDE Ethnicity" })
).toBeInTheDocument();

expect(
Expand All @@ -422,14 +422,14 @@ describe("PopulationCriteriaHome", () => {

userEvent.click(screen.getByRole("button", { name: "Open" }));
await waitFor(() => {
userEvent.click(screen.getByText('"SDE Ethnicity"'));
userEvent.click(screen.getByText("SDE Ethnicity"));
});
expect(
screen.getByRole("button", { name: '"SDE Ethnicity"' })
screen.getByRole("button", { name: "SDE Ethnicity" })
).toBeInTheDocument();

expect(
await screen.findByText('"SDE Ethnicity" - Include in Report Type')
await screen.findByText("SDE Ethnicity - Include in Report Type")
).toBeInTheDocument();

const allComboBoxes2 = screen.getAllByRole("combobox");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,11 @@ const serviceConfig: ServiceConfig = {
measureService: {
baseUrl: "example-service-url",
},
elmTranslationService: {
baseUrl: "test-elm-service",
qdmElmTranslationService: {
baseUrl: "qdm-elm-service",
},
fhirElmTranslationService: {
baseUrl: "fhir-elm-service",
},
terminologyService: {
baseUrl: "terminology-service.com",
Expand Down Expand Up @@ -130,7 +133,7 @@ describe("QdmRiskAdjustment Component", () => {
description: "",
},
{
definition: '"SDE Ethnicity"',
definition: "SDE Ethnicity",
description: "",
},
];
Expand Down Expand Up @@ -160,10 +163,10 @@ describe("QdmRiskAdjustment Component", () => {

userEvent.click(riskAdjustmentButton);
await waitFor(() => {
userEvent.click(screen.getByText('"SDE Ethnicity"'));
userEvent.click(screen.getByText("SDE Ethnicity"));
});
expect(
screen.getByRole("button", { name: '"SDE Ethnicity"' })
screen.getByRole("button", { name: "SDE Ethnicity" })
).toBeInTheDocument();

// Verifies if RA description already loads values from store and able to update
Expand Down Expand Up @@ -228,7 +231,7 @@ describe("QdmRiskAdjustment Component", () => {
description: "",
},
{
definition: '"SDE Ethnicity"',
definition: "SDE Ethnicity",
description: "",
},
];
Expand Down Expand Up @@ -258,10 +261,10 @@ describe("QdmRiskAdjustment Component", () => {

userEvent.click(riskAdjustmentButton);
await waitFor(() => {
userEvent.click(screen.getByText('"SDE Ethnicity"'));
userEvent.click(screen.getByText("SDE Ethnicity"));
});
expect(
screen.getByRole("button", { name: '"SDE Ethnicity"' })
screen.getByRole("button", { name: "SDE Ethnicity" })
).toBeInTheDocument();

// Verifies if RA description already loads values from store and able to update
Expand Down Expand Up @@ -358,11 +361,11 @@ describe("QdmRiskAdjustment Component", () => {

userEvent.click(riskAdjustmentButton);
await waitFor(() => {
userEvent.click(screen.getByText('"SDE Ethnicity"'));
userEvent.click(screen.getByText("SDE Ethnicity"));
});
userEvent.click(riskAdjustmentButton); // To collapse the dropdown
expect(
screen.getByRole("button", { name: '"SDE Ethnicity"' })
screen.getByRole("button", { name: "SDE Ethnicity" })
).toBeInTheDocument();

// Verifies if RA description already loads values from store and able to update
Expand Down Expand Up @@ -411,11 +414,11 @@ describe("QdmRiskAdjustment Component", () => {

userEvent.click(riskAdjustmentButton);
await waitFor(() => {
userEvent.click(screen.getByText('"SDE Ethnicity"'));
userEvent.click(screen.getByText("SDE Ethnicity"));
});
userEvent.click(riskAdjustmentButton); // To collapse the dropdown
expect(
screen.getByRole("button", { name: '"SDE Ethnicity"' })
screen.getByRole("button", { name: "SDE Ethnicity" })
).toBeInTheDocument();

// Verifies if RA description already loads values from store and able to update
Expand Down Expand Up @@ -471,17 +474,17 @@ describe("QdmRiskAdjustment Component", () => {

userEvent.click(riskAdjustmentButton);
await waitFor(() => {
userEvent.click(screen.getByText('"SDE Ethnicity"'));
userEvent.click(screen.getByText("SDE Ethnicity"));
});
expect(
screen.getByRole("button", { name: '"SDE Ethnicity"' })
screen.getByRole("button", { name: "SDE Ethnicity" })
).toBeInTheDocument();

act(async () => {
const deleteButton = await screen.findByTestId("CancelIcon");
userEvent.click(deleteButton);
expect(
screen.queryByRole("button", { name: '"SDE Ethnicity"' })
screen.queryByRole("button", { name: "SDE Ethnicity" })
).not.toBeInTheDocument();
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ const RiskAdjustment = () => {
const definitions = new CqlAntlr(measure?.cql).parse()
.expressionDefinitions;
const mappedDefinitions = definitions.map(({ name }) => {
//return JSON.parse(name);
return name;
return JSON.parse(name);
});
setDefinitions(mappedDefinitions);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ describe("QiCore RiskAdjustment Component", () => {
includeInReportType: ["Individual"],
},
{
definition: '"SDE Ethnicity"',
definition: "SDE Ethnicity",
description: "",
includeInReportType: [
"Individual",
Expand Down Expand Up @@ -204,10 +204,10 @@ describe("QiCore RiskAdjustment Component", () => {

userEvent.click(riskAdjustmentButton);
await waitFor(() => {
userEvent.click(screen.getByText('"SDE Ethnicity"'));
userEvent.click(screen.getByText("SDE Ethnicity"));
});
expect(
screen.getByRole("button", { name: '"SDE Ethnicity"' })
screen.getByRole("button", { name: "SDE Ethnicity" })
).toBeInTheDocument();

// Verifies if RA description already loads values from store and able to update
Expand Down Expand Up @@ -255,7 +255,7 @@ describe("QiCore RiskAdjustment Component", () => {
description: "",
},
{
definition: '"SDE Ethnicity"',
definition: "SDE Ethnicity",
description: "",
includeInReportType: [
"Individual",
Expand Down Expand Up @@ -291,10 +291,10 @@ describe("QiCore RiskAdjustment Component", () => {

userEvent.click(riskAdjustmentButton);
await waitFor(() => {
userEvent.click(screen.getByText('"SDE Ethnicity"'));
userEvent.click(screen.getByText("SDE Ethnicity"));
});
expect(
screen.getByRole("button", { name: '"SDE Ethnicity"' })
screen.getByRole("button", { name: "SDE Ethnicity" })
).toBeInTheDocument();

// Verifies if RA description already loads values from store and able to update
Expand Down Expand Up @@ -391,11 +391,11 @@ describe("QiCore RiskAdjustment Component", () => {

userEvent.click(riskAdjustmentButton);
await waitFor(() => {
userEvent.click(screen.getByText('"SDE Ethnicity"'));
userEvent.click(screen.getByText("SDE Ethnicity"));
});
userEvent.click(riskAdjustmentButton); // To collapse the dropdown
expect(
screen.getByRole("button", { name: '"SDE Ethnicity"' })
screen.getByRole("button", { name: "SDE Ethnicity" })
).toBeInTheDocument();

// Verifies if RA description already loads values from store and able to update
Expand Down Expand Up @@ -444,11 +444,11 @@ describe("QiCore RiskAdjustment Component", () => {

userEvent.click(riskAdjustmentButton);
await waitFor(() => {
userEvent.click(screen.getByText('"SDE Ethnicity"'));
userEvent.click(screen.getByText("SDE Ethnicity"));
});
userEvent.click(riskAdjustmentButton); // To collapse the dropdown
expect(
screen.getByRole("button", { name: '"SDE Ethnicity"' })
screen.getByRole("button", { name: "SDE Ethnicity" })
).toBeInTheDocument();

// Verifies if RA description already loads values from store and able to update
Expand Down Expand Up @@ -504,17 +504,17 @@ describe("QiCore RiskAdjustment Component", () => {

userEvent.click(riskAdjustmentButton);
await waitFor(() => {
userEvent.click(screen.getByText('"SDE Ethnicity"'));
userEvent.click(screen.getByText("SDE Ethnicity"));
});
expect(
screen.getByRole("button", { name: '"SDE Ethnicity"' })
screen.getByRole("button", { name: "SDE Ethnicity" })
).toBeInTheDocument();

act(async () => {
const deleteButton = await screen.findByTestId("CancelIcon");
userEvent.click(deleteButton);
expect(
screen.queryByRole("button", { name: '"SDE Ethnicity"' })
screen.queryByRole("button", { name: "SDE Ethnicity" })
).not.toBeInTheDocument();
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,7 @@ const RiskAdjustment = () => {
const definitions = new CqlAntlr(measure?.cql).parse()
.expressionDefinitions;
const mappedDefinitions = definitions.map(({ name }) => {
//return JSON.parse(name);
return name;
return JSON.parse(name);
});
setDefinitions(mappedDefinitions);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ describe("SupplementalData Component QDM", () => {
description: "",
},
{
definition: '"SDE Ethnicity"',
definition: "SDE Ethnicity",
description: "",
},
];
Expand Down Expand Up @@ -169,10 +169,10 @@ describe("SupplementalData Component QDM", () => {

userEvent.click(supplementalDataButton);
await waitFor(() => {
userEvent.click(screen.getByText('"SDE Ethnicity"'));
userEvent.click(screen.getByText("SDE Ethnicity"));
});
expect(
screen.getByRole("button", { name: '"SDE Ethnicity"' })
screen.getByRole("button", { name: "SDE Ethnicity" })
).toBeInTheDocument();

// Verifies if SD description already loads values from store and able to update
Expand Down Expand Up @@ -274,11 +274,11 @@ describe("SupplementalData Component QDM", () => {

userEvent.click(supplementalDataButton);
await waitFor(() => {
userEvent.click(screen.getByText('"SDE Ethnicity"'));
userEvent.click(screen.getByText("SDE Ethnicity"));
});
userEvent.click(supplementalDataButton); // To collapse the dropdown
expect(
screen.getByRole("button", { name: '"SDE Ethnicity"' })
screen.getByRole("button", { name: "SDE Ethnicity" })
).toBeInTheDocument();

// Verifies if SD description already loads values from store and able to update
Expand Down Expand Up @@ -330,11 +330,11 @@ describe("SupplementalData Component QDM", () => {

userEvent.click(supplementalDataButton);
await waitFor(() => {
userEvent.click(screen.getByText('"SDE Ethnicity"'));
userEvent.click(screen.getByText("SDE Ethnicity"));
});
userEvent.click(supplementalDataButton); // To collapse the dropdown
expect(
screen.getByRole("button", { name: '"SDE Ethnicity"' })
screen.getByRole("button", { name: "SDE Ethnicity" })
).toBeInTheDocument();

// Verifies if SD description already loads values from store and able to update
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ const SupplementalData = () => {
const definitions = new CqlAntlr(measure?.cql).parse()
.expressionDefinitions;
const mappedDefinitions = definitions.map(({ name }) => {
//return JSON.parse(name);
return name;
return JSON.parse(name);
});
setDefinitions(mappedDefinitions);
}
Expand Down
Loading

0 comments on commit ab18bd8

Please sign in to comment.