Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/mosip/inji into inji-536…
Browse files Browse the repository at this point in the history
…-check-status-failed-while-downloading-vc
  • Loading branch information
srikanth716 committed Nov 23, 2023
2 parents 67375d7 + 76a0948 commit ca1824b
Show file tree
Hide file tree
Showing 79 changed files with 1,923 additions and 254 deletions.
40 changes: 38 additions & 2 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,7 +80,43 @@ fileignoreconfig:
checksum: a0686e9a5c006176fd720b84bc36ca947db1422caf65c90cd0c2d1102a9e96df
- filename: ios/fastlane/Fastfile
checksum: feea5a7f044ef6961d53e7d1e1ffb92a3e0f72761496424f6e64288e3718d605
- filename: machines/bleShare/scan/scanMachine.ts
checksum: a514c958ca3da3c5b22a1a95ad680af8f05fb22638fab79b3842aa8fcc1b4a17
version: ""
- filename: locales/spa.json
checksum: 8dc09111bbff5df996703d6bf843f5a2f51bd327014009d12ab492ecfc58dd77
version: ""
- filename: machines/bleShare/scan/scanMachine.ts
checksum: 399f08e25bfa9e25e6505801f2fbc94c20779cbad5010392275d0cd21824b3ac
- filename: package-lock.json
checksum: d1586de91f5118385740f3cd0db39c199ec069d7bd1d5fc8598673ac60c85f0f
- filename: injitest/src/main/java/io/mosip/test/mob/inji/testcases/ChangeLanguageTest.java
checksum: 479d372f179d96529956cad1f8a4c593874e4da8b3bebc3e7d972cf686819b9d
- filename: injitest/src/main/java/io/mosip/test/mob/inji/pages/CredentialRegistryPage.java
checksum: eb9fbe80e519f963fba2da13b2e26c41a1f4e469b6e2e39ef2916948a1bc82b1
- filename: injitest/src/main/java/io/mosip/test/mob/inji/testcases/DeletingVcTest.java
checksum: f2180f64a09311b7f1dc32e22242486e15938763e87733d08052ad86883f21e9
- filename: injitest/src/main/java/io/mosip/test/mob/inji/testcases/UnlockWithPasscodeTest.java
checksum: 8d518d68fd627f6bfd3f6bbbd0a90b3c5635d7e4eeb0caaf359b2bb109424aa5
- filename: injitest/src/main/java/io/mosip/test/mob/inji/testcases/ReceiveCardTest.java
checksum: 81db2472cdf5b150539de491083c08f1011dfde213563ced6e071c7afd8ab2be
- filename: injitest/src/main/java/io/mosip/test/mob/inji/testcases/VcDownloadAndVerifyUsingVidTest.java
checksum: 733b9cb60b804cb7d1e09de6e58c316c0c72cd2bf2e9d68114689bbcf26108f8
- filename: injitest/src/main/java/io/mosip/test/mob/inji/testcases/CredentialRegistryTest.java
checksum: 8f9ae584507b64407257ac7ca05c89eed74d3ceb3a8139d69e3fb19543055da3
- filename: injitest/src/main/java/io/mosip/test/mob/inji/testcases/NoNetworkAndroidTest.java
checksum: 7af40c9d3f0f2485cfddba32f899c3c7dcfa6aeadbc9529858dece8d4576286d
- filename: injitest/src/main/java/io/mosip/test/mob/inji/testcases/AboutInjiTest.java
checksum: 8085f083e51569b242d5cad7681f870181196e479285ec0a8f5528b99f12efd2
- filename: injitest/src/main/java/io/mosip/test/mob/inji/testcases/VerifyWelcomePagesTest.java
checksum: 570e61a37b646d5c5c0ebde1936add37a0dd5b0a6d7715fca48bba5329a282a2
- filename: injitest/src/main/resources/TestData.json
checksum: b42a037962399128f0dff22af77dae71389101af2defa7609a71b213b1c42107
- filename: injitest/src/main/java/io/mosip/test/mob/inji/pages/BasePage.java
checksum: 877e9c9cb8db70ce0d0d3f79434afa1610013689f71c5f50ff355e49d80d27e1
version: ""
- filename: machines/bleShare/scan/scanMachine.ts
checksum: 399f08e25bfa9e25e6505801f2fbc94c20779cbad5010392275d0cd21824b3ac
- filename: package-lock.json
checksum: d1586de91f5118385740f3cd0db39c199ec069d7bd1d5fc8598673ac60c85f0f
version: ""
Binary file removed assets/pending_activation.png
Binary file not shown.
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
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 @@ -15,6 +15,7 @@
import org.json.simple.JSONObject;

