Skip to content

Commit 430aa5b

Browse files
authored
iOS26 UI tests fixes (#2752)
* AddButtonNode fix * update expired key * tests fixes * update expired key
1 parent dad8971 commit 430aa5b

7 files changed

Lines changed: 887 additions & 353 deletions

File tree

FlowCryptUI/Nodes/AddButtonNode.swift

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,27 +12,36 @@ import UIKit
1212
public final class AddButtonNode: ASButtonNode {
1313
private var onTap: (() -> Void)?
1414
private var identifier: String?
15+
private let buttonSize = CGSize(width: .addButtonSize, height: .addButtonSize)
1516

1617
override public init() {
1718
super.init()
18-
setViewBlock { UIButton(type: .system) }
19+
setupNode()
1920
}
2021

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

25-
setViewBlock { UIButton(type: .system) }
26+
setupNode()
2627
onTap = action
27-
frame.size = CGSize(width: .addButtonSize, height: .addButtonSize)
28+
}
29+
30+
override public var frame: CGRect {
31+
didSet {
32+
guard oldValue.size != frame.size else { return }
33+
updateButtonFrame()
34+
}
2835
}
2936

3037
override public func didLoad() {
3138
super.didLoad()
3239

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

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

54+
override public func calculateSizeThatFits(_ constrainedSize: CGSize) -> CGSize {
55+
buttonSize
56+
}
57+
58+
private func setupNode() {
59+
setViewBlock { UIButton(type: .system) }
60+
style.preferredSize = buttonSize
61+
frame.size = buttonSize
62+
isUserInteractionEnabled = true
63+
}
64+
65+
private func updateButtonFrame() {
66+
guard isNodeLoaded else { return }
67+
view.frame = CGRect(origin: view.frame.origin, size: buttonSize)
68+
view.bounds = CGRect(origin: .zero, size: buttonSize)
69+
}
70+
4571
@objc private func onButtonTap() {
4672
onTap?()
4773
}

appium/api-mocks/apis/ekm/ekm-endpoints.ts

Lines changed: 263 additions & 231 deletions
Large diffs are not rendered by default.

appium/config/wdio.mock.conf.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ config.capabilities = [
2020
'appium:processArguments': {
2121
args: ['--mock-fes-api', '--mock-attester-api', '--mock-gmail-api'],
2222
},
23+
'appium:locale': 'en_US',
2324
'appium:deviceName': 'iPhone 17',
2425
'appium:platformVersion': '26.4',
2526
'appium:orientation': 'PORTRAIT',

0 commit comments

Comments
 (0)