{ getMenuItems() }
@@ -51,6 +52,11 @@ ExamSelection.propTypes = {
name: PropTypes.string,
})).isRequired,
onSelect: PropTypes.func.isRequired,
+ isDisabled: PropTypes.bool,
+};
+
+ExamSelection.defaultProps = {
+ isDisabled: false,
};
export default ExamSelection;
diff --git a/src/pages/ExamsPage/components/ExamSelection.test.jsx b/src/pages/ExamsPage/components/ExamSelection.test.jsx
index 9d35e7b..69a225d 100644
--- a/src/pages/ExamsPage/components/ExamSelection.test.jsx
+++ b/src/pages/ExamsPage/components/ExamSelection.test.jsx
@@ -57,4 +57,8 @@ describe('ExamSelection', () => {
expect(mockHandleSelectExam).toHaveBeenCalledTimes(1);
expect(mockHandleSelectExam).toHaveBeenCalledWith(27);
});
+ it('button disabled when isDisabled is true', () => {
+ renderWithoutError(
);
+ expect(screen.getByText('Select an exam')).toBeDisabled();
+ });
});
diff --git a/src/pages/ExamsPage/components/__snapshots__/AllowanceList.test.jsx.snap b/src/pages/ExamsPage/components/__snapshots__/AllowanceList.test.jsx.snap
new file mode 100644
index 0000000..5e868a1
--- /dev/null
+++ b/src/pages/ExamsPage/components/__snapshots__/AllowanceList.test.jsx.snap
@@ -0,0 +1,214 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`AllowanceList Test that the AllowanceList matches snapshot 1`] = `
+{
+ "asFragment": [Function],
+ "baseElement":
+
+
+
+
+
+ No Allowances
+
+
+
+
+ Need to grant an allowance? Get started here.
+
+
+
+
+
+ ,
+ "container":
+
+
+
+
+ No Allowances
+
+
+
+
+ Need to grant an allowance? Get started here.
+
+
+
+
+
,
+ "debug": [Function],
+ "findAllByAltText": [Function],
+ "findAllByDisplayValue": [Function],
+ "findAllByLabelText": [Function],
+ "findAllByPlaceholderText": [Function],
+ "findAllByRole": [Function],
+ "findAllByTestId": [Function],
+ "findAllByText": [Function],
+ "findAllByTitle": [Function],
+ "findByAltText": [Function],
+ "findByDisplayValue": [Function],
+ "findByLabelText": [Function],
+ "findByPlaceholderText": [Function],
+ "findByRole": [Function],
+ "findByTestId": [Function],
+ "findByText": [Function],
+ "findByTitle": [Function],
+ "getAllByAltText": [Function],
+ "getAllByDisplayValue": [Function],
+ "getAllByLabelText": [Function],
+ "getAllByPlaceholderText": [Function],
+ "getAllByRole": [Function],
+ "getAllByTestId": [Function],
+ "getAllByText": [Function],
+ "getAllByTitle": [Function],
+ "getByAltText": [Function],
+ "getByDisplayValue": [Function],
+ "getByLabelText": [Function],
+ "getByPlaceholderText": [Function],
+ "getByRole": [Function],
+ "getByTestId": [Function],
+ "getByText": [Function],
+ "getByTitle": [Function],
+ "queryAllByAltText": [Function],
+ "queryAllByDisplayValue": [Function],
+ "queryAllByLabelText": [Function],
+ "queryAllByPlaceholderText": [Function],
+ "queryAllByRole": [Function],
+ "queryAllByTestId": [Function],
+ "queryAllByText": [Function],
+ "queryAllByTitle": [Function],
+ "queryByAltText": [Function],
+ "queryByDisplayValue": [Function],
+ "queryByLabelText": [Function],
+ "queryByPlaceholderText": [Function],
+ "queryByRole": [Function],
+ "queryByTestId": [Function],
+ "queryByText": [Function],
+ "queryByTitle": [Function],
+ "rerender": [Function],
+ "unmount": [Function],
+}
+`;
diff --git a/src/pages/ExamsPage/components/__snapshots__/AttemptList.test.jsx.snap b/src/pages/ExamsPage/components/__snapshots__/AttemptList.test.jsx.snap
index 3228ef4..4dea8f4 100644
--- a/src/pages/ExamsPage/components/__snapshots__/AttemptList.test.jsx.snap
+++ b/src/pages/ExamsPage/components/__snapshots__/AttemptList.test.jsx.snap
@@ -490,7 +490,7 @@ exports[`AttemptList Test that the AttemptList matches snapshot 1`] = `
>