-
-
Save practicingruby/fedf66069761d01be216 to your computer and use it in GitHub Desktop.
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 code fills out a login form, | |
# finds and clicks a "clock in" button on the user's dashboard | |
# and then inspects an HTML table representing a week calendar | |
# view and ensures the right time shows up in the right place | |
scenario "clocking in" do | |
timestamp = Time.now.noon | |
day = timestamp.to_date.cwday | |
simulator.log_in(employee) | |
simulator.timesheet[day, 1].must_be :empty? | |
simulator.clock_in(timestamp) | |
simulator.timesheet[day, 1] | |
.must_equal(Formatter.time(timestamp).strip) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment