diff options
author | 2020-12-14 19:18:19 +0000 | |
---|---|---|
committer | 2020-12-14 19:18:19 +0000 | |
commit | a1963eb56f9682a6315a06a075d09314822dbfd9 (patch) | |
tree | d0856e1326516447a33951de623770787f6ef996 /src/tests/components | |
parent | Merge pull request #29 from python-discord/dependabot/npm_and_yarn/ini-1.3.8 (diff) | |
parent | Simplify Axios client baseURL definition (diff) |
Merge pull request #30 from python-discord/ks123/discovery
Diffstat (limited to 'src/tests/components')
-rw-r--r-- | src/tests/components/FormListing.test.tsx | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/src/tests/components/FormListing.test.tsx b/src/tests/components/FormListing.test.tsx index 5062a95..0afe10c 100644 --- a/src/tests/components/FormListing.test.tsx +++ b/src/tests/components/FormListing.test.tsx @@ -4,20 +4,37 @@ import '@testing-library/jest-dom/extend-expect'; import FormListing from "../../components/FormListing"; import { BrowserRouter as Router } from 'react-router-dom'; -import { AllFormsForm } from '../../api/forms'; +import { Form, FormFeatures } from '../../api/forms'; +import { QuestionType } from '../../api/question'; -const openFormListing: AllFormsForm = { - title: "Example form listing", +const openFormListing: Form = { + name: "Example form listing", id: "example-form-listing", description: "My form listing", - open: true + features: [FormFeatures.Discoverable, FormFeatures.Open], + questions: [ + { + "id": "my-question", + "name": "My question", + "type": QuestionType.ShortText, + "data": {} + } + ] } -const closedFormListing: AllFormsForm = { - title: "Example form listing", +const closedFormListing: Form = { + name: "Example form listing", id: "example-form-listing", description: "My form listing", - open: false + features: [FormFeatures.Discoverable], + questions: [ + { + "id": "what-should-i-ask", + "name": "What should I ask?", + "type": QuestionType.ShortText, + "data": {} + } + ] } test('renders form listing with specified title', () => { |