Skip to content
This repository was archived by the owner on Dec 26, 2019. It is now read-only.

Tested for consistency and accuracy in tracking user time #306

Open
wants to merge 3 commits into
base: primary
Choose a base branch
from
Open
Changes from 1 commit
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
Prev Previous commit
This feature improves the logging of time
It will prevent logging future time and also ensure that hours logged are shown as hours.
nlmorsey committed Jan 7, 2018
commit a53158ab3d6391ffe1519202ae8719a34be3b8f4
22 changes: 12 additions & 10 deletions features/logging_time.feature
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
scenario: logging time in the future
Given that I am on the Check In page
When I select a day in the future from "what day is this for"
Then I am prevented from submitting the form
And I am told that the "what day is this for" field is invalid because the day is in the future
Feature: Logging Time

scenario: logging time in increments greater than one day
Given that I am on the Check In page
When I check in for 10~12 hours
Then I go to the Logs page
And I see 10~12 hours for that log entry
Scenario: logging time in the future
Given I am on the Check In page
When I perform checkin with a date in the future
Then I am told that my checkin date must not be in the future
And I remain on the Check In page

Scenario: logging time in increments greater than one day
Given I am on the Check In page
When I perform checkin with a work duration 10~12 hours
And I go to the Logs page
Then I see 10~12 hours for that log entry
16 changes: 16 additions & 0 deletions features/step_definitions/navigation_steps.rb
Original file line number Diff line number Diff line change
@@ -11,3 +11,19 @@
Then(/^I am taken to the (.*) page$/) do |page_name|
expect(app.page(page_name)).to be_displayed
end

Then(/^I am told that my checkin date must not be in the future$/) do
pending # Write code here that turns the phrase above into concrete actions
end

Then(/^I remain on the Check In page$/) do
pending # Write code here that turns the phrase above into concrete actions
end

When(/^I go to the Logs page$/) do
pending # Write code here that turns the phrase above into concrete actions
end

Then(/^I see (\d+)~(\d+) hours for that log entry$/) do |arg1, arg2|
pending # Write code here that turns the phrase above into concrete actions
end