import io.mosip.test.mob.inji.driver.TestRunner;
import io.mosip.test.mob.inji.utils.TestDataReader;

//import org.apache.log4j.Logger;

Expand All @@ -25,6 +26,7 @@ public class BaseTestCase {
public static String ApplnURI;
public static String ApplnURIForKeyCloak;
public static String testLevel;
protected static MockSMTPListener mockSMTPListener = null;
public static Properties props = getproperty(
TestRunner.getResourcePath() + "/config/application.properties");
public static Properties propsKernel = getproperty(
Expand Down Expand Up @@ -63,6 +65,9 @@ public static void intiateUINGenration() {
perpetualVid = AdminTestUtil.generateVID(uin, "perpetual");
onetimeuseVid = AdminTestUtil.generateVID(uin, "onetimeuse");
temporaryVid= AdminTestUtil.generateVID(uin, "temporary");

mockSMTPListener = new MockSMTPListener();
mockSMTPListener.run();
}
}

Expand Down Expand Up @@ -175,6 +180,13 @@ private static Properties getLoggerPropertyConfig() {
logProp.setProperty("log4j.appender.Appender2.layout.ConversionPattern", "%-7p %d [%t] %c %x - %m%n");
return logProp;
}

public static String getOtp() {
String otp="";
String externalemail = TestDataReader.readData("externalemail");
otp = MockSMTPListener.getOtp(externalemail);
return otp;
}

public static JSONObject getRequestJson(String filepath) {
return kernelCmnLib.readJsonData(filepath, true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class DriverManager {

private static AppiumDriver getAndroidDriver() throws MalformedURLException {
UiAutomator2Options options = new UiAutomator2Options();
options.setAvd(TestDataReader.readData("androidDevice"));
options.setUdid(TestDataReader.readData("androidDevice"));
options.setApp(TestDataReader.readData("androidAppPath"));
options.setAutoGrantPermissions(true);
appiumDriver.set(new AndroidDriver(new URL("http://127.0.0.1:4723"), (Capabilities)options));
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
package io.mosip.test.mob.inji.pages;

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

public class AboutInjiPage extends BasePage{
@AndroidFindBy(accessibility = "aboutInji")
private WebElement aboutInjiHeader;

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

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

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

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

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

public boolean isAppidIsCopied() {
return this.isElementDisplayed(copied, "Copied");
}

public boolean isCopyTextDisplayed() {
return this.isElementDisplayed(copy, "Copy");
}

public AboutInjiPage clickOnCopy(){
clickOnElement(copy);
return this;
}

public AboutInjiPage clickOnBack(){
clickOnElement(copy);
return this;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,22 @@

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;

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

public AddNewCardPage(AppiumDriver driver) {
super(driver);
}
Expand All @@ -23,5 +30,9 @@ public RetrieveIdPage clickOnDownloadViaUin(){
clickOnElement(downloadViaUin);
return new RetrieveIdPage(driver);
}


public AddNewCardPage clickOnBack() {
clickOnElement(backButton);
return this;
}
}
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
23 changes: 23 additions & 0 deletions injitest/src/main/java/io/mosip/test/mob/inji/pages/BasePage.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,17 @@ protected boolean isElementDisplayed(WebElement element, String elementName) {
return false;
}
}

protected boolean isElementInvisibleYet(WebElement element, String elementName) {
try {
waitForElementToBeInvisible(element);
ExtentLogger.pass(elementName + " is displayed");
return false;
} catch (Exception e) {
//ExtentLogger.fail(elementName + " is not displayed");
return true;
}
}

protected void clickOnElement(WebElement element) {
waitForElementToBeVisible(element);
Expand All @@ -60,6 +71,11 @@ private void waitForElementToBeVisible(WebElement element) {
wait.until(ExpectedConditions.visibilityOf(element));
}

private void waitForElementToBeInvisible(WebElement element) {
WebDriverWait wait = new WebDriverWait(driver, ofSeconds(30));
wait.until(ExpectedConditions.invisibilityOf(element));
}

protected boolean isElementEnabled(WebElement element) {
try {
waitForElementToBeVisible(element);
Expand All @@ -72,6 +88,13 @@ protected boolean isElementEnabled(WebElement element) {
}
}

protected void clearTextBoxAndSendKeys(WebElement element, String text, String elementName) {
this.waitForElementToBeVisible(element);
element.clear();
element.sendKeys(text);
ExtentLogger.pass(text + " entered in " + elementName);
}

protected void sendKeysToTextBox(WebElement element, String text, String elementName) {
this.waitForElementToBeVisible(element);
element.sendKeys(text);
Expand Down
Loading

0 comments on commit ca1824b

Please sign in to comment.