-
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.
- Loading branch information
Showing
15 changed files
with
4,712 additions
and
5,370 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 |
---|---|---|
|
@@ -21,7 +21,7 @@ jobs: | |
aws-region: ${{ secrets.AWS_DEFAULT_REGION }} | ||
role-to-assume: ${{ secrets.PRODUCTION_SYNC_OIDC_ROLE }} | ||
- name: Sync Security Hub and Jira | ||
uses: Enterprise-CMCS/[email protected].3 | ||
uses: Enterprise-CMCS/[email protected].5 | ||
with: | ||
jira-token: ${{ secrets.JIRA_SERVICE_USER_TOKEN }} | ||
jira-username: ${{ secrets.JIRA_SERVICE_USERNAME }} | ||
|
@@ -31,3 +31,4 @@ jobs: | |
jira-ignore-statuses: Done, Closed, Canceled | ||
jira-custom-fields: '{ "customfield_14154" : [{"id": "16955", "value": "CARTS"}] }' | ||
aws-severities: CRITICAL, HIGH, MEDIUM | ||
assign-jira-ticket-to: ${{ secrets.ACCOUNT_ID_REHMAN }} |
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
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
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,52 @@ | ||
import React from "react"; | ||
import { Provider } from "react-redux"; | ||
import configureMockStore from "redux-mock-store"; | ||
import Repeatables from "./Repeatables"; | ||
import { screen, render } from "@testing-library/react"; | ||
|
||
const mockStore = configureMockStore(); | ||
const store = mockStore({ lastYearTotals: { 2022: [] } }); | ||
const renderQuestion = async (question) => | ||
await render( | ||
<Provider store={store}> | ||
<Repeatables | ||
question={question} | ||
type={null} | ||
disabled={false} | ||
addRepeatableTo={jest.fn()} | ||
removeRepeatableFrom={jest.fn()} | ||
></Repeatables> | ||
</Provider> | ||
); | ||
|
||
describe("Repeatables", () => { | ||
it("should render with default verbiage", async () => { | ||
const question = { | ||
typeLabel: "TypeLabel", | ||
questions: [], | ||
}; | ||
await renderQuestion(question); | ||
screen.getByText("Do you have another TypeLabel in this list?"); | ||
screen.getByText("Optional"); | ||
screen.getByText("Add another TypeLabel"); | ||
}); | ||
|
||
it("should hide the Optional hint when specified", async () => { | ||
const question = { | ||
hideOptionalHint: true, | ||
questions: [], | ||
}; | ||
await renderQuestion(question); | ||
expect(screen.queryByText("Optional")).toBeNull(); | ||
}); | ||
|
||
it("should use override verbiage when specified", async () => { | ||
const question = { | ||
addAnotherText: "Y'all got more or what?", | ||
questions: [], | ||
}; | ||
await renderQuestion(question); | ||
expect(screen.queryByText(/Do you have another/)).toBeNull(); | ||
screen.getByText("Y'all got more or what?"); | ||
}); | ||
}); |
Oops, something went wrong.