mirror of
https://github.com/mosip/inji-wallet.git
synced 2026-01-09 05:27:57 -05:00
[INJIMOB-3301]: Fix for history page - close icon test id (#1968)
* [INJIMOB-3301]: Fix for history page - close icon test id Signed-off-by: BalachandarG <balachandar.g@thoughtworks.com> * [INJIMOB-3301]: Fix in automation side for testId `close` Signed-off-by: BalachandarG <balachandar.g@thoughtworks.com> --------- Signed-off-by: BalachandarG <balachandar.g@thoughtworks.com>
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
import React from 'react';
|
||||
import {I18nManager, Modal as RNModal, View} from 'react-native';
|
||||
import {
|
||||
I18nManager,
|
||||
Modal as RNModal,
|
||||
TouchableOpacity,
|
||||
View,
|
||||
} from 'react-native';
|
||||
import {Icon} from 'react-native-elements';
|
||||
import {Column, Row, Text} from '.';
|
||||
import {useSendVcScreen} from '../../screens/Scan/SendVcScreenController';
|
||||
@@ -9,23 +14,23 @@ import testIDProps from '../../shared/commonUtil';
|
||||
import {BackButton} from './backButton/BackButton';
|
||||
|
||||
export const Modal: React.FC<ModalProps> = ({
|
||||
testID,
|
||||
isVisible,
|
||||
requester,
|
||||
showClose = true,
|
||||
showHeader = true,
|
||||
modalStyle = Theme.ModalStyles.defaultModal,
|
||||
onDismiss,
|
||||
headerTitle,
|
||||
headerElevation,
|
||||
headerLabel,
|
||||
headerLabelColor,
|
||||
headerRight,
|
||||
headerLeft,
|
||||
arrowLeft,
|
||||
onShow,
|
||||
children,
|
||||
}) => {
|
||||
testID,
|
||||
isVisible,
|
||||
requester,
|
||||
showClose = true,
|
||||
showHeader = true,
|
||||
modalStyle = Theme.ModalStyles.defaultModal,
|
||||
onDismiss,
|
||||
headerTitle,
|
||||
headerElevation,
|
||||
headerLabel,
|
||||
headerLabelColor,
|
||||
headerRight,
|
||||
headerLeft,
|
||||
arrowLeft,
|
||||
onShow,
|
||||
children,
|
||||
}) => {
|
||||
const controller = useSendVcScreen();
|
||||
|
||||
return (
|
||||
@@ -83,13 +88,11 @@ export const Modal: React.FC<ModalProps> = ({
|
||||
{headerRight != null ||
|
||||
arrowLeft ||
|
||||
(showClose && (
|
||||
<Icon
|
||||
<TouchableOpacity
|
||||
{...testIDProps('close')}
|
||||
name="close"
|
||||
onPress={onDismiss}
|
||||
color={Theme.Colors.Details}
|
||||
size={27}
|
||||
/>
|
||||
onPress={onDismiss}>
|
||||
<Icon name="close" color={Theme.Colors.Details} size={27} />
|
||||
</TouchableOpacity>
|
||||
))}
|
||||
{headerRight && headerRight}
|
||||
</View>
|
||||
@@ -118,4 +121,4 @@ export interface ModalProps {
|
||||
arrowLeft?: boolean;
|
||||
onShow?: () => void;
|
||||
children?: React.ReactNode;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,9 +31,9 @@ public class HomePage extends BasePage {
|
||||
@AndroidFindBy(accessibility = "ellipsis")
|
||||
private WebElement moreOptionsButton;
|
||||
|
||||
@iOSXCUITFindBy(accessibility = "iconIcon")
|
||||
@AndroidFindBy(accessibility = "iconIcon")
|
||||
private WebElement iconIconButton;
|
||||
@iOSXCUITFindBy(accessibility = "close")
|
||||
@AndroidFindBy(accessibility = "close")
|
||||
private WebElement closeButton;
|
||||
|
||||
@iOSXCUITFindBy(xpath = "(//XCUIElementTypeOther[@name=\"ellipsis\"])[2]")
|
||||
@AndroidFindBy(xpath = "(//android.view.ViewGroup[@content-desc=\"ellipsis\"])[2]")
|
||||
@@ -828,7 +828,7 @@ public class HomePage extends BasePage {
|
||||
}
|
||||
|
||||
public void clickOnCrossIconButton() {
|
||||
clickOnElement(iconIconButton);
|
||||
clickOnElement(closeButton);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user