-
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.
- Loading branch information
1 parent
4e60f37
commit 58d4646
Showing
2 changed files
with
61 additions
and
0 deletions.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
react/src/__tests__/Components/Footer/Components/RoomCreationPasswordDialog.test.js
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,31 @@ | ||
// src/RoomCreationPasswordDialog.test.js | ||
import React from 'react'; | ||
import { render } from '@testing-library/react'; | ||
import {RoomCreationPasswordDialog} from "../../../../Components/Footer/Components/RoomCreationPasswordDialog"; | ||
|
||
// Mock the useContext hook | ||
jest.mock('react', () => ({ | ||
...jest.requireActual('react'), | ||
})); | ||
|
||
describe('Room Creation Password Dialog Component', () => { | ||
|
||
beforeEach(() => { | ||
// Reset the mock implementation before each test | ||
jest.clearAllMocks(); | ||
}); | ||
|
||
|
||
it('renders without crashing', () => { | ||
render( | ||
<RoomCreationPasswordDialog | ||
onClose={jest.fn()} | ||
password={"pasword"} | ||
onPasswordChange={jest.fn()} | ||
open={true} | ||
onCreateRoomClicked={jest.fn()} | ||
/> | ||
); | ||
}); | ||
|
||
}); |
30 changes: 30 additions & 0 deletions
30
react/src/__tests__/Components/Footer/Components/ShareScreenButton.test.js
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,30 @@ | ||
// src/ShareScreenButton.test.js | ||
import React from 'react'; | ||
import { render } from '@testing-library/react'; | ||
import ShareScreenButton from "../../../../Components/Footer/Components/ShareScreenButton"; | ||
|
||
// Mock the useContext hook | ||
jest.mock('react', () => ({ | ||
...jest.requireActual('react'), | ||
})); | ||
|
||
describe('Share Screen Button Component', () => { | ||
|
||
beforeEach(() => { | ||
// Reset the mock implementation before each test | ||
jest.clearAllMocks(); | ||
}); | ||
|
||
|
||
it('renders without crashing', () => { | ||
render( | ||
<ShareScreenButton | ||
footer={true} | ||
isScreenShared={false} | ||
handleStartScreenShare={jest.fn()} | ||
handleStopScreenShare={jest.fn()} | ||
/> | ||
); | ||
}); | ||
|
||
}); |