Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate test_get_next_results to Travis suite
- Loading branch information
Showing
13 changed files
with
54 additions
and
191 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
This file was deleted.
Oops, something went wrong.
Empty file.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Empty file.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import time | ||
|
||
import pytest | ||
|
||
from pages.treeherder import Treeherder | ||
|
||
|
||
@pytest.fixture | ||
def sample_push(): | ||
sample_push = [] | ||
for i in range(61): | ||
sample_push.append({ | ||
'revision': 'revision{}'.format(i), | ||
'push_timestamp': int(time.time() + (i * 3600)), | ||
'author': 'Test author <test@example.com>', | ||
'revisions': [{ | ||
'comment': 'Test commit', | ||
'author': 'Test author <test@example.com>', | ||
'revision': 'revision{}'.format(i) | ||
}] | ||
}) | ||
return sample_push | ||
|
||
|
||
@pytest.mark.parametrize('count', ((10), (20), (50))) | ||
def test_get_next_results(base_url, selenium, count, push_stored): | ||
page = Treeherder(selenium, base_url).open() | ||
page.wait.until(lambda _: 10 == len(page.pushes)) | ||
getattr(page, 'get_next_{}'.format(count))() | ||
assert len(page.pushes) == 10 + count |
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