Skip to content

Commit

Permalink
[MM-770]: Added webapp testcase for create issue modal
Browse files Browse the repository at this point in the history
  • Loading branch information
Kshitij-Katiyar committed Sep 18, 2024
1 parent bf6bee7 commit f8092fe
Show file tree
Hide file tree
Showing 4 changed files with 410 additions and 0 deletions.
3 changes: 3 additions & 0 deletions webapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@
"setupFiles": [
"jest-canvas-mock"
],
"setupFilesAfterEnv": [
"<rootDir>/tests/setup.tsx"
],
"testURL": "http://localhost:8065"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`CreateIssueModal should render correctly with default props 1`] = `
<Modal
animation={true}
autoFocus={true}
backdrop="static"
bsSize="large"
dialogAs={
Object {
"$$typeof": Symbol(react.forward_ref),
"displayName": "ModalDialog",
"render": [Function],
}
}
dialogClassName="modal--scroll"
enforceFocus={true}
keyboard={true}
onExited={[Function]}
onHide={[Function]}
restoreFocus={true}
show={true}
>
<ModalHeader
closeButton={true}
closeLabel="Close"
>
<ModalTitle>
Create GitHub Issue
</ModalTitle>
</ModalHeader>
<form
onSubmit={[Function]}
role="form"
>
<ModalBody
style={
Object {
"backgroundColor": "#fff",
"color": "#000",
"padding": "2em 2em 3em",
}
}
>
<div>
<Connect(GithubRepoSelector)
addValidate={[Function]}
onChange={[Function]}
removeValidate={[Function]}
required={true}
theme={
Object {
"centerChannelBg": "#fff",
"centerChannelColor": "#000",
}
}
value={null}
/>
<Input
disabled={false}
id="title"
label="Title for the GitHub Issue"
maxLength={256}
onChange={[Function]}
readOnly={false}
required={true}
type="input"
value=""
/>
<Input
label="Description for the GitHub Issue"
maxLength={null}
onChange={[Function]}
readOnly={false}
required={false}
type="textarea"
value=""
/>
</div>
</ModalBody>
<ModalFooter>
<FormButton
btnClass="btn-link"
defaultMessage="Cancel"
disabled={false}
extraClasses=""
onClick={[Function]}
savingMessage="Creating"
type="button"
/>
<FormButton
btnClass="btn btn-primary"
defaultMessage="Submit"
disabled={false}
extraClasses=""
saving={false}
savingMessage="Submitting"
type="submit"
>
Submit
</FormButton>
</ModalFooter>
</form>
</Modal>
`;
Loading

0 comments on commit f8092fe

Please sign in to comment.