diff --git a/test/basic.html b/test/basic.html index 6707199a..347aa136 100644 --- a/test/basic.html +++ b/test/basic.html @@ -8,13 +8,14 @@ - + + @@ -54,8 +55,9 @@ + @@ -30,7 +31,10 @@ (function () { '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 40447d74..61c7243f 100644 --- a/test/fit-dropdowns.html +++ b/test/fit-dropdowns.html @@ -8,6 +8,7 @@ + @@ -38,6 +39,10 @@ + @@ -74,7 +75,10 @@ (function () { 'use strict'; - suite('id', () => { + // get dom Type from helpers.js + const domType = getDomType(); //eslint-disable-line no-undef + + suite('id' + domType, () => { let omnitable, data; @@ -130,7 +134,7 @@ }); }); - suite('bool', () => { + suite('bool' + domType, () => { let omnitable, data; @@ -170,49 +174,48 @@ }, 120); }); }); - }()); - suite('amount', () => { - let omnitable, - data; - - setup(done => { - omnitable = fixture('amount'); - - const onVisible = () => { - const columns = omnitable.visibleColumns; - if (Array.isArray(columns) && columns.length > 0) { - omnitable.removeEventListener('visible-columns-changed', onVisible); - Polymer.Base.async(done, 120); - } - }; - - data = Cosmoz.TableDemoBehavior.generateTableDemoData(10, 11, 25); - omnitable.addEventListener('visible-columns-changed', onVisible); - omnitable.data = data; - omnitable.notifyResize(); - }); + suite('amount' + domType, () => { + let omnitable, + data; - test('setting groupOn property to "amount" updates property groupOnColumn', done => { - omnitable.groupOn = 'amount'; + setup(done => { + omnitable = fixture('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); - }); - }); + const onVisible = () => { + const columns = omnitable.visibleColumns; + if (Array.isArray(columns) && columns.length > 0) { + omnitable.removeEventListener('visible-columns-changed', onVisible); + Polymer.Base.async(done, 120); + } + }; + + data = Cosmoz.TableDemoBehavior.generateTableDemoData(10, 11, 25); + omnitable.addEventListener('visible-columns-changed', onVisible); + omnitable.data = data; + omnitable.notifyResize(); + }); + 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 24f3f7ee..e8f0bb9b 100644 --- a/test/hash-param.html +++ b/test/hash-param.html @@ -8,6 +8,7 @@ + @@ -38,6 +39,10 @@ + @@ -38,7 +39,10 @@ (function () { '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; @@ -93,7 +97,7 @@ }); }); - suite('horizontal', () => { + suite('horizontal' + domType, () => { let omnitable, column, data; diff --git a/test/range-date.html b/test/range-date.html index e6103158..d9083ca0 100644 --- a/test/range-date.html +++ b/test/range-date.html @@ -8,6 +8,7 @@ + @@ -38,6 +39,10 @@ /*global sinon chai flush */ (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; @@ -245,7 +250,7 @@ }); }); - suite('datetime', function () { + suite('datetime' + domType, () => { let omnitable, column; @@ -342,7 +347,7 @@ }); }); - suite('time', function () { + suite('time' + domType, () => { let omnitable, column; diff --git a/test/range.html b/test/range.html index 8dcf7977..1a2c1c4a 100644 --- a/test/range.html +++ b/test/range.html @@ -8,6 +8,7 @@ + @@ -49,6 +50,10 @@ /*global sinon chai flush */ (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; @@ -193,7 +198,7 @@ }); }); - suite('amount', function () { + suite('amount', () => { let omnitable, column; @@ -349,7 +354,7 @@ }); - suite('currency rates', function () { + suite('currency rates', () => { let omnitable, column; @@ -462,7 +467,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 b85c8e51..86b759a4 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 = [