Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dimissKeyboard to Swift interface #747

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
8 changes: 8 additions & 0 deletions gem/lib/earlgrey/files/Swift-4.0/EarlGrey.swift
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,14 @@ open class EarlGrey: NSObject {
.rotateDevice(to: orientation,
errorOrNil: errorOrNil)
}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks great. do you mind adding a test that uses this as well?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any test suite that tests the swift implementations? I've just found the Objective-C ones 😅

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't promise nothing until the weekend, but I'll try to make it work 😄

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, why does the build fail? 🤔

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those look like legitimate test failures unrelated to your change.

@tirodkar mind taking a look?

@discardableResult open class func dismissKeyboard(errorOrNil: UnsafeMutablePointer<NSError?>!,
file: StaticString = #file,
line: UInt = #line)
-> Bool {
return EarlGreyImpl.invoked(fromFile: file.description, lineNumber: line)
.dismissKeyboardWithError(errorOrNil)
}
}

extension GREYInteraction {
Expand Down