-
Notifications
You must be signed in to change notification settings - Fork 245
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Delegate #present? to Element. Closes #216
- Loading branch information
Showing
2 changed files
with
16 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -83,6 +83,16 @@ | |
decorator.should respond_to(:present?) | ||
decorator.should respond_to(:click) | ||
end | ||
|
||
it "delegates present? to element" do | ||
Object.class_eval do | ||
def present? | ||
false | ||
end | ||
end | ||
element = browser.a(:id, "show_bar").when_present(1) | ||
element.should be_present | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
p0deje
Author
Member
|
||
end | ||
end | ||
|
||
describe "#wait_until_present" do | ||
|
Maybe here should be also some line like this to make it more clear:
Not sure if it works though, but you can try it by removing the delegate.