Skip to content

Commit d5e6dcc

Browse files
committed
fix test names
1 parent 90dc878 commit d5e6dcc

2 files changed

Lines changed: 18 additions & 4 deletions

File tree

app/components/UI/Stake/Views/StakeConfirmationView/StakeConfirmationView.test.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,15 @@ describe('StakeConfirmationView', () => {
168168
expect(getByText(strings('stake.stake'))).toBeOnTheScreen();
169169
});
170170

171-
it('calls navigation.goBack and tracks STAKE_CONFIRMATION_BACK_CLICKED on back press', () => {
171+
it('calls navigation.goBack on back press', () => {
172+
const { getByTestId } = renderView();
173+
174+
fireEvent.press(getByTestId(STAKE_CONFIRMATION_VIEW_BACK_BUTTON_TEST_ID));
175+
176+
expect(mockGoBack).toHaveBeenCalledTimes(1);
177+
});
178+
179+
it('tracks STAKE_CONFIRMATION_BACK_CLICKED on back press', () => {
172180
const { getByTestId } = renderView();
173181

174182
fireEvent.press(getByTestId(STAKE_CONFIRMATION_VIEW_BACK_BUTTON_TEST_ID));
@@ -181,6 +189,5 @@ describe('StakeConfirmationView', () => {
181189
location: EVENT_LOCATIONS.STAKE_CONFIRMATION_VIEW,
182190
});
183191
expect(mockTrackEvent).toHaveBeenCalledTimes(1);
184-
expect(mockGoBack).toHaveBeenCalledTimes(1);
185192
});
186193
});

app/components/UI/Stake/Views/UnstakeConfirmationView/UnstakeConfirmationView.test.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,15 @@ describe('UnstakeConfirmationView', () => {
153153
expect(getByText(strings('stake.unstake'))).toBeOnTheScreen();
154154
});
155155

156-
it('calls navigation.goBack and tracks UNSTAKE_CONFIRMATION_BACK_CLICKED on back press', () => {
156+
it('calls navigation.goBack on back press', () => {
157+
const { getByTestId } = renderView();
158+
159+
fireEvent.press(getByTestId(UNSTAKE_CONFIRMATION_VIEW_BACK_BUTTON_TEST_ID));
160+
161+
expect(mockGoBack).toHaveBeenCalledTimes(1);
162+
});
163+
164+
it('tracks UNSTAKE_CONFIRMATION_BACK_CLICKED on back press', () => {
157165
const { getByTestId } = renderView();
158166

159167
fireEvent.press(getByTestId(UNSTAKE_CONFIRMATION_VIEW_BACK_BUTTON_TEST_ID));
@@ -166,6 +174,5 @@ describe('UnstakeConfirmationView', () => {
166174
location: EVENT_LOCATIONS.UNSTAKE_CONFIRMATION_VIEW,
167175
});
168176
expect(mockTrackEvent).toHaveBeenCalledTimes(1);
169-
expect(mockGoBack).toHaveBeenCalledTimes(1);
170177
});
171178
});

0 commit comments

Comments
 (0)