Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .semaphore/semaphore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ blocks:
jobs:
- name: Appium UI tests
commands:
- xcversion select 13.4
- bundle exec fastlane build && ls -la appium
- 'wget https://flowcrypt.s3.eu-central-1.amazonaws.com/release/flowcrypt-ios-old-version-for-ci-storage-compatibility-2022-05-09.zip -P ~/git/flowcrypt-ios/appium'
- cd appium && npm run-script lint
Expand Down
12 changes: 6 additions & 6 deletions FlowCrypt.xcworkspace/xcshareddata/swiftpm/Package.resolved

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@ final class InboxViewContainerController: TableNodeViewController {
case loadedFolders([FolderViewModel])
}

let appContext: AppContextWithUser
let foldersService: FoldersServiceType
let decorator: InboxViewControllerContainerDecorator
private let appContext: AppContextWithUser
private let foldersService: FoldersServiceType
private let decorator: InboxViewControllerContainerDecorator
private let ekmVcHelper: EKMVcHelper?

private var state: State = .loading {
didSet { handleNewState() }
Expand All @@ -45,6 +46,8 @@ final class InboxViewContainerController: TableNodeViewController {
self.appContext = appContext
self.foldersService = foldersService ?? appContext.getFoldersService()
self.decorator = decorator
self.ekmVcHelper = EKMVcHelper(appContext: appContext)

super.init(node: TableNode())
node.delegate = self
node.dataSource = self
Expand Down Expand Up @@ -106,6 +109,7 @@ final class InboxViewContainerController: TableNodeViewController {
viewModel: input
)
navigationController?.setViewControllers([inboxViewController], animated: false)
ekmVcHelper?.refreshKeysFromEKMIfNeeded(in: inboxViewController)
}
}

Expand Down
4 changes: 2 additions & 2 deletions FlowCrypt/Controllers/Inbox/InboxViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ class InboxViewController: ViewController {
var path: String { viewModel.path }

// Search related varaibles
internal var isSearch: Bool = false
internal var searchedExpression: String = ""
internal var isSearch = false
internal var searchedExpression = ""
var shouldBeginFetch = true

init(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,19 +46,17 @@ final class SideMenuNavigationController: ENSideMenuNavigationController {
self?.hideMenu()
}

private var menuViewContoller: SideMenuViewController?
private var menuViewController: SideMenuViewController?

convenience init(appContext: AppContextWithUser, contentViewController: UIViewController) {
let menu = MyMenuViewController(appContext: appContext)
self.init(menuViewController: menu, contentViewController: contentViewController)
menuViewContoller = menu
menuViewController = menu
sideMenu = ENSideMenu(sourceView: view, menuViewController: menu, menuPosition: .left).then {
$0.bouncingEnabled = false
$0.delegate = self
$0.animationDuration = Constants.animationDuration
}
let ekmVcHelper = EKMVcHelper(appContext: appContext)
ekmVcHelper.refreshKeysFromEKMIfNeeded(in: self)
}

override func viewDidLoad() {
Expand Down Expand Up @@ -124,7 +122,7 @@ extension SideMenuNavigationController: ENSideMenuDelegate {
isStatusBarHidden = true
setNeedsStatusBarAppearanceUpdate()
gestureView.frame = view.frame
menuViewContoller?.didOpen()
menuViewController?.didOpen()
}
}

Expand Down
9 changes: 3 additions & 6 deletions FlowCrypt/Functionality/Services/EKMVcHelper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@ final class EKMVcHelper: EKMVcHelperType {
func refreshKeysFromEKMIfNeeded(in viewController: UIViewController) {
Task {
do {
// Sleep for 3 seconds when mock testing
// (This is to prevent refresh key UI test failure in semaphoreCI)
if Bundle.isMockDebugBundle {
try await Task.sleep(nanoseconds: 3 * 1000 * 1_000_000)
}
let configuration = try await appContext.clientConfigurationService.configuration
guard configuration.checkUsesEKM() == .usesEKM else {
return
Expand Down Expand Up @@ -87,7 +82,9 @@ final class EKMVcHelper: EKMVcHelperType {
private func findKeysToUpdate(from keyDetails: [KeyDetails], localKeys: [Keypair]) throws -> [KeyDetails] {
var keysToUpdate: [KeyDetails] = []
for keyDetail in keyDetails {
guard keyDetail.isFullyDecrypted ?? false else { throw EmailKeyManagerApiError.keysAreUnexpectedlyEncrypted }
guard keyDetail.isFullyDecrypted ?? false else {
throw EmailKeyManagerApiError.keysAreUnexpectedlyEncrypted
}
guard let keyLastModified = keyDetail.lastModified else {
throw EmailKeyManagerApiError.keysAreInvalid
}
Expand Down
2 changes: 1 addition & 1 deletion appium/config/wdio.live.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ config.capabilities = [
platformName: 'iOS',
iosInstallPause: 5000,
deviceName: 'iPhone 13',
platformVersion: '15.4',
platformVersion: '15.5',
automationName: 'XCUITest',
app: join(process.cwd(), './FlowCrypt.app'),
simpleIsVisibleCheck: true,
Expand Down
2 changes: 1 addition & 1 deletion appium/config/wdio.mock.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ config.capabilities = [
platformName: 'iOS',
iosInstallPause: 5000,
deviceName: 'iPhone 13',
platformVersion: '15.4',
platformVersion: '15.5',
automationName: 'XCUITest',
app: join(process.cwd(), './FlowCrypt.app'),
processArguments: { 'args': ['--mock-fes-api', '--mock-attester-api'] },
Expand Down
1 change: 1 addition & 0 deletions appium/tests/helpers/AppiumHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ class AppiumHelper {
static async restartApp(processArgs: string[] = []) {
const bundleId = CommonData.bundleId.id;
await driver.terminateApp(bundleId);
await driver.pause(1500);
const args = {
bundleId,
arguments: processArgs
Expand Down