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
2 changes: 1 addition & 1 deletion Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ end
## ===================
##
def wordpress_mocks
pod 'WordPressMocks', '~> 0.0.9-beta.1'
pod 'WordPressMocks', '~> 0.0.9-beta'
# pod 'WordPressMocks', :git => 'https://github.com/wordpress-mobile/WordPressMocks.git', :commit => ''
# pod 'WordPressMocks', :git => 'https://github.com/wordpress-mobile/WordPressMocks.git', :branch => ''
# pod 'WordPressMocks', :path => '../WordPressMocks'
Expand Down
8 changes: 4 additions & 4 deletions Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ PODS:
- UIDeviceIdentifier (~> 1)
- WordPressShared (~> 1.12)
- wpxmlrpc (~> 0.9.0)
- WordPressMocks (0.0.9-beta.1)
- WordPressMocks (0.0.9-beta.2)
- WordPressShared (1.12.0):
- CocoaLumberjack (~> 3.4)
- FormatterKit/TimeIntervalFormatter (= 1.8.2)
Expand Down Expand Up @@ -507,7 +507,7 @@ DEPENDENCIES:
- WordPress-Editor-iOS (~> 1.19.3)
- WordPressAuthenticator (~> 1.27.0-beta)
- WordPressKit (~> 4.19-beta.1)
- WordPressMocks (~> 0.0.9-beta.1)
- WordPressMocks (~> 0.0.9-beta)
- WordPressShared (~> 1.12.0)
- WordPressUI (~> 1.7.1)
- WPMediaPicker (~> 1.7.2)
Expand Down Expand Up @@ -757,7 +757,7 @@ SPEC CHECKSUMS:
WordPress-Editor-iOS: 1886f7fe464d79ee64ccfe7985281f8cf45f75eb
WordPressAuthenticator: b22bc0844ebfed1266e062bfeebac47f34990162
WordPressKit: 1fb3b2fddd237dd9fa14f52b9c2b6f329a94c6fc
WordPressMocks: 1e04de6afa3a17f6f1ab4782f8460d7faefcf2f7
WordPressMocks: 512df883edd980e5e4f11fa6341bde07c0b1ab26
WordPressShared: 38cb62e9cb998d4dc3c1611f17934c6875a6b3e8
WordPressUI: 9da5d966b8beb091950cd96880db398d7f30e246
WPMediaPicker: d5ae9a83cd5cc0e4de46bfc1c59120aa86658bc3
Expand All @@ -772,6 +772,6 @@ SPEC CHECKSUMS:
ZendeskSupportSDK: a87ab1e4badace92c75eb11dc77ede1e995b2adc
ZIPFoundation: 249fa8890597086cd536bb2df5c9804d84e122b0

PODFILE CHECKSUM: 59aaeee72514d2b0e33eb444a478d9717c825353
PODFILE CHECKSUM: 2eed10318ecf1cfe4a1bf70630170ecd1ed7516a

COCOAPODS: 1.9.3
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,13 @@ class LoginUsernamePasswordScreen: BaseScreen {
usernameTextField.tap()
usernameTextField.typeText(username)
passwordTextField.tap()
passwordTextField.typeText(password)
// Workaround to enter password in languages where typing doesn't work
// Pasting is not reliable enough to use all the time so we only use it where it's necessary
if ["ru", "th"].contains(Locale.current.languageCode) {
passwordTextField.pasteText(password)
} else {
passwordTextField.typeText(password)
}
nextButton.tap()

return LoginEpilogueScreen()
Expand Down
17 changes: 17 additions & 0 deletions WordPress/WordPressUITests/Utils/XCTest+Extensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,23 @@ extension XCUIElement {
self.typeText(text)
}

/**
Pastes text from clipboard to the field
Useful for scenarios where typing is problematic, e.g. secure text fields in Russian.
- Parameter text: the text to paste into the field
*/
func pasteText(_ text: String) -> Void {
Comment thread
rachelmcr marked this conversation as resolved.
let previousPasteboardContents = UIPasteboard.general.string
UIPasteboard.general.string = text

self.press(forDuration: 1.2)
XCUIApplication().menuItems.firstMatch.tap()

if let string = previousPasteboardContents {
UIPasteboard.general.string = string
}
}

var stringValue: String? {
return self.value as? String
}
Expand Down