Skip to content

Commit

Permalink
Merge pull request #1135 from tw-mosip/internal-release-03-01-2024
Browse files Browse the repository at this point in the history
[Release 03-01-2024] - Fix UI issues and device specific issues
  • Loading branch information
vijay151096 authored Jan 3, 2024
2 parents 4e5ca88 + bb4f2c6 commit 6d661ef
Show file tree
Hide file tree
Showing 87 changed files with 2,185 additions and 920 deletions.
6 changes: 4 additions & 2 deletions .talismanrc
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ fileignoreconfig:
- filename: shared/telemetry/TelemetryUtils.js
checksum: ffe9aac2dcc590b98b0d588885c088eff189504ade653a77f74b67312bfd27ad
- filename: shared/fileStorage.ts
checksum: 07cb337dc1d5b0f0eef56270ac4f4f589260ee5e490183c024cf98a2aeafb139
checksum: f86dc7aa4a69e7109310e7ab5529a8599f38f15eb79f3f4da545aceaaf90d731
- filename: shared/storage.ts
checksum: c8d874aa373bdf526bf59192139822f56915e702ef673bac4e0d7549b0fea3d0
checksum: c31270346f2ef717a31168a93d0311ce6f925434eb613ec7cf86553222630cdb
- filename: screens/Issuers/IssuersScreen.tsx
checksum: 9c53e3770dbefe26e0de67ee4b7d5cc9c52d9823cbb136a1a5104dcb0a101071
- filename: ios/Podfile.lock
Expand Down Expand Up @@ -99,3 +99,5 @@ fileignoreconfig:
checksum: a25f155bcbbae7ab09563637c23771f7349738f12a6ddc8ae71c29c61ed535af
- filename: .github/workflows/internal-build.yml
checksum: e9b85cf0405d777faee9345269f6f9eb861ed205728dca63cf27a5db79c876a7
- filename: assets/Issuer_search_clearing_button.svg
checksum: f4e8a054fc4168e08bc9e9fe3e644cebabacdfc31ef0cbe36dd281766f47df5e
2 changes: 2 additions & 0 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
<uses-permission android:name="android.permission.BLUETOOTH_SCAN" android:usesPermissionFlags="neverForLocation"/>
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE"/>
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.USE_BIOMETRIC"/>
<uses-permission android:name="android.permission.USE_FINGERPRINT"/>
Expand Down
4 changes: 1 addition & 3 deletions components/HelpScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@ import {useTranslation} from 'react-i18next';
import {Pressable} from 'react-native';
import {Modal} from './ui/Modal';
import {ScrollView} from 'react-native-gesture-handler';
import {MainRouteProps} from '../routes/main';
import {Column, Text} from './ui';
import {Theme} from './ui/styleUtils';

