Skip to content

Commit

Permalink
Update modal to bottomsheet
Browse files Browse the repository at this point in the history
  • Loading branch information
SamuelSalas committed Oct 31, 2024
1 parent b1af72c commit ac25a3b
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { useNavigation } from '@react-navigation/native';
import Text from '../../../../Base/Text';
import { useDispatch } from 'react-redux';
import { setShowFiatOnTestnets } from '../../../../../../app/actions/settings';
import { FiatOnTestnetsModalSelectorsIDs } from '../../../../../../e2e/selectors/Settings/Advanced/FiatOnTestnetsModal.selectors';
import { FiatOnTestnetsBottomSheetSelectorsIDs } from '../../../../../../e2e/selectors/Settings/Advanced/FiatOnTestnetsBottomSheet.selectors';
import Routes from '../../../../../constants/navigation/Routes';

const FiatOnTestnetsFriction = () => {
Expand Down Expand Up @@ -63,7 +63,7 @@ const FiatOnTestnetsFriction = () => {
</Text>
<View style={styles.buttonsContainer}>
<Button
testID={FiatOnTestnetsModalSelectorsIDs.CANCEL_BUTTON}
testID={FiatOnTestnetsBottomSheetSelectorsIDs.CANCEL_BUTTON}
variant={ButtonVariants.Secondary}
width={ButtonWidthTypes.Full}
size={ButtonSize.Lg}
Expand All @@ -74,7 +74,7 @@ const FiatOnTestnetsFriction = () => {
onPress={() => sheetRef.current?.onCloseBottomSheet()}
/>
<Button
testID={FiatOnTestnetsModalSelectorsIDs.CONTINUE_BUTTON}
testID={FiatOnTestnetsBottomSheetSelectorsIDs.CONTINUE_BUTTON}
variant={ButtonVariants.Primary}
width={ButtonWidthTypes.Full}
size={ButtonSize.Lg}
Expand Down
17 changes: 17 additions & 0 deletions e2e/pages/Settings/Advanced/FiatOnTestnetsBottomSheet.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { FiatOnTestnetsBottomSheetSelectorsIDs } from '../../../selectors/Settings/Advanced/FiatOnTestnetsBottomSheet.selectors';
import Gestures from '../../../utils/Gestures';
import Matchers from '../../../utils/Matchers';

class FiatOnTestnetsBottomSheet {
get continueButton() {
return Matchers.getElementByID(
FiatOnTestnetsBottomSheetSelectorsIDs.CONTINUE_BUTTON,
);
}

async tapContinueButton() {
await Gestures.waitAndTap(this.continueButton);
}
}

export default new FiatOnTestnetsBottomSheet();
17 changes: 0 additions & 17 deletions e2e/pages/Settings/Advanced/FiatOnTestnetsModal.js

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const FiatOnTestnetsModalSelectorsIDs = {
export const FiatOnTestnetsBottomSheetSelectorsIDs = {
CANCEL_BUTTON: 'cancel-button',
CONTINUE_BUTTON: 'continue-button',
};
4 changes: 2 additions & 2 deletions e2e/specs/settings/fiat-on-testnets.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import NetworkListModal from '../../pages/Network/NetworkListModal';
import WalletView from '../../pages/wallet/WalletView';
import NetworkEducationModal from '../../pages/Network/NetworkEducationModal';
import AdvancedSettingsView from '../../pages/Settings/AdvancedView';
import FiatOnTestnetsModal from '../../pages/Settings/Advanced/FiatOnTestnetsModal.js';
import FiatOnTestnetsBottomSheet from '../../pages/Settings/Advanced/FiatOnTestnetsBottomSheet.js';
import Assertions from '../../utils/Assertions.js';
import TestHelpers from '../../helpers.js';

Expand Down Expand Up @@ -50,7 +50,7 @@ describe(SmokeAssets('Fiat On Testnets Setting'), () => {
await SettingsView.tapAdvancedTitle();
await AdvancedSettingsView.scrollToShowFiatOnTestnetsToggle();
await AdvancedSettingsView.tapShowFiatOnTestnetsSwitch();
await FiatOnTestnetsModal.tapContinueButton();
await FiatOnTestnetsBottomSheet.tapContinueButton();

// Verify fiat values are displayed
await TabBarComponent.tapWallet();
Expand Down

0 comments on commit ac25a3b

Please sign in to comment.