Acceptance test for the jobs list page
This commit is contained in:
parent
75124fdc9e
commit
a96c4508d6
|
@ -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
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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]'),
|
||||
|
|
Loading…
Reference in a new issue