generated from Real-Dev-Squad/website-template
-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix/remove skipped test cases (#477)
* test: created provider wrapper * test: created provider wrapper * test: create goal test updated * test(AuthScreen): updated "sign with github" test case * test: updated card component skipped test case * test: created provider wrapper * test: create goal test updated * test(AuthScreen): updated "sign with github" test case * test: updated card component skipped test case * refactor: removed ts-ignore and update onPress call * refactor: updated variable name to improve readability * test: added one more test for github login. * refactor: removed render abstraction and created a wrapper provider * refactor: updated ProviderWrapper location * test: fix removed fragment
- Loading branch information
1 parent
b81abab
commit e0a24c8
Showing
6 changed files
with
202 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 |
---|---|---|
@@ -0,0 +1,84 @@ | ||
export const mockUsersData = [ | ||
{ | ||
incompleteUserDetails: false, | ||
discordJoinedAt: '2023-05-18T08:42:15.623000+00:00', | ||
discordId: '892345671234567890', | ||
linkedin_id: 'user7891', | ||
yoe: 3, | ||
picture: { | ||
publicId: 'profile/9kLmxpQw2YtRvCcc12AB/xyz9abcdwxyzdef123', | ||
url: 'https://res.cloudinary.com/realdevsquad/image/upload/v1701234567/profile/9kLmxpQw2YtRvCcc12AB/xyz9abcdwxyzdef123.jpg', | ||
}, | ||
github_created_at: 1612345678000, | ||
github_display_name: 'user7891', | ||
github_id: 'dev7891', | ||
id: '9kLmxpQw2YtRvCcc12AB', | ||
twitter_id: 'coder7891', | ||
status: 'active', | ||
github_user_id: '67891234', | ||
profileURL: 'https://my-profile-service-yhg4.onrender.com', | ||
website: 'https://user7891.dev', | ||
company: 'TechStartup XYZ', | ||
designation: 'Backend Developer', | ||
instagram_id: 'dev.7891', | ||
profileStatus: 'ACTIVE', | ||
roles: { | ||
archived: false, | ||
in_discord: true, | ||
member: true, | ||
}, | ||
username: 'dev-user-7891', | ||
last_name: 'user7891', | ||
first_name: 'test user', | ||
updated_at: 1729349563939, | ||
created_at: 1729349563328, | ||
}, | ||
{ | ||
incompleteUserDetails: false, | ||
discordJoinedAt: '2022-09-30T15:23:44.789000+00:00', | ||
discordId: '123456789012345678', | ||
linkedin_id: 'user4567', | ||
yoe: 1, | ||
picture: { | ||
publicId: 'profile/8jKnWpLv1XsQbBaa45CD/abc8xyzawxyzabc890', | ||
url: 'https://res.cloudinary.com/realdevsquad/image/upload/v1698765432/profile/8jKnWpLv1XsQbBaa45CD/abc8xyzawxyzabc890.jpg', | ||
}, | ||
github_created_at: 1598765432000, | ||
github_display_name: 'user4567', | ||
github_id: 'dev4567', | ||
id: '8jKnWpLv1XsQbBaa45CD', | ||
twitter_id: 'coder4567', | ||
status: 'active', | ||
github_user_id: '34567891', | ||
profileURL: 'https://my-profile-service-yhg4.onrender.com', | ||
website: 'https://user4567.tech', | ||
company: 'None', | ||
designation: 'Junior Developer', | ||
instagram_id: '', | ||
profileStatus: 'BLOCKED', | ||
roles: { | ||
archived: false, | ||
in_discord: true, | ||
member: false, | ||
}, | ||
username: 'dev-user-4567', | ||
last_name: 'user4567', | ||
first_name: 'dev', | ||
updated_at: 1729349599999, | ||
created_at: 1729349580000, | ||
}, | ||
]; | ||
|
||
export const mockGoalData = { | ||
data: { | ||
type: 'Goal', | ||
attributes: { | ||
title: 'test title', | ||
description: 'test description', | ||
created_by: 'testUserId', | ||
assigned_to: 'testAssignedUserId', | ||
ends_on: '2026-01-01T00:00:00Z', | ||
assigned_by: 'testAssignedByUserId', | ||
}, | ||
}, | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
import { jest } from '@jest/globals'; | ||
import mockRNDeviceInfo from 'react-native-device-info/jest/react-native-device-info-mock'; | ||
import mockRNCNetInfo from '@react-native-community/netinfo/jest/netinfo-mock.js'; | ||
|
||
|
||
require('react-native-reanimated/src/jestUtils').setUpTests(); | ||
jest.mock('react-native-device-info', () => mockRNDeviceInfo); | ||
jest.mock('react-native/Libraries/EventEmitter/NativeEventEmitter'); | ||
jest.mock('@react-native-community/netinfo', () => mockRNCNetInfo); |
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,16 @@ | ||
import React from 'react'; | ||
import { Provider as StoreProvider } from 'react-redux'; | ||
import { AuthProvider } from '../../context/AuthContext'; | ||
import { store } from '../../../App'; | ||
|
||
interface ProviderWrapperProps { | ||
children: JSX.Element; | ||
} | ||
|
||
const ProviderWrapper: React.FC<ProviderWrapperProps> = ({ children }) => ( | ||
<StoreProvider store={store}> | ||
<AuthProvider>{children}</AuthProvider> | ||
</StoreProvider> | ||
); | ||
|
||
export default ProviderWrapper; |