-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[INJIWEB-700]: secure time bound storage- test cases
Signed-off-by: Vijay <[email protected]>
- Loading branch information
1 parent
cb3a150
commit 37d5bc9
Showing
7 changed files
with
166 additions
and
3 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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import {render, screen} from "@testing-library/react"; | ||
import {ModalWrapper} from "../../modals/ModalWrapper"; | ||
import {DSHeader} from "../../components/DataShare/DSHeader"; | ||
import {DSFooter} from "../../components/DataShare/DSFooter"; | ||
import React from "react"; | ||
import {DSContent} from "../../components/DataShare/DSContent"; | ||
import {reduxStore} from "../../redux/reduxStore"; | ||
import {Provider} from "react-redux"; | ||
|
||
describe("Test the Layout of the Modal Wrapper", () => { | ||
|
||
const customMockFn = jest.fn(); | ||
beforeEach(() => { | ||
render( | ||
<Provider store={reduxStore}> | ||
<ModalWrapper header={<DSHeader title={"title"} subTitle={"subTitle"}/>} | ||
content={<DSContent credentialName={"credentialName"} credentialLogo={"credentialLogo"} setCustom={jest.fn()}/>} | ||
footer={<DSFooter cancel={"cancel"} success={"success"} onSuccess={jest.fn()} onCancel={jest.fn()}/>} | ||
size={"3xl"} | ||
zIndex={40} /> | ||
</Provider>) | ||
}) | ||
|
||
test("Test the presence of the Outer Container", ()=>{ | ||
const document = screen.getByTestId("ModalWrapper-Outer-Container"); | ||
expect(document).toBeInTheDocument(); | ||
}) | ||
test("Test the presence of the Inner Container", ()=>{ | ||
const document = screen.getByTestId("ModalWrapper-Inner-Container"); | ||
expect(document).toBeInTheDocument(); | ||
expect(document.children.length).toBe(3) | ||
}) | ||
test("Test the presence of the Back Drop", ()=>{ | ||
const document = screen.getByTestId("ModalWrapper-BackDrop"); | ||
expect(document).toBeInTheDocument(); | ||
}) | ||
|
||
}) |
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