diff --git a/test/basic.html b/test/basic.html index 6c1b19b7..1af7c447 100644 --- a/test/basic.html +++ b/test/basic.html @@ -8,13 +8,14 @@ - + + @@ -55,8 +56,9 @@ (function () { /* global setupOmnitableFixture*/ 'use strict'; - - suite('basic', function () { + // get dom Type from helpers.js + const domType = getDomType(); //eslint-disable-line no-undef + suite('basic' + domType, () => { var omnitable, data; @@ -208,7 +210,7 @@ }); }); - suite('it logs unnamed column', function () { + suite('it logs unnamed column' + domType, () => { var omnitable, data, consoleErrorStub; diff --git a/test/boolean.html b/test/boolean.html index 6599305c..b824fb60 100644 --- a/test/boolean.html +++ b/test/boolean.html @@ -8,6 +8,7 @@ + @@ -31,7 +32,10 @@ /* global setupOmnitableFixture*/ 'use strict'; - suite('basic', () => { + // get dom Type from helpers.js + const domType = getDomType(); //eslint-disable-line no-undef + + suite('basic' + domType, () => { let omnitable, column, data; diff --git a/test/fit-dropdowns.html b/test/fit-dropdowns.html index 25756a21..28b542fb 100644 --- a/test/fit-dropdowns.html +++ b/test/fit-dropdowns.html @@ -8,6 +8,7 @@ + @@ -39,6 +40,9 @@ + @@ -75,7 +76,10 @@ /* global setupOmnitableFixture*/ 'use strict'; - suite('id', () => { + // get dom Type from helpers.js + const domType = getDomType(); //eslint-disable-line no-undef + + suite('id' + domType, () => { let omnitable, data; @@ -119,7 +123,7 @@ }); }); - suite('bool', () => { + suite('bool' + domType, () => { let omnitable, data; @@ -148,37 +152,36 @@ }, 120); }); }); - }()); - suite('amount', () => { - let omnitable, - data; + suite('amount' + domType, () => { + let omnitable, + data; setup(done => { data = Cosmoz.TableDemoBehavior.generateTableDemoData(10, 11, 25); omnitable = setupOmnitableFixture('amount', data, () => done()); }); - test('setting groupOn property to "amount" updates property groupOnColumn', done => { - omnitable.groupOn = 'amount'; - - omnitable.notifyResize(); - const verifyColumn = () => { - const groupOnColumn = omnitable.groupOnColumn; - if (groupOnColumn == null) { - Polymer.Base.async(verifyColumn, 50); - } else { - assert.equal(typeof groupOnColumn, 'object'); - assert.equal(groupOnColumn.is, 'cosmoz-omnitable-column-amount'); - assert.equal(groupOnColumn.name, 'amount', 'Expected "groupOnColumn" to be the column that matches "groupOn" value'); - assert.equal(groupOnColumn, omnitable.columns[0]); - done(); - } - }; - Polymer.Base.async(verifyColumn, 50); + test('setting groupOn property to "amount" updates property groupOnColumn', done => { + omnitable.groupOn = 'amount'; + + omnitable.notifyResize(); + const verifyColumn = () => { + const groupOnColumn = omnitable.groupOnColumn; + if (groupOnColumn == null) { + Polymer.Base.async(verifyColumn, 50); + } else { + assert.equal(typeof groupOnColumn, 'object'); + assert.equal(groupOnColumn.is, 'cosmoz-omnitable-column-amount'); + assert.equal(groupOnColumn.name, 'amount', 'Expected "groupOnColumn" to be the column that matches "groupOn" value'); + assert.equal(groupOnColumn, omnitable.columns[0]); + done(); + } + }; + Polymer.Base.async(verifyColumn, 50); + }); }); - }); - + }()); diff --git a/test/hash-param.html b/test/hash-param.html index 6319956f..bdfdb5e0 100644 --- a/test/hash-param.html +++ b/test/hash-param.html @@ -8,6 +8,7 @@ + @@ -40,6 +41,9 @@ + @@ -39,7 +40,10 @@ /* global setupOmnitableFixture*/ 'use strict'; - suite('basic', () => { + // get dom Type from helpers.js + const domType = getDomType(); //eslint-disable-line no-undef + + suite('basic' + domType, () => { let omnitable, column, data; @@ -87,7 +91,7 @@ }); }); - suite('horizontal', () => { + suite('horizontal' + domType, () => { let omnitable, column, data; diff --git a/test/range-date.html b/test/range-date.html index d341d229..ec63703c 100644 --- a/test/range-date.html +++ b/test/range-date.html @@ -8,6 +8,7 @@ + @@ -38,6 +39,10 @@ /*global sinon chai flush setupOmnitableFixture*/ (function () { 'use strict'; + + // get dom Type from helpers.js + const domType = getDomType(); //eslint-disable-line no-undef + const data = [ { age: 17, amount: { amount: '12.4', currency: 'USD' }, @@ -102,7 +107,7 @@ sinon.assert.expose(chai.assert, { prefix: '' }); - suite('date', function () { + suite('date' + domType, () => { let omnitable, column; @@ -246,7 +251,7 @@ }); }); - suite('datetime', function () { + suite('datetime' + domType, () => { let omnitable, column; @@ -344,7 +349,7 @@ }); }); - suite('time', function () { + suite('time' + domType, () => { let omnitable, column; diff --git a/test/range.html b/test/range.html index eba1aaef..67849692 100644 --- a/test/range.html +++ b/test/range.html @@ -8,6 +8,7 @@ + @@ -49,6 +50,10 @@ /*global sinon chai flush setupOmnitableFixture*/ (function () { 'use strict'; + + // get dom Type from helpers.js + const domType = getDomType(); //eslint-disable-line no-undef + const data = [ { age: 17, @@ -82,7 +87,7 @@ sinon.assert.expose(chai.assert, { prefix: '' }); - suite('number', function () { + suite('number' + domType, () => { let omnitable, column; @@ -188,7 +193,7 @@ }); }); - suite('amount', function () { + suite('amount', () => { let omnitable, column; @@ -339,7 +344,7 @@ }); - suite('currency rates', function () { + suite('currency rates', () => { let omnitable, column; @@ -448,7 +453,7 @@ }); }); - suite('default currency', function () { + suite('default currency' + domType, () => { let omnitable, column; diff --git a/test/xlsx-export.html b/test/xlsx-export.html index 8b3a7b09..eeab91dc 100644 --- a/test/xlsx-export.html +++ b/test/xlsx-export.html @@ -8,6 +8,7 @@ + @@ -53,9 +54,12 @@ (function () { 'use strict'; + // get dom Type from helpers.js + const domType = getDomType(); //eslint-disable-line no-undef + sinon.assert.expose(chai.assert, { prefix: '' }); - suite('xlsx-export-omnitable', function () { + suite('xlsx-export-omnitable' + domType, () => { var omnitable, data = [ { id: 0, 'first-name': 'Carl', amount: 12.4, date: new Date(2017, 7 - 1, 10) }, @@ -148,7 +152,7 @@ }); }); - suite('toXlsx range tests', function () { + suite('toXlsx range tests' + domType, () => { var omnitable, xlsx; const data = [