From 84cdf9d0fcc5a4460dfedc735ea569192db3c50b Mon Sep 17 00:00:00 2001 From: Paul Csapak Date: Mon, 13 Nov 2017 23:03:09 +0100 Subject: [PATCH] add acceptance test --- app/templates/components/invoice-form.hbs | 2 +- app/templates/components/models-table/button-edit.hbs | 2 +- tests/acceptance/invoices-test.js | 11 +++++++++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/app/templates/components/invoice-form.hbs b/app/templates/components/invoice-form.hbs index 25eb6ab..d5cf351 100644 --- a/app/templates/components/invoice-form.hbs +++ b/app/templates/components/invoice-form.hbs @@ -182,7 +182,7 @@ -
+

Total List

diff --git a/app/templates/components/models-table/button-edit.hbs b/app/templates/components/models-table/button-edit.hbs index 1859845..cfec685 100644 --- a/app/templates/components/models-table/button-edit.hbs +++ b/app/templates/components/models-table/button-edit.hbs @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/tests/acceptance/invoices-test.js b/tests/acceptance/invoices-test.js index 45353f1..bc55b69 100644 --- a/tests/acceptance/invoices-test.js +++ b/tests/acceptance/invoices-test.js @@ -21,3 +21,14 @@ test("I can view the invoices in the table", function(assert) { assert.equal(find('.table-footer .table-summary').text().trim(), 'Show 1 - 10 of 25' ); }); }); + +test("I can click an invoice's edit button to be redirected", function(assert) { + server.createList('invoice', 25); + visit('/invoices'); + + click('.invoice-row .button-edit'); + + andThen(function() { + assert.equal(currentPath(), 'invoices.edit'); + }); +});