-
Notifications
You must be signed in to change notification settings - Fork 6
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
AndrewC
committed
Nov 1, 2023
1 parent
d3388f4
commit 0b32296
Showing
4 changed files
with
16 additions
and
18 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 |
---|---|---|
|
@@ -24,4 +24,4 @@ jobs: | |
yarn install | ||
- name: Run tests | ||
run: | | ||
yarn test | ||
yarn test |
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 |
---|---|---|
|
@@ -28,7 +28,7 @@ beforeAll(() => { | |
afterAll(() => { | ||
console.log.mockRestore(); | ||
console.error.mockRestore(); | ||
moxios.uninstall(); | ||
// moxios.uninstall(); | ||
}); | ||
|
||
describe("MorePage", () => { | ||
|
@@ -47,20 +47,20 @@ describe("MorePage", () => { | |
// Check if the onValueChange prop exists | ||
expect(toggleButton.props().onValueChange).toBeDefined(); | ||
}); | ||
}); | ||
|
||
describe("opens email link when 'Report a Bug' is pressed", () => { | ||
it("opens email link when 'Report a Bug' is pressed", () => { | ||
const spy = jest.spyOn(Linking, 'openURL'); | ||
const wrapper = shallow(<MorePage />); | ||
const emailButton = wrapper.findWhere((node) => node.key() === "Email"); | ||
describe("opens email link when 'Report a Bug' is pressed", () => { | ||
it("opens email link when 'Report a Bug' is pressed", () => { | ||
const spy = jest.spyOn(Linking, 'openURL'); | ||
const wrapper = shallow(<MorePage />); | ||
const emailButton = wrapper.findWhere((node) => node.key() === "Email"); | ||
|
||
emailButton.simulate('press'); | ||
emailButton.simulate('press'); | ||
|
||
expect(spy).toHaveBeenCalledWith( | ||
"mailto:[email protected]?subject=Bug%20Report%20on%20'Where's%20Religion%3F'&body=Please%20provide%20details%20of%20your%20issue%20you%20are%20facing%20here." | ||
); | ||
}); | ||
}); | ||
expect(spy).toHaveBeenCalledWith( | ||
"mailto:[email protected]?subject=Bug%20Report%20on%20'Where's%20Religion%3F'&body=Please%20provide%20details%20of%20your%20issue%20you%20are%20facing%20here." | ||
); | ||
}); | ||
|
||
describe("calls the logout function when 'Logout' is pressed", () => { | ||
it("calls the logout function when 'Logout' is pressed", () => { | ||
|
@@ -73,4 +73,4 @@ describe("MorePage", () => { | |
expect(spy).toHaveBeenCalled(); | ||
}); | ||
}); | ||
}); | ||
}); |
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