Skip to content

Commit

Permalink
Merge pull request zingolabs#737 from juanky201271/dev_preparing_next…
Browse files Browse the repository at this point in the history
…_release_1.8.0

Preparing next release 1.8.1
  • Loading branch information
juanky201271 authored Oct 31, 2024
2 parents 86a358e + 1f14e3d commit fe8da94
Show file tree
Hide file tree
Showing 125 changed files with 928 additions and 3,639 deletions.
15 changes: 10 additions & 5 deletions __mocks__/dataMocks/mockValueTransfers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ export const mockValueTransfers: ValueTransferType[] = [
txid: 'memotooself-txid-1234567890',
time: Date.now() - 100,
zecPrice: 33.33,
address: '',
amount: 0,
memos: ['orchard memo', 'sapling memo'],
},
Expand All @@ -34,7 +33,6 @@ export const mockValueTransfers: ValueTransferType[] = [
txid: 'sendtooself-txid-1234567890',
time: Date.now() - 100,
zecPrice: 33.33,
address: '',
amount: 0,
},
{
Expand All @@ -44,7 +42,6 @@ export const mockValueTransfers: ValueTransferType[] = [
txid: 'receive-txid-1234567890',
time: Date.now() - 10,
zecPrice: 66.66,
address: '',
amount: 0.77654321,
poolType: PoolEnum.OrchardPool,
memos: ['hola', ' & ', 'hello'],
Expand All @@ -57,8 +54,16 @@ export const mockValueTransfers: ValueTransferType[] = [
txid: 'shield-txid-1234567890',
time: Date.now(),
zecPrice: 33.33,
address: '',
poolType: PoolEnum.OrchardPool,
amount: 0.0009,
},
{
kind: ValueTransferKindEnum.Ephemeral320Tex,
fee: 0.0001,
confirmations: 12,
status: RPCValueTransfersStatusEnum.confirmed,
txid: 'ephemeral-320-tex-txid-1234567890',
time: Date.now(),
zecPrice: 33.33,
amount: 0.0009,
},
];
2 changes: 2 additions & 0 deletions __tests__/App.snapshot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ jest.mock('react-native-gesture-handler', () => {
dropGestureHandler: jest.fn(),
updateGestureHandler: jest.fn(),
forceTouchAvailable: jest.fn(),
hasGenericPassword: jest.fn(),
getSupportedBiometryType: jest.fn(),
State: {},
Directions: {},
};
Expand Down
21 changes: 21 additions & 0 deletions __tests__/History.ValueTransferDetail.unit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -205,4 +205,25 @@ describe('Component History ValueTransferDetail - test', () => {
expect(num.length).toBe(2);
screen.getByText('0.0001');
});

test('History ValueTransferDetail - ephemeral-32-tex ValueTransfer', () => {
render(
<ContextAppLoadedProvider value={state}>
<ValueTransferDetail
index={4}
length={mockValueTransfers.length}
totalLength={mockValueTransfers.length}
vt={mockValueTransfers[5]}
closeModal={onClose}
openModal={onClose}
setPrivacyOption={onSetOption}
setSendPageState={onClose}
moveValueTransferDetail={onMove}
/>
</ContextAppLoadedProvider>,
);
const num = screen.getAllByText('0.0009');
expect(num.length).toBe(2);
screen.getByText('0.0001');
});
});
1 change: 0 additions & 1 deletion __tests__/History.snapshot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ jest.mock('react-native-gesture-handler', () => {
Directions: {},
};
return {
TouchableOpacity: View,
Swipeable: View,
RNGestureHandlerModule: RN,
};
Expand Down
2 changes: 2 additions & 0 deletions __tests__/LoadedApp.snapshot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ jest.mock('react-native-gesture-handler', () => {
dropGestureHandler: jest.fn(),
updateGestureHandler: jest.fn(),
forceTouchAvailable: jest.fn(),
hasGenericPassword: jest.fn(),
getSupportedBiometryType: jest.fn(),
State: {},
Directions: {},
};
Expand Down
2 changes: 2 additions & 0 deletions __tests__/LoadingApp.snapshot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ jest.mock('react-native-keychain', () => ({
setGenericPassword: jest.fn(),
getGenericPassword: jest.fn(),
resetGenericPassword: jest.fn(),
hasGenericPassword: jest.fn(),
getSupportedBiometryType: jest.fn(),
}));

// test suite
Expand Down
8 changes: 0 additions & 8 deletions __tests__/Messages.snapshot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,9 @@ describe('Component Messages - test', () => {
<Messages
doRefresh={onFunction}
toggleMenuDrawer={onFunction}
poolsMoreInfoOnClick={onFunction}
syncingStatusMoreInfoOnClick={onFunction}
setZecPrice={onFunction}
setComputingModalVisible={onFunction}
setPrivacyOption={onFunction}
setSendPageState={onFunction}
setShieldingAmount={onFunction}
setScrollToBottom={onFunction}
scrollToBottom={false}
/>
Expand All @@ -141,13 +137,9 @@ describe('Component Messages - test', () => {
<Messages
doRefresh={onFunction}
toggleMenuDrawer={onFunction}
poolsMoreInfoOnClick={onFunction}
syncingStatusMoreInfoOnClick={onFunction}
setZecPrice={onFunction}
setComputingModalVisible={onFunction}
setPrivacyOption={onFunction}
setSendPageState={onFunction}
setShieldingAmount={onFunction}
setScrollToBottom={onFunction}
scrollToBottom={false}
/>
Expand Down
4 changes: 0 additions & 4 deletions __tests__/MessagesAddress.snapshot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,9 @@ describe('Component Messages Address - test', () => {
<MessagesAddress
doRefresh={onFunction}
toggleMenuDrawer={onFunction}
poolsMoreInfoOnClick={onFunction}
syncingStatusMoreInfoOnClick={onFunction}
setZecPrice={onFunction}
setComputingModalVisible={onFunction}
setPrivacyOption={onFunction}
setSendPageState={onFunction}
setShieldingAmount={onFunction}
setScrollToBottom={onFunction}
scrollToBottom={false}
address={mockAddresses[0].uaAddress}
Expand Down
7 changes: 1 addition & 6 deletions __tests__/Receive.snapshot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,7 @@ describe('Component Receive - test', () => {
const onFunction = jest.fn();
const receive = render(
<ContextAppLoadedProvider value={state}>
<Receive
setUaAddress={onFunction}
toggleMenuDrawer={onFunction}
setPrivacyOption={onFunction}
syncingStatusMoreInfoOnClick={onFunction}
/>
<Receive setUaAddress={onFunction} toggleMenuDrawer={onFunction} syncingStatusMoreInfoOnClick={onFunction} />
</ContextAppLoadedProvider>,
);
expect(receive.toJSON()).toMatchSnapshot();
Expand Down
2 changes: 2 additions & 0 deletions __tests__/Settings.snapshot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ jest.mock('react-native-keychain', () => ({
setGenericPassword: jest.fn(),
getGenericPassword: jest.fn(),
resetGenericPassword: jest.fn(),
hasGenericPassword: jest.fn(),
getSupportedBiometryType: jest.fn(),
}));
jest.useFakeTimers();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ exports[`Component Address Book Details - test Address Book Datails - Add - snap
{
"busy": undefined,
"checked": undefined,
"disabled": false,
"disabled": true,
"expanded": undefined,
"selected": undefined,
}
Expand All @@ -279,8 +279,8 @@ exports[`Component Address Book Details - test Address Book Datails - Add - snap
style={
{
"alignItems": "center",
"backgroundColor": "#18bd18",
"borderColor": "#c3c3c3",
"backgroundColor": "#5a8c5a",
"borderColor": "#5a8c5a",
"borderRadius": 10,
"borderWidth": 2,
"justifyContent": "center",
Expand Down
Loading

0 comments on commit fe8da94

Please sign in to comment.