From a1e3b8a07aba9aca724b2d48617ed91b1ba681e1 Mon Sep 17 00:00:00 2001 From: aszx87410 Date: Fri, 14 Oct 2016 12:21:33 -0500 Subject: [PATCH] Add test for inventory.barcode, closes #693 (#742) --- tests/acceptance/inventory-test.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/acceptance/inventory-test.js b/tests/acceptance/inventory-test.js index 5e76dea113..3aba795fa3 100644 --- a/tests/acceptance/inventory-test.js +++ b/tests/acceptance/inventory-test.js @@ -69,6 +69,22 @@ test('Adding a new inventory item', (assert) => { }); }); +test('Visiting /inventory/barcode', (assert) => { + runWithPouchDump('inventory', function() { + authenticateUser(); + visit('/inventory/listing'); + + andThen(() => { + assert.equal(currentURL(), '/inventory/listing'); + click('a:contains(Barcode)'); + andThen(() => { + assert.equal(currentURL(), '/inventory/barcode/igbmk5zf_is'); + findWithAssert('.panel-body img[src^="data:image"]'); + }); + }); + }); +}); + test('Deleting the last inventory item', (assert) => { runWithPouchDump('inventory', function() { authenticateUser();