-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from Brightscout/MI-809
MI-809 add test cases for webapp
- Loading branch information
Showing
11 changed files
with
3,988 additions
and
813 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 |
---|---|---|
|
@@ -73,3 +73,6 @@ plugin.exe | |
vendor/ | ||
.history/ | ||
coverage.txt | ||
|
||
# webapp test cases | ||
build/test-results.xml |
This file was deleted.
Oops, something went wrong.
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,41 @@ | ||
const config = { | ||
presets: [ | ||
['@babel/preset-env', { | ||
targets: { | ||
chrome: 66, | ||
firefox: 60, | ||
edge: 42, | ||
safari: 12, | ||
}, | ||
modules: false, | ||
corejs: 3, | ||
debug: false, | ||
useBuiltIns: 'usage', | ||
shippedProposals: true, | ||
}], | ||
['@babel/preset-react', { | ||
useBuiltIns: true, | ||
}], | ||
['@babel/typescript', { | ||
allExtensions: true, | ||
isTSX: true, | ||
}], | ||
], | ||
plugins: [ | ||
'@babel/plugin-proposal-class-properties', | ||
'@babel/plugin-syntax-dynamic-import', | ||
'@babel/proposal-object-rest-spread', | ||
'babel-plugin-typescript-to-proptypes', | ||
], | ||
}; | ||
|
||
// Jest needs module transformation | ||
config.env = { | ||
test: { | ||
presets: config.presets, | ||
plugins: config.plugins, | ||
}, | ||
}; | ||
config.env.test.presets[0][1].modules = 'auto'; | ||
|
||
module.exports = config; |
Large diffs are not rendered by default.
Oops, something went wrong.
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
196 changes: 196 additions & 0 deletions
196
webapp/src/components/subscription_modal/__snapshots__/subscription_modal.test.jsx.snap
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,196 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`components/ChannelSettingsModal subscription modal snapshot test 1`] = ` | ||
<Modal | ||
animation={true} | ||
autoFocus={true} | ||
backdrop="static" | ||
bsClass="modal" | ||
dialogComponentClass={[Function]} | ||
enforceFocus={true} | ||
keyboard={true} | ||
manager={ | ||
ModalManager { | ||
"add": [Function], | ||
"containers": Array [], | ||
"data": Array [], | ||
"handleContainerOverflow": true, | ||
"hideSiblingNodes": true, | ||
"isTopModal": [Function], | ||
"modals": Array [], | ||
"remove": [Function], | ||
} | ||
} | ||
onHide={[Function]} | ||
renderBackdrop={[Function]} | ||
restoreFocus={true} | ||
show={true} | ||
> | ||
<ModalHeader | ||
bsClass="modal-header" | ||
closeButton={true} | ||
closeLabel="Close" | ||
> | ||
<ModalTitle | ||
bsClass="modal-title" | ||
componentClass="h4" | ||
> | ||
Edit Your Confluence Subscription | ||
</ModalTitle> | ||
</ModalHeader> | ||
<ModalBody | ||
bsClass="modal-body" | ||
componentClass="div" | ||
> | ||
<div> | ||
<ConfluenceField | ||
addValidation={[Function]} | ||
fieldType="input" | ||
label="Alias" | ||
onChange={[Function]} | ||
placeholder="Enter an alias for this subscription." | ||
readOnly={false} | ||
removeValidation={[Function]} | ||
required={true} | ||
type="text" | ||
value="" | ||
/> | ||
<ConfluenceField | ||
addValidation={[Function]} | ||
fieldType="input" | ||
label="Confluence Base URL" | ||
onChange={[Function]} | ||
placeholder="Enter the Confluence Base URL." | ||
readOnly={false} | ||
removeValidation={[Function]} | ||
required={true} | ||
type="text" | ||
value="" | ||
/> | ||
<ConfluenceField | ||
addValidation={[Function]} | ||
fieldType="input" | ||
label="Space Key" | ||
onChange={[Function]} | ||
placeholder="Enter the Confluence Space Key." | ||
readOnly={false} | ||
removeValidation={[Function]} | ||
required={true} | ||
type="text" | ||
value="" | ||
/> | ||
<ConfluenceField | ||
addValidation={[Function]} | ||
fieldType="dropDown" | ||
isMulti={true} | ||
label="Events" | ||
name="events" | ||
onChange={[Function]} | ||
options={ | ||
Array [ | ||
Object { | ||
"label": "Comment Create", | ||
"value": "comment_created", | ||
}, | ||
Object { | ||
"label": "Comment Update", | ||
"value": "comment_updated", | ||
}, | ||
Object { | ||
"label": "Comment Remove", | ||
"value": "comment_removed", | ||
}, | ||
Object { | ||
"label": "Page Create", | ||
"value": "page_created", | ||
}, | ||
Object { | ||
"label": "Page Update", | ||
"value": "page_updated", | ||
}, | ||
Object { | ||
"label": "Page Trash", | ||
"value": "page_trashed", | ||
}, | ||
Object { | ||
"label": "Page Restore", | ||
"value": "page_restored", | ||
}, | ||
Object { | ||
"label": "Page Remove", | ||
"value": "page_removed", | ||
}, | ||
] | ||
} | ||
readOnly={false} | ||
removeValidation={[Function]} | ||
required={false} | ||
theme={Object {}} | ||
value={ | ||
Array [ | ||
Object { | ||
"label": "Comment Create", | ||
"value": "comment_created", | ||
}, | ||
Object { | ||
"label": "Comment Update", | ||
"value": "comment_updated", | ||
}, | ||
Object { | ||
"label": "Comment Remove", | ||
"value": "comment_removed", | ||
}, | ||
Object { | ||
"label": "Page Create", | ||
"value": "page_created", | ||
}, | ||
Object { | ||
"label": "Page Update", | ||
"value": "page_updated", | ||
}, | ||
Object { | ||
"label": "Page Trash", | ||
"value": "page_trashed", | ||
}, | ||
Object { | ||
"label": "Page Restore", | ||
"value": "page_restored", | ||
}, | ||
Object { | ||
"label": "Page Remove", | ||
"value": "page_removed", | ||
}, | ||
] | ||
} | ||
/> | ||
</div> | ||
</ModalBody> | ||
<ModalFooter | ||
bsClass="modal-footer" | ||
componentClass="div" | ||
> | ||
<Button | ||
active={false} | ||
block={false} | ||
bsClass="btn" | ||
bsStyle="link" | ||
disabled={false} | ||
onClick={[Function]} | ||
type="button" | ||
> | ||
Cancel | ||
</Button> | ||
<Button | ||
active={false} | ||
block={false} | ||
bsClass="btn" | ||
bsStyle="primary" | ||
disabled={false} | ||
onClick={[Function]} | ||
type="submit" | ||
> | ||
Save Subscription | ||
</Button> | ||
</ModalFooter> | ||
</Modal> | ||
`; |
Oops, something went wrong.