Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/mosip/inji into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
srikanth716 committed Nov 21, 2023
2 parents 673fd33 + e8c8999 commit 8c30bca
Show file tree
Hide file tree
Showing 76 changed files with 1,046 additions and 242 deletions.
7 changes: 4 additions & 3 deletions .talismanrc
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
fileignoreconfig:
- filename: ios/Podfile.lock
checksum: cc123c3e1f04d41b394ceb16843b15c08bac3ba619ae853ff322717739761a85
checksum: cc123c3e1f04d41b394ceb16843b15c08bac3ba619ae853ff322717739761a85
- filename: package.json
checksum: fdd5905228a1afbfb004c710fd6c61adf073a12840200327c0592b76bea5e7e3
- filename: package-lock.json
checksum: 179883df6d414d82b7f54353a3a4cc75e6a681224f4b6d1831ce85de27de2726
checksum: 489ccd69f2deecedb8b2ff9a3a02d74c704dfba01fdfb6179316a9df698c4562
- filename: components/PasscodeVerify.tsx
checksum: 14654c0f038979fcd0d260170a45894a072f81e0767ca9a0e66935d33b5cc703
- filename: i18n.ts
Expand Down Expand Up @@ -80,5 +80,6 @@ fileignoreconfig:
checksum: a0686e9a5c006176fd720b84bc36ca947db1422caf65c90cd0c2d1102a9e96df
- filename: ios/fastlane/Fastfile
checksum: feea5a7f044ef6961d53e7d1e1ffb92a3e0f72761496424f6e64288e3718d605
- filename: machines/bleShare/scan/scanMachine.ts
checksum: a514c958ca3da3c5b22a1a95ad680af8f05fb22638fab79b3842aa8fcc1b4a17
version: ""

Binary file removed assets/pending_activation.png
Binary file not shown.
12 changes: 12 additions & 0 deletions components/PasscodeVerify.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ import {useTranslation} from 'react-i18next';
import {PinInput} from './PinInput';
import {hashData} from '../shared/commonUtil';
import {argon2iConfig} from '../shared/constants';
import {
getErrorEventData,
sendErrorEvent,
} from '../shared/telemetry/TelemetryUtils';
import {TelemetryConstants} from '../shared/telemetry/TelemetryConstants';

export const MAX_PIN = 6;

Expand Down Expand Up @@ -32,6 +37,13 @@ export const PasscodeVerify: React.FC<PasscodeVerifyProps> = props => {
}
}
} catch (error) {
sendErrorEvent(
getErrorEventData(
TelemetryConstants.FlowType.appLogin,
TelemetryConstants.ErrorId.mismatch,
error,
),
);
console.log('error:', error);
}
}
Expand Down
11 changes: 10 additions & 1 deletion components/VC/MosipVCItem/MosipVCItemDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,16 @@ export const MosipVCItemDetails: React.FC<
props.isBindingPending ? (
<Column style={Theme.Styles.openCardBgContainer} padding="10">
<Column margin={'0 0 4 0'} crossAlign={'flex-start'}>
<Image source={Theme.activationPending}></Image>
<Icon
name="shield-alert"
color={Theme.Colors.Icon}
size={Theme.ICON_LARGE_SIZE}
type="material-community"
containerStyle={{
marginEnd: 5,
bottom: 1,
}}
/>
<Text
testID="offlineAuthDisabledHeader"
style={{flex: 1}}
Expand Down
31 changes: 30 additions & 1 deletion components/ui/Loader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,33 @@ export const Loader: React.FC<LoaderProps> = props => {
/>
</View>
</Column>
{(props.isHintVisible || props.isBleErrorVisible) && (
<Column style={Theme.SelectVcOverlayStyles.timeoutHintContainer}>
<Text
align="center"
margin="10"
color={Theme.Colors.TimoutHintText}
size="small"
style={Theme.TextStyles.bold}>
{props.hint}
</Text>
{props.onStayInProgress && (
<Button
type="clear"
title={t('status.stayOnTheScreen')}
onPress={props.onStayInProgress}
/>
)}

{props.onRetry && (
<Button
type="clear"
title={t('status.retry')}
onPress={props.onRetry}
/>
)}
</Column>
)}
<Column style={{display: props.hint ? 'flex' : 'none'}}>
<Column style={Theme.SelectVcOverlayStyles.timeoutHintContainer}>
<Text
Expand All @@ -88,12 +114,15 @@ export const Loader: React.FC<LoaderProps> = props => {
};

export interface LoaderProps {
isVisible: boolean;
title: string;
subTitle?: string;
label?: string;
hint?: string;
onStayInProgress?: () => void;
isHintVisible?: boolean;
isBleErrorVisible?: boolean;
onCancel?: () => void;
onRetry?: () => void;
requester?: boolean;
progress?: boolean | number;
onBackdropPress?: () => void;
Expand Down
8 changes: 5 additions & 3 deletions components/ui/themes/DefaultTheme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ const Colors = {
LightOrange: '#FDF1E6',
GradientColors: ['#F59B4B', '#E86E04'],
DisabledColors: ['#C7C7C7', '#C7C7C7'],
captureIconBorder: '#F59B4B',
TimeoutHintBoxColor: '#FFF7E5',
TimeoutHintBoxBorder: '#FFF2D6',
TimoutHintText: '#8B6105',
resendCodeTimer: '#555555',
uncheckedIcon: '#DBDBDB',
Expand Down Expand Up @@ -789,7 +789,7 @@ export const DefaultTheme = {
borderColor: Colors.Orange,
},
container: {
height: 'auto',
height: 45,
flexDirection: 'row',
},
disabled: {
Expand Down Expand Up @@ -853,6 +853,8 @@ export const DefaultTheme = {
margin: 21,
paddingHorizontal: 14,
paddingVertical: 12,
borderWidth: 2,
borderColor: Colors.TimeoutHintBoxBorder,
borderRadius: 12,
},
sharedSuccessfully: {
Expand Down Expand Up @@ -1312,11 +1314,11 @@ export const DefaultTheme = {

ICON_SMALL_SIZE: 16,
ICON_MID_SIZE: 22,
ICON_LARGE_SIZE: 33,
PinIcon: require('../../../assets/pin_icon.png'),
CloseCard: require('../../../assets/card_bg.png'),
CardBackground: require('../../../assets/card_bg.png'),
OpenCard: require('../../../assets/card_bg.png'),
activationPending: require('../../../assets/pending_activation.png'),
cardFaceIcon: require('../../../assets/placeholder-photo.png'),
MosipSplashLogo: require('../../../assets/icon.png'),
MosipLogo: require('../../../assets/mosip-logo.png'),
Expand Down
33 changes: 18 additions & 15 deletions components/ui/themes/PurpleTheme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,10 @@ const Colors = {
DisabledColors: ['#C7C7C7', '#C7C7C7'],
captureIconBorder: '#F59B4B',
Purple: '#70308C',
LightPurple: '#AEA7FF',
TimeoutHintBoxColor: '#FFF7E5',
TimoutHintText: '#8B6105',
LightPurple: '#F3E2FF',
TimeoutHintBoxColor: '#FBF5FF',
TimeoutHintBoxBorder: '#FFF7E5',
TimoutHintText: '#1C1C1C',
resendCodeTimer: '#555555',
uncheckedIcon: '#DBDBDB',
};
Expand Down Expand Up @@ -530,7 +531,7 @@ export const PurpleTheme = {
height: isIOS() ? 100 : 'auto',
},
idInputBottom: {
borderBottomColor: Colors.Orange,
borderBottomColor: Colors.Purple,
borderBottomWidth: 1,
},
getId: {
Expand Down Expand Up @@ -792,7 +793,7 @@ export const PurpleTheme = {
borderColor: Colors.Purple,
},
container: {
height: 'auto',
height: 45,
flexDirection: 'row',
},
disabled: {
Expand Down Expand Up @@ -856,6 +857,8 @@ export const PurpleTheme = {
margin: 21,
paddingHorizontal: 14,
paddingVertical: 12,
borderWidth: 2,
borderColor: Colors.TimeoutHintBoxBorder,
borderRadius: 12,
},
sharedSuccessfully: {
Expand Down Expand Up @@ -1311,29 +1314,29 @@ export const PurpleTheme = {

ICON_SMALL_SIZE: 16,
ICON_MID_SIZE: 22,
ICON_LARGE_SIZE: 33,
PinIcon: require('../../../assets/pin_icon.png'),
CloseCard: require('../../../assets/card_bg.png'),
CardBackground: require('../../../assets/card_bg.png'),
OpenCard: require('../../../assets/card_bg.png'),
activationPending: require('../../../assets/pending_activation.png'),
cardFaceIcon: require('../../../purpleAssets/profile_icon.png'),
MosipSplashLogo: require('../../../assets/icon.png'),
MosipLogo: require('../../../assets/mosip-logo.png'),
CameraFlipIcon: require('../../../assets/camera-flip-icon.png'),
ImageCaptureButton: require('../../../assets/capture-button.png'),
CameraFlipIcon: require('../../../purpleAssets/camera-flip-icon.png'),
ImageCaptureButton: require('../../../purpleAssets/capture-button.png'),
DomainWarningLogo: require('../../../assets/domain-warning.png'),
WarningLogo: require('../../../assets/warningLogo.png'),
OtpLogo: require('../../../purpleAssets/otp-mobile-logo.png'),
SuccessLogo: require('../../../assets/success-logo.png'),
ReceiveCardIcon: require('../../../assets/receive-card-icon.png'),
ReceivedCardsIcon: require('../../../assets/received-cards-icon.png'),
DigitalIdentityLogo: require('../../../assets/digital-identity-icon.png'),
ReceiveCardIcon: require('../../../purpleAssets/receive-card-icon.png'),
ReceivedCardsIcon: require('../../../purpleAssets/received-cards-icon.png'),
DigitalIdentityLogo: require('../../../purpleAssets/digital-identity-icon.png'),
InjiLogoWhite: require('../../../assets/inji-logo-white.png'),
InjiProgressingLogo: require('../../../assets/progressing-logo.png'),
LockIcon: require('../../../assets/lock-icon.png'),
InjiHomeLogo: require('../../../assets/inji-home-logo.png'),
InjiProgressingLogo: require('../../../purpleAssets/progressing-logo.png'),
LockIcon: require('../../../purpleAssets/lock-icon.png'),
InjiHomeLogo: require('../../../purpleAssets/inji-home-logo.png'),
MagnifierZoom: require('../../../assets/magnifier-zoom.png'),
HelpIcon: require('../../../assets/help-icon.png'),
HelpIcon: require('../../../purpleAssets/help-icon.png'),
sharingIntro: require('../../../assets/intro-secure-sharing.png'),
walletIntro: require('../../../assets/intro-wallet-binding.png'),
IntroScanner: require('../../../assets/intro-scanner.png'),
Expand Down
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'react-native-gesture-handler';
import { registerRootComponent } from 'expo';
import 'react-native-url-polyfill/auto'; // https://stackoverflow.com/a/75787849
import {registerRootComponent} from 'expo';

import App from './App';

Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,17 @@

import io.appium.java_client.AppiumDriver;
import io.appium.java_client.pagefactory.AndroidFindBy;
import io.appium.java_client.pagefactory.iOSXCUITFindBy;
import org.openqa.selenium.WebElement;

public class AddNewCardPage extends BasePage{

@AndroidFindBy(accessibility = "issuersScreenHeader")
@iOSXCUITFindBy(accessibility = "title")
private WebElement addNewCardHeader;

@AndroidFindBy(accessibility = "issuerHeading-Mosip")
@iOSXCUITFindBy(accessibility = "issuerHeading-Mosip")
private WebElement downloadViaUin;
public AddNewCardPage(AppiumDriver driver) {
super(driver);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
public class AppUnlockMethodPage extends BasePage {

@AndroidFindBy(accessibility = "selectAppUnlockMethod")
@iOSXCUITFindBy(accessibility = "Select App Unlock Method")
@iOSXCUITFindBy(accessibility = "selectAppUnlockMethod")
private WebElement selectAppUnlockMethodText;

@AndroidFindBy(accessibility = "usePasscode")
@iOSXCUITFindBy(iOSClassChain = "**/XCUIElementTypeButton[`label == \"Use Passcode\"`]")
@iOSXCUITFindBy(accessibility = "usePasscode")
private WebElement usePasscodeButton;

public AppUnlockMethodPage(AppiumDriver driver) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
public class ChooseLanguagePage extends BasePage {

@AndroidFindBy(accessibility = "chooseLanguage")
@iOSXCUITFindBy(accessibility = "Choose Language")
@iOSXCUITFindBy(accessibility = "chooseLanguage")
private WebElement chooseLanguageText;

@AndroidFindBy(accessibility = "savePreference")
@iOSXCUITFindBy(iOSClassChain = "**/XCUIElementTypeButton[`label == \"Save Preference\"`]")
@iOSXCUITFindBy(accessibility = "savePreference")
private WebElement savePreferenceText;

public ChooseLanguagePage(AppiumDriver driver) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@

public class ConfirmPasscode extends BasePage {

@iOSXCUITFindBy(accessibility = "Confirm passcode")
@iOSXCUITFindBy(accessibility = "confirmPasscode")
@AndroidFindBy(xpath = "//*[contains(@text,'Confirm passcode')]")
private WebElement confirmPasscode;


@AndroidFindBy(xpath = "//*[contains(@text,'Passcode did not match.')]")
@iOSXCUITFindBy(iOSClassChain = "**/XCUIElementTypeStaticText[`label == \"Passcode did not match.\"`]")
private WebElement invalidPasscode;

public ConfirmPasscode(AppiumDriver driver) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,42 +8,55 @@

public class DetailedVcViewPage extends BasePage{
@AndroidFindBy(xpath = "//*[contains(@text,'ID Details')]")
@iOSXCUITFindBy(iOSClassChain = "**/XCUIElementTypeStaticText[`label == \"ID Details\"`]")
private WebElement detailedVcViewPageTitle;

@AndroidFindBy(accessibility = "fullNameValue")
@iOSXCUITFindBy(accessibility = "fullNameValue")
private WebElement fullNameValue;

@AndroidFindBy(accessibility = "genderValue")
@iOSXCUITFindBy(accessibility = "genderValue")
private WebElement genderValue;

@AndroidFindBy(accessibility = "dateOfBirthValue")
@iOSXCUITFindBy(accessibility = "dateOfBirthValue")
private WebElement dateOfBirthValue;

@AndroidFindBy(accessibility = "nationalCard")
@iOSXCUITFindBy(accessibility = "nationalCard")
private WebElement idTypeValue;

@AndroidFindBy(accessibility = "valid")
@iOSXCUITFindBy(accessibility = "valid")
private WebElement statusValue;

@AndroidFindBy(accessibility = "uinNumber")
@iOSXCUITFindBy(accessibility = "uinNumber")
private WebElement uinNumberValue;

@AndroidFindBy(accessibility = "generatedOnValue")
@iOSXCUITFindBy(accessibility = "generatedOnValue")
private WebElement generatedOnValue;

@AndroidFindBy(accessibility = "phoneNumberValue")
@iOSXCUITFindBy(accessibility = "phoneNumberValue")
private WebElement phoneNumberValue;

@AndroidFindBy(accessibility = "emailIdValue")
@iOSXCUITFindBy(accessibility = "emailIdValue")
private WebElement emailIdValue;

@AndroidFindBy(accessibility = "enableVerification")
@iOSXCUITFindBy(accessibility = "enableVerification")
private WebElement activateButton;

@AndroidFindBy(accessibility = "profileAuthenticated")
@iOSXCUITFindBy(accessibility = "profileAuthenticated")
private WebElement profileAuthenticated;

@AndroidFindBy(accessibility = "close")
@iOSXCUITFindBy(accessibility = "close")
private WebElement crossIcon;

public DetailedVcViewPage(AppiumDriver driver) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

public class EnterYourPasscodePage extends BasePage {

@iOSXCUITFindBy(accessibility = "Enter your passcode")
@iOSXCUITFindBy(accessibility = "enterPasscode")
@AndroidFindBy(xpath = "//*[contains(@text,'Enter your passcode')]")
private WebElement enterYourPasscodeText;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
public class HassleFreeAuthenticationPage extends BasePage {

@AndroidFindBy(xpath = "//*[contains(@text,'Hassle free authentication')]")
@iOSXCUITFindBy(accessibility = "Hassle free authentication")
@iOSXCUITFindBy(iOSNsPredicate = "label == \"Hassle free authentication\"")
private WebElement hassleFreeAuthenticationText;

@AndroidFindBy(xpath = "(//*[@class='android.widget.TextView'])[3]")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
public class HelpPage extends BasePage {

@AndroidFindBy(accessibility = "helpScreen")
@iOSXCUITFindBy(iOSClassChain = "**/XCUIElementTypeStaticText[`label == \"Help\"`]")
@iOSXCUITFindBy(accessibility = "helpScreen")
private WebElement helpText;

@AndroidFindBy(xpath = "//*[@resource-id=\"iconIcon\"]")
@iOSXCUITFindBy(iOSClassChain = "**/XCUIElementTypeOther[`label == \"\uE5CD\"`][2]")
@iOSXCUITFindBy(accessibility = "close")
private WebElement crossIcon;

@AndroidFindBy(uiAutomator = "new UiScrollable(new UiSelector()).scrollIntoView(text(\"How to view activity logs?\"));")
Expand Down
Loading

0 comments on commit 8c30bca

Please sign in to comment.