Skip to content
Open
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 WireUI/Sources/WireLocators/Locators.swift
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ public enum Locators {

case imageTile = "PXGGridLayout-Info"
case shareButton = "PUOneUpBarButtonItemIdentifierShare"
case chooseConversations = "chevron"
case chooseConversations = "Choose"
case sendButtonOnShareExtension
case continueButton = "Continue"
}
Expand Down
14 changes: 8 additions & 6 deletions wire-ios/WireUITests/Pages/PhotosAppPage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,16 @@ class PhotosAppPage: PageModel {
photosApp.cells["Wire"].firstMatch
}

var chooseConversationButton: XCUIElement {
photosApp.buttons[Locators.ShareExtensionPage.chooseConversations.rawValue].firstMatch
var chooseConversation: XCUIElement {
photosApp.descendants(matching: .any)[Locators.ShareExtensionPage.chooseConversations.rawValue].firstMatch
}

var sendButton: XCUIElement {
photosApp.buttons[Locators.ShareExtensionPage.sendButtonOnShareExtension.rawValue].firstMatch
}

func selectConversation(name: String) -> XCUIElement {
var conversationCell = photosApp.staticTexts[name]
let conversationCell = photosApp.staticTexts[name]
XCTAssertTrue(conversationCell.waitForExistence(timeout: timeout))
return conversationCell.firstMatch
}
Expand Down Expand Up @@ -95,11 +95,13 @@ class PhotosAppPage: PageModel {
func chooseConversationAndSend(name: String) throws {
defer { photosApp.terminate() }

XCTAssertTrue(chooseConversationButton.waitForExistence(timeout: timeout))
chooseConversationButton.tap()
chooseConversation.waitAndTap()

let conversationToSend = selectConversation(name: name)
XCTAssertTrue(conversationToSend.waitForExistence(timeout: timeout))
XCTAssertTrue(
conversationToSend.waitForExistence(timeout: timeout),
"Tap to chooseConversation, didn't succeed"
)
conversationToSend.waitAndTap()

XCTAssertTrue(sendButton.waitForExistence(timeout: timeout))
Expand Down
Loading