Skip to content

Commit

Permalink
Updated version. Fixed all UI tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
tijme committed Jun 23, 2023
1 parent f91e2bc commit 597ea8b
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 30 deletions.
2 changes: 1 addition & 1 deletion .semver
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.4.13
1.4.14
8 changes: 4 additions & 4 deletions Raivo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1621,7 +1621,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = Raivo/Raivo.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 77;
CURRENT_PROJECT_VERSION = 78;
DEVELOPMENT_TEAM = 564B4ETY69;
INFOPLIST_FILE = "$(SRCROOT)/Raivo/Supporting/Info.plist";
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.productivity";
Expand All @@ -1630,7 +1630,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.4.13;
MARKETING_VERSION = 1.4.14;
PRODUCT_BUNDLE_IDENTIFIER = com.finnwea.Raivo.Debug;
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
Expand All @@ -1648,7 +1648,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = Raivo/Raivo.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 77;
CURRENT_PROJECT_VERSION = 78;
DEVELOPMENT_TEAM = 564B4ETY69;
INFOPLIST_FILE = "$(SRCROOT)/Raivo/Supporting/Info.plist";
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.productivity";
Expand All @@ -1657,7 +1657,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.4.13;
MARKETING_VERSION = 1.4.14;
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14868" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14824"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
Expand All @@ -24,13 +25,13 @@
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="000 000" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ga4-8q-59F">
<rect key="frame" x="74" y="40" width="99.5" height="29"/>
<rect key="frame" x="74" y="40" width="98.5" height="29"/>
<fontDescription key="fontDescription" type="system" weight="semibold" pointSize="24"/>
<color key="textColor" red="0.91081506010000002" green="0.050439722839999999" blue="0.2000719607" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Twitter" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="x4U-De-6XP">
<rect key="frame" x="74" y="12" width="59" height="24"/>
<rect key="frame" x="74" y="12" width="60" height="24"/>
<fontDescription key="fontDescription" type="system" pointSize="20"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
Expand All @@ -43,15 +44,15 @@
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="500" verticalCompressionResistancePriority="500" text="(@finnwea)" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="K1D-QP-Lln">
<rect key="frame" x="137" y="14" width="82" height="20"/>
<rect key="frame" x="138" y="14" width="82" height="20"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" systemColor="secondaryLabelColor" red="0.23529411764705882" green="0.23529411764705882" blue="0.2627450980392157" alpha="0.59999999999999998" colorSpace="custom" customColorSpace="sRGB"/>
<color key="textColor" systemColor="secondaryLabelColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="HOTP" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Z82-t0-58s">
<rect key="frame" x="181.5" y="40" width="64.5" height="29"/>
<rect key="frame" x="180.5" y="40" width="64.5" height="29"/>
<fontDescription key="fontDescription" type="system" weight="semibold" pointSize="24"/>
<color key="textColor" systemColor="secondaryLabelColor" red="0.23529411764705882" green="0.23529411764705882" blue="0.2627450980392157" alpha="0.59999999999999998" colorSpace="custom" customColorSpace="sRGB"/>
<color key="textColor" systemColor="secondaryLabelColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
Expand All @@ -73,7 +74,7 @@
<constraint firstItem="x4U-De-6XP" firstAttribute="top" secondItem="xYo-MA-NqZ" secondAttribute="top" constant="-3" id="yJ1-dm-REw"/>
</constraints>
</tableViewCellContentView>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<color key="tintColor" name="color-tint-red"/>
<connections>
<outlet property="account" destination="K1D-QP-Lln" id="l0U-hR-LDS"/>
Expand All @@ -88,7 +89,13 @@
<resources>
<image name="icon-lightning-tint" width="30" height="30"/>
<namedColor name="color-tint-red">
<color red="0.91764705882352937" green="0.058823529411764705" blue="0.20784313725490197" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color red="0.90980392156862744" green="0.050980392156862744" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<systemColor name="secondaryLabelColor">
<color red="0.23529411764705882" green="0.23529411764705882" blue="0.2627450980392157" alpha="0.59999999999999998" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document>
28 changes: 17 additions & 11 deletions RaivoUITests/Flows/Setup/SetupRoboticTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ import XCTest
class SetupRoboticTest: XCTestCase {

var app: XCUIApplication!

private let unitTestPasswordCompliant = "ByxFc8F24wfWtY"

private let unitTestPasswordUncompliantShort = "12345"

private let unitTestPasswordUncompliantWeak = "123456789"

override func setUp() {
continueAfterFailure = false
Expand Down Expand Up @@ -52,7 +58,7 @@ class SetupRoboticTest: XCTestCase {
SetupFlowHelper.forwardToPasswordInitial(app)

app.secureTextFields["passwordInitial"].tap()
app.secureTextFields["passwordInitial"].typeText("1234567")
app.secureTextFields["passwordInitial"].typeText(unitTestPasswordUncompliantShort)

app.buttons["continue"].tap()
HumanDelayHelper.idle()
Expand All @@ -65,7 +71,7 @@ class SetupRoboticTest: XCTestCase {
SetupFlowHelper.forwardToPasswordInitial(app)

app.secureTextFields["passwordInitial"].tap()
app.secureTextFields["passwordInitial"].typeText("12345678")
app.secureTextFields["passwordInitial"].typeText(unitTestPasswordCompliant)

app.buttons["continue"].tap()
HumanDelayHelper.idle()
Expand All @@ -75,7 +81,7 @@ class SetupRoboticTest: XCTestCase {
}

func testInvalidPasswordConfirmation() {
SetupFlowHelper.forwardToPasswordConfirmation(app, initialPassword: "AAAAAAAAAA")
SetupFlowHelper.forwardToPasswordConfirmation(app, initialPassword: unitTestPasswordCompliant)

app.secureTextFields["passwordConfirmation"].tap()
app.secureTextFields["passwordConfirmation"].typeText("BBBBBBBBBB")
Expand All @@ -85,10 +91,10 @@ class SetupRoboticTest: XCTestCase {
}

func testValidPasswordConfirmation() {
SetupFlowHelper.forwardToPasswordConfirmation(app, initialPassword: "AAAAAAAAAA")
SetupFlowHelper.forwardToPasswordConfirmation(app, initialPassword: unitTestPasswordCompliant)

app.secureTextFields["passwordConfirmation"].tap()
app.secureTextFields["passwordConfirmation"].typeText("AAAAAAAAAA")
app.secureTextFields["passwordConfirmation"].typeText(unitTestPasswordCompliant)

app.buttons["confirm"].tap()
HumanDelayHelper.idle()
Expand All @@ -100,7 +106,7 @@ class SetupRoboticTest: XCTestCase {
func testMinimumPasscodeLengthToShort() {
SetupFlowHelper.forwardToPasscodeInitial(app)

app.secureTextFields["passcodeInitial"].typeText("12345")
app.secureTextFields["passcodeInitial"].typeText("1234")
HumanDelayHelper.idle()

let setupPasscodeInitial = app.otherElements["setupPasscodeInitial"]
Expand All @@ -110,27 +116,27 @@ class SetupRoboticTest: XCTestCase {
func testMinimumPasscodeLengthLongEnough() {
SetupFlowHelper.forwardToPasscodeInitial(app)

app.secureTextFields["passcodeInitial"].typeText("123456")
app.secureTextFields["passcodeInitial"].typeText("112233")
HumanDelayHelper.idle()

let setupPasscodeConfirmation = app.otherElements["setupPasscodeConfirmation"]
XCTAssertTrue(setupPasscodeConfirmation.exists)
}

func testInvalidPasscodeConfirmation() {
SetupFlowHelper.forwardToPasscodeConfirmation(app, initialPasscode: "111111")
SetupFlowHelper.forwardToPasscodeConfirmation(app, initialPasscode: "112233")

app.secureTextFields["passcodeConfirmation"].typeText("222222")
app.secureTextFields["passcodeConfirmation"].typeText("445566")
HumanDelayHelper.idle()

let setupPasscodeInitial = app.otherElements["setupPasscodeInitial"]
XCTAssertTrue(setupPasscodeInitial.exists)
}

func testValidPasscodeConfirmation() {
SetupFlowHelper.forwardToPasscodeConfirmation(app, initialPasscode: "654321")
SetupFlowHelper.forwardToPasscodeConfirmation(app, initialPasscode: "665544")

app.secureTextFields["passcodeConfirmation"].typeText("654321")
app.secureTextFields["passcodeConfirmation"].typeText("665544")
HumanDelayHelper.idle()

let setupPasscodeInitial = app.otherElements["setupBiometrics"]
Expand Down
8 changes: 4 additions & 4 deletions RaivoUITests/Helpers/Flows/SetupFlowHelper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class SetupFlowHelper {
HumanDelayHelper.idle()
}

static func forwardToPasswordConfirmation(_ app: XCUIApplication, initialPassword: String = "12345678") {
static func forwardToPasswordConfirmation(_ app: XCUIApplication, initialPassword: String = "ByxFc8F24wfWtY") {
forwardToPasswordInitial(app)

_ = app.secureTextFields["passwordInitial"].waitForExistence(timeout: 2)
Expand All @@ -46,7 +46,7 @@ class SetupFlowHelper {
HumanDelayHelper.idle()
}

static func forwardToPasscodeInitial(_ app: XCUIApplication, confirmationPassword: String = "12345678") {
static func forwardToPasscodeInitial(_ app: XCUIApplication, confirmationPassword: String = "ByxFc8F24wfWtY") {
forwardToPasswordConfirmation(app)

_ = app.secureTextFields["passwordConfirmation"].waitForExistence(timeout: 2)
Expand All @@ -56,7 +56,7 @@ class SetupFlowHelper {
HumanDelayHelper.idle()
}

static func forwardToPasscodeConfirmation(_ app: XCUIApplication, initialPasscode: String = "123456") {
static func forwardToPasscodeConfirmation(_ app: XCUIApplication, initialPasscode: String = "112233") {
forwardToPasscodeInitial(app)

_ = app.secureTextFields["passcodeInitial"].waitForExistence(timeout: 2)
Expand All @@ -65,7 +65,7 @@ class SetupFlowHelper {
HumanDelayHelper.idle()
}

static func forwardToBiometrics(_ app: XCUIApplication, confirmationPasscode: String = "123456") {
static func forwardToBiometrics(_ app: XCUIApplication, confirmationPasscode: String = "112233") {
forwardToPasscodeConfirmation(app)

_ = app.secureTextFields["passcodeConfirmation"].waitForExistence(timeout: 2)
Expand Down

0 comments on commit 597ea8b

Please sign in to comment.