Last active
August 29, 2015 14:08
-
-
Save miguelgonz/c551ea02829c9874cd0a to your computer and use it in GitHub Desktop.
BBC krispy blog post snippets
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
@unit | |
@p1 | |
Scenario: Scenario: Programme information for each broadcast is present | |
When there's an on-air channel there's a progress bar for it | |
Then progress bar shows the correct progress for different on-air programmes |
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
<?php | |
/** | |
* @topic tv_homepage | |
* @feature Scenario: Programme information for each broadcast is present | |
* @feature Given I am on the TV homepage | |
* @feature Then I should see the programme image, title, start time and end time for each programme | |
*/ | |
public function testProgrammeElements() { | |
//Test implementation | |
} | |
/** | |
* @topic tv_homepage | |
* @feature Scenario: The TV homepage shows the progress of the current programmes | |
* @feature When there's an on-air channel there's a progress bar for it | |
* @feature Then progress bar shows the correct progress for different on-air programmes | |
* @feature Examples: | |
* @example | start | end | perc | | |
* @example | now | +1 hour | 0 | | |
* @example | -1 hour | now | 100 | | |
* @example | -2 hour | +2 hour | 50 | | |
* @example | -4 hour | +4 hour | 50 | | |
* @example | -1 hour | +1 hour | 50 | | |
* @example | -1 hour | +2 hour | 33 | | |
* @example | -2 hour | +1 hour | 66 | | |
* @example | -4 hour | +1 hour | 80 | | |
* @example | -4 hour | -1 hour | 100 | | |
*/ | |
public function testProgressBar() { | |
$broadcasts = $this->getExampleData(__METHOD__); | |
foreach ($broadcasts as $broadcast) { | |
$this->_assertProgressWidthForBroadcastTimes( | |
$broadcast['start'], | |
$broadcast['end'], | |
$broadcast['perc'] | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment