Acceptance test for the jobs list page

This commit is contained in:
Michael Lange 2018-08-15 17:12:18 -07:00
parent 75124fdc9e
commit a96c4508d6
3 changed files with 15 additions and 1 deletions

View file

@ -9,7 +9,7 @@
</div>
{{/if}}
<div class="column is-centered">
{{#link-to "jobs.run" class="button is-primary is-pulled-right"}}Run Job{{/link-to}}
{{#link-to "jobs.run" data-test-run-job class="button is-primary is-pulled-right"}}Run Job{{/link-to}}
</div>
</div>
{{#list-pagination

View file

@ -69,6 +69,18 @@ test('each job row should link to the corresponding job', function(assert) {
});
});
test('the new job button transitions to the new job page', function(assert) {
JobsList.visit();
andThen(() => {
JobsList.runJob();
});
andThen(() => {
assert.equal(currentURL(), '/jobs/run');
});
});
test('when there are no jobs, there is an empty message', function(assert) {
JobsList.visit();

View file

@ -16,6 +16,8 @@ export default create({
search: fillable('[data-test-jobs-search] input'),
runJob: clickable('[data-test-run-job]'),
jobs: collection('[data-test-job-row]', {
id: attribute('data-test-job-row'),
name: text('[data-test-job-name]'),