export const HelpScreen: React.FC<HelpScreenProps & MainRouteProps> = props => {
export const HelpScreen: React.FC<HelpScreenProps> = props => {
const {t} = useTranslation('HelpScreen');

const [showHelpPage, setShowHelpPage] = useState(false);
Expand Down Expand Up @@ -75,6 +74,5 @@ export const HelpScreen: React.FC<HelpScreenProps & MainRouteProps> = props => {
};

interface HelpScreenProps {
testID?: string;
triggerComponent: React.ReactElement;
}
35 changes: 21 additions & 14 deletions components/VC/MosipVCItem/MosipVCItemDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export const MosipVCItemDetails: React.FC<
resizeMode="stretch"
style={Theme.Styles.openCardBgContainer}
source={Theme.OpenCard}>
<Row align="space-between" padding="10" margin="0 10 0 8">
<Row padding="10" margin="0 10 0 8">
<Column align="space-evenly" crossAlign="center">
<Image
source={getProfileImage(
Expand All @@ -98,7 +98,7 @@ export const MosipVCItemDetails: React.FC<

<Column margin="20 0 0 0">{issuerLogo}</Column>
</Column>
<Column align="space-evenly" padding="10">
<Column padding="10">
<Column>
<Text
testID="fullNameTitle"
Expand All @@ -118,8 +118,12 @@ export const MosipVCItemDetails: React.FC<
)}
</Text>
</Column>
<Row>
<Column>
<Row
align="space-between"
style={{
width: Dimensions.get('screen').width * 0.5,
}}>
<Column align="space-evenly">
<Column margin="20 0 0 0">
<Text
testID="gender"
Expand Down Expand Up @@ -192,11 +196,12 @@ export const MosipVCItemDetails: React.FC<
</Text>
</Column>
) : null}
<Column margin="30 0 0 0">
<Column margin="25 0 -5 0">
<Text
testID="generatedOnTitle"
weight="regular"
size="smaller"
style={{maxWidth: 100}}
color={Theme.Colors.DetailsLabel}>
{t('generatedOn')}
</Text>
Expand All @@ -209,11 +214,11 @@ export const MosipVCItemDetails: React.FC<
</Text>
</Column>
</Column>
<Column margin="0 0 0 38">
<Column margin="20 0 0 0">
<Column align="space-evenly" margin="0 0 0 30">
<Column margin="25 0 0 0">
<Text
testID="dateOfBirth"
style={{maxWidth: 121}}
style={{maxWidth: 130}}
weight="regular"
size="smaller"
color={Theme.Colors.DetailsLabel}>
Expand All @@ -227,8 +232,7 @@ export const MosipVCItemDetails: React.FC<
{formattedDateOfBirth()}
</Text>
</Column>
<Column
style={{marginTop: Dimensions.get('window').height * 0.04}}>
<Column margin="25 0 0 0">
<Text
testID="status"
weight="regular"
Expand All @@ -244,19 +248,22 @@ export const MosipVCItemDetails: React.FC<
{props.vc?.isVerified && <VerifiedIcon />}
<Text
testID="valid"
style={{maxWidth: 63}}
style={{maxWidth: 80}}
weight="semibold"
size="smaller"
color={Theme.Colors.Details}>
{t('valid')}
</Text>
</Row>
</Column>
<Column
style={{marginTop: Dimensions.get('window').height * 0.1}}>
<Column margin="25 0 0 0">
<Text>{''}</Text>
<Text>{''}</Text>
</Column>
<Column margin="25 0 0 0">
<Text
testID="phoneNumber"
style={{maxWidth: 80}}
style={{maxWidth: 100}}
weight="regular"
size="smaller"
color={Theme.Colors.DetailsLabel}>
Expand Down
31 changes: 10 additions & 21 deletions components/ui/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const Modal: React.FC<ModalProps> = props => {
<Column fill safe>
<Row elevation={props.headerElevation}>
<View style={props.modalStyle}>
{props.headerRight ? (
{props.headerRight && !props.arrowLeft ? (
<Icon
{...testIDProps('closeModal')}
name={I18nManager.isRTL ? 'chevron-right' : 'chevron-left'}
Expand All @@ -30,25 +30,14 @@ export const Modal: React.FC<ModalProps> = props => {
/>
) : null}
{props.arrowLeft ? (
I18nManager.isRTL ? (
<Icon
{...testIDProps('arrowLeft')}
name="arrow-right"
type="material-community"
onPress={props.onDismiss}
containerStyle={Theme.Styles.backArrowContainer}
color={Theme.Colors.Icon}
/>
) : (
<Icon
{...testIDProps('arrowLeft')}
name="arrow-left"
type="material-community"
onPress={props.onDismiss}
containerStyle={Theme.Styles.backArrowContainer}
color={Theme.Colors.Icon}
/>
)
<Icon
{...testIDProps('arrowLeft')}
name={I18nManager.isRTL ? 'arrow-right' : 'arrow-left'}
type="material-community"
onPress={props.onDismiss}
containerStyle={Theme.Styles.backArrowContainer}
color={Theme.Colors.Icon}
/>
) : null}
<Row
fill
Expand Down Expand Up @@ -119,6 +108,6 @@ export interface ModalProps {
headerLabelColor?: string;
headerRight?: React.ReactElement;
headerLeft?: React.ReactElement;
arrowLeft?: React.ReactElement;
arrowLeft?: boolean;
onShow?: () => void;
}
4 changes: 3 additions & 1 deletion components/ui/SearchBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {Theme} from './styleUtils';

export const SearchBar = (props: SearchBarProps) => {
return (
<Row style={Theme.SearchBarStyles.searchBarContainer}>
<Row>
<Icon
testID={props.searchIconTestID}
name="search"
Expand All @@ -19,6 +19,7 @@ export const SearchBar = (props: SearchBarProps) => {
style={Theme.SearchBarStyles.searchBar}
placeholder={props.placeholder}
value={props.search}
onFocus={props.onFocus}
onChangeText={searchText => props.onChangeText(searchText)}
onLayout={props.onLayout}
/>
Expand All @@ -31,6 +32,7 @@ interface SearchBarProps {
searchBarTestID: string;
search: string;
placeholder: string;
onFocus: () => void;
onChangeText: (searchText: string) => void;
onLayout: () => void;
}
13 changes: 10 additions & 3 deletions components/ui/themes/DefaultTheme.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable sonarjs/no-duplicate-string */
import {Dimensions, StyleSheet, ViewStyle} from 'react-native';
import {Dimensions, I18nManager, StyleSheet, ViewStyle} from 'react-native';
import {Spacing} from '../styleUtils';
import {isIOS} from '../../../shared/constants';

Expand Down Expand Up @@ -786,18 +786,25 @@ export const DefaultTheme = {
},
}),
SearchBarStyles: StyleSheet.create({
idleSearchBarBottomLine: {
alignItems: 'center',
borderBottomWidth: 1,
borderBottomColor: Colors.Gray40,
},
searchBarContainer: {
alignItems: 'center',
borderBottomWidth: 1,
borderBottomColor: Colors.Gray50,
borderBottomColor: Colors.Orange,
},
searchIcon: {
justifyContent: 'center',
height: Dimensions.get('window').height * 0.055,
width: Dimensions.get('window').width * 0.1,
},
searchBar: {
textAlign: I18nManager.isRTL ? 'right' : 'left',
height: Dimensions.get('window').height * 0.055,
width: Dimensions.get('window').width * 0.84,
width: Dimensions.get('window').width * 0.8,
},
}),
ButtonStyles: StyleSheet.create({
Expand Down
13 changes: 10 additions & 3 deletions components/ui/themes/PurpleTheme.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable sonarjs/no-duplicate-string */
import {Dimensions, StyleSheet, ViewStyle} from 'react-native';
import {Dimensions, I18nManager, StyleSheet, ViewStyle} from 'react-native';
import {Spacing} from '../styleUtils';
import {isIOS} from '../../../shared/constants';

Expand Down Expand Up @@ -789,18 +789,25 @@ export const PurpleTheme = {
},
}),
SearchBarStyles: StyleSheet.create({
idleSearchBarBottomLine: {
alignItems: 'center',
borderBottomWidth: 1,
borderBottomColor: Colors.Gray40,
},
searchBarContainer: {
alignItems: 'center',
borderBottomWidth: 1,
borderBottomColor: Colors.Gray50,
borderBottomColor: Colors.Purple,
},
searchIcon: {
justifyContent: 'center',
height: Dimensions.get('window').height * 0.055,
width: Dimensions.get('window').width * 0.1,
},
searchBar: {
textAlign: I18nManager.isRTL ? 'right' : 'left',
height: Dimensions.get('window').height * 0.055,
width: Dimensions.get('window').width * 0.84,
width: Dimensions.get('window').width * 0.8,
},
}),
ButtonStyles: StyleSheet.create({
Expand Down
28 changes: 28 additions & 0 deletions injitest/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# inji automation

## Overview
Automated scenario for ios & android covering positive and negative scenarios.

## Setup
###for appium setup follow `https://appium.io/docs/en/2.2/quickstart/install/`


## Build
1. Build jar `mvn clean package -DskipTests=true`
2. jar will be in target
3.use `zip-with-dependencies` for deviceFarmRun,

## Configurations
1. Update `Config>>kernal.properites` to change the environment.
2.Update below keys from `src/main/java>>inji.utils>>TestDataReader.java`
`uin`,`uin2`,`aid` for env changes.
3. Update `Config>>config.properties`,update value for this keys `nodePath`,`appiumServerExecutable`.
4. Update `Config>>DesiredCapabilies.json`update value for this keys `appium:udid`,`appium:app`.
5.If the run is on devicefarm also update `isDeviceFarmRun` as true.
6.To run it in IDE run `testng.xml` file.


## Reports
This project reports will be in `test-output>>emailableReports`


This file was deleted.

4 changes: 2 additions & 2 deletions injitest/src/main/java/inji/driver/DriverManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ private static AppiumDriver getIosDriver(Boolean isDeviceFarmRun) {
if (isDeviceFarmRun) {
DesiredCapabilities desiredCapabilities = new DesiredCapabilities();
try {
appiumDriver.set(new AndroidDriver(new URL("http://127.0.0.1:4723/wd/hub"), desiredCapabilities));
appiumDriver.set(new IOSDriver(new URL("http://127.0.0.1:4723/wd/hub"), desiredCapabilities));
} catch (MalformedURLException e) {
throw new RuntimeException(e);
}
} else {
DesiredCapabilities desiredCapabilities = CapabilitiesReader.getDesiredCapabilities("iosDevice", "src/main/resources/DesiredCapabilities.json");
appiumDriver.set(new AndroidDriver(service.getUrl(), desiredCapabilities));
appiumDriver.set(new IOSDriver(service.getUrl(), desiredCapabilities));
}
return appiumDriver.get();
}
Expand Down
14 changes: 10 additions & 4 deletions injitest/src/main/java/inji/pages/AboutInjiPage.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,32 @@

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 AboutInjiPage extends BasePage {
@AndroidFindBy(accessibility = "aboutInji")
@iOSXCUITFindBy(accessibility = "aboutInji")
private WebElement aboutInjiHeader;

@AndroidFindBy(uiAutomator = "new UiSelector().textContains(\"Copy\")")
@AndroidFindBy(accessibility = "CopyText")
@iOSXCUITFindBy(accessibility = "CopyText")
private WebElement copy;

@AndroidFindBy(uiAutomator = "new UiSelector().textContains(\"Copied\")")
@AndroidFindBy(uiAutomator = "CopyText")
@iOSXCUITFindBy(accessibility = "CopiedText")
private WebElement copied;

@AndroidFindBy(uiAutomator = "new UiSelector().resourceId(\"iconIcon\")")
@AndroidFindBy(accessibility = "arrowLeft")
@iOSXCUITFindBy(accessibility = "arrowLeft")
private WebElement backButton;

public AboutInjiPage(AppiumDriver driver) {
super(driver);
}

public boolean isaboutInjiHeaderDisplayed() {
public boolean isAboutInjiHeaderDisplayed() {
return this.isElementDisplayed(aboutInjiHeader, "ABOUT INJI");
}

Expand Down
Loading

0 comments on commit 6d661ef

Please sign in to comment.