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
32 changes: 29 additions & 3 deletions FlowCryptUI/Nodes/AddButtonNode.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,36 @@ import UIKit
public final class AddButtonNode: ASButtonNode {
private var onTap: (() -> Void)?
private var identifier: String?
private let buttonSize = CGSize(width: .addButtonSize, height: .addButtonSize)

override public init() {
super.init()
setViewBlock { UIButton(type: .system) }
setupNode()
}

public init(identifier: String, _ action: (() -> Void)?) {
self.identifier = identifier
super.init()

setViewBlock { UIButton(type: .system) }
setupNode()
onTap = action
frame.size = CGSize(width: .addButtonSize, height: .addButtonSize)
}

override public var frame: CGRect {
didSet {
guard oldValue.size != frame.size else { return }
updateButtonFrame()
}
}

override public func didLoad() {
super.didLoad()

guard let button = view as? UIButton else { return }
updateButtonFrame()
button.accessibilityIdentifier = identifier
button.isAccessibilityElement = true
button.accessibilityLabel = "Add"
button.addTarget(self, action: #selector(onButtonTap), for: .touchUpInside)

if #available(iOS 26.0, *) {
Expand All @@ -42,6 +51,23 @@ public final class AddButtonNode: ASButtonNode {
}
}

override public func calculateSizeThatFits(_ constrainedSize: CGSize) -> CGSize {
buttonSize
}

private func setupNode() {
setViewBlock { UIButton(type: .system) }
style.preferredSize = buttonSize
frame.size = buttonSize
isUserInteractionEnabled = true
}

private func updateButtonFrame() {
guard isNodeLoaded else { return }
view.frame = CGRect(origin: view.frame.origin, size: buttonSize)
view.bounds = CGRect(origin: .zero, size: buttonSize)
}

@objc private func onButtonTap() {
onTap?()
}
Expand Down
494 changes: 263 additions & 231 deletions appium/api-mocks/apis/ekm/ekm-endpoints.ts

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions appium/config/wdio.mock.conf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ config.capabilities = [
'appium:processArguments': {
args: ['--mock-fes-api', '--mock-attester-api', '--mock-gmail-api'],
},
'appium:locale': 'en_US',
'appium:deviceName': 'iPhone 17',
'appium:platformVersion': '26.4',
'appium:orientation': 'PORTRAIT',
Expand Down
Loading
Loading