diff --git a/package.json b/package.json index 0341092ba..ba1a97006 100644 --- a/package.json +++ b/package.json @@ -169,7 +169,7 @@ "eslint-webpack-plugin": "^3.2.0", "express": "^4.18.1", "glob": "^8.0.3", - "jest": "28.1.3", + "jest": "29.1.2", "jest-environment-jsdom": "29.1.2", "jest-resolve": "29.1.2", "jest-watch-typeahead": "2.2.0", diff --git a/src/common/__tests__/__snapshots__/dateHelpers.test.js.snap b/src/common/__tests__/__snapshots__/dateHelpers.test.js.snap index 9d6089384..3e4b16832 100644 --- a/src/common/__tests__/__snapshots__/dateHelpers.test.js.snap +++ b/src/common/__tests__/__snapshots__/dateHelpers.test.js.snap @@ -1,62 +1,62 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`DateHelpers should have specific functions: dateHelpers 1`] = ` -Object { - "currentDateTime": Object { +{ + "currentDateTime": { "endDate": 2019-07-20T23:59:59.999Z, "startDate": 2019-07-19T00:00:00.000Z, }, - "defaultDateTime": Object { + "defaultDateTime": { "endDate": 2019-07-20T23:59:59.999Z, "startDate": 2019-06-20T00:00:00.000Z, }, "getCurrentDate": [Function], "getRangedDateTime": [Function], "getRangedMonthDateTime": [Function], - "monthlyDateTime": Object { + "monthlyDateTime": { "endDate": 2019-07-01T23:59:59.999Z, "startDate": 2018-07-01T00:00:00.000Z, }, - "quarterlyDateTime": Object { + "quarterlyDateTime": { "endDate": 2019-07-01T23:59:59.999Z, "startDate": 2016-07-01T00:00:00.000Z, }, - "rangedYearDateTime": Object { + "rangedYearDateTime": { "endDate": 2019-07-31T23:59:59.999Z, "startDate": 2018-08-01T00:00:00.000Z, }, "setRangedDateTime": [Function], - "timestampDayFormats": Object { + "timestampDayFormats": { "long": "MMMM D", "short": "MMM D", "yearLong": "MMMM D YYYY", "yearShort": "MMM D YYYY", }, - "timestampMonthFormats": Object { + "timestampMonthFormats": { "long": "MMMM", "short": "MMM", "yearLong": "MMMM YYYY", "yearShort": "MMM YYYY", }, - "timestampQuarterFormats": Object { + "timestampQuarterFormats": { "long": "MMMM", "short": "MMM", "yearLong": "MMMM YYYY", "yearShort": "MMM YYYY", }, - "timestampTimeFormats": Object { + "timestampTimeFormats": { "timeLong": "MMMM D h:mm:ss A", "timeShort": "MMM D h:mm A", "yearTimeLong": "MMMM D YYYY h:mm:ss A", "yearTimeShort": "MMM D YYYY h:mm A", }, - "timestampUTCTimeFormats": Object { + "timestampUTCTimeFormats": { "timeLong": "DD MMMM HH:mm:ss UTC", "timeShort": "DD MMM HH:mm UTC", "yearTimeLong": "DD MMMM YYYY HH:mm:ss UTC", "yearTimeShort": "DD MMM YYYY HH:mm UTC", }, - "weeklyDateTime": Object { + "weeklyDateTime": { "endDate": 2019-07-14T23:59:59.999Z, "startDate": 2019-04-21T00:00:00.000Z, }, @@ -64,10 +64,10 @@ Object { `; exports[`DateHelpers should return a predictable object and list of months based on a year range: get a specific month by name 1`] = ` -Object { +{ "_title": "april", - "title": "t(curiosity-toolbar.granularityRangedMonthly, {\\"context\\":\\"April\\"})", - "value": Object { + "title": "t(curiosity-toolbar.granularityRangedMonthly, {"context":"April"})", + "value": { "endDate": 2019-04-30T23:59:59.999Z, "startDate": 2019-04-01T00:00:00.000Z, }, @@ -75,10 +75,10 @@ Object { `; exports[`DateHelpers should return a predictable object and list of months based on a year range: get a specific month by number 1`] = ` -Object { +{ "_title": "march", - "title": "t(curiosity-toolbar.granularityRangedMonthly, {\\"context\\":\\"March\\"})", - "value": Object { + "title": "t(curiosity-toolbar.granularityRangedMonthly, {"context":"March"})", + "value": { "endDate": 2019-03-31T23:59:59.999Z, "startDate": 2019-03-01T00:00:00.000Z, }, @@ -86,304 +86,304 @@ Object { `; exports[`DateHelpers should return a predictable object and list of months based on a year range: getRangedYearDateTime 1`] = ` -Object { - "keyDateTimeRanges": Object { - "1": Object { +{ + "keyDateTimeRanges": { + "1": { "_title": "january", - "title": "t(curiosity-toolbar.granularityRangedMonthly, {\\"context\\":\\"January\\"})", - "value": Object { + "title": "t(curiosity-toolbar.granularityRangedMonthly, {"context":"January"})", + "value": { "endDate": 2019-01-31T23:59:59.999Z, "startDate": 2019-01-01T00:00:00.000Z, }, }, - "10": Object { + "10": { "_title": "october", - "title": "t(curiosity-toolbar.granularityRangedMonthly, {\\"context\\":\\"October 2018\\"})", - "value": Object { + "title": "t(curiosity-toolbar.granularityRangedMonthly, {"context":"October 2018"})", + "value": { "endDate": 2018-10-31T23:59:59.999Z, "startDate": 2018-10-01T00:00:00.000Z, }, }, - "11": Object { + "11": { "_title": "november", - "title": "t(curiosity-toolbar.granularityRangedMonthly, {\\"context\\":\\"November 2018\\"})", - "value": Object { + "title": "t(curiosity-toolbar.granularityRangedMonthly, {"context":"November 2018"})", + "value": { "endDate": 2018-11-30T23:59:59.999Z, "startDate": 2018-11-01T00:00:00.000Z, }, }, - "12": Object { + "12": { "_title": "december", - "title": "t(curiosity-toolbar.granularityRangedMonthly, {\\"context\\":\\"December 2018\\"})", - "value": Object { + "title": "t(curiosity-toolbar.granularityRangedMonthly, {"context":"December 2018"})", + "value": { "endDate": 2018-12-31T23:59:59.999Z, "startDate": 2018-12-01T00:00:00.000Z, }, }, - "2": Object { + "2": { "_title": "february", - "title": "t(curiosity-toolbar.granularityRangedMonthly, {\\"context\\":\\"February\\"})", - "value": Object { + "title": "t(curiosity-toolbar.granularityRangedMonthly, {"context":"February"})", + "value": { "endDate": 2019-02-28T23:59:59.999Z, "startDate": 2019-02-01T00:00:00.000Z, }, }, - "3": Object { + "3": { "_title": "march", - "title": "t(curiosity-toolbar.granularityRangedMonthly, {\\"context\\":\\"March\\"})", - "value": Object { + "title": "t(curiosity-toolbar.granularityRangedMonthly, {"context":"March"})", + "value": { "endDate": 2019-03-31T23:59:59.999Z, "startDate": 2019-03-01T00:00:00.000Z, }, }, - "4": Object { + "4": { "_title": "april", - "title": "t(curiosity-toolbar.granularityRangedMonthly, {\\"context\\":\\"April\\"})", - "value": Object { + "title": "t(curiosity-toolbar.granularityRangedMonthly, {"context":"April"})", + "value": { "endDate": 2019-04-30T23:59:59.999Z, "startDate": 2019-04-01T00:00:00.000Z, }, }, - "5": Object { + "5": { "_title": "may", - "title": "t(curiosity-toolbar.granularityRangedMonthly, {\\"context\\":\\"May\\"})", - "value": Object { + "title": "t(curiosity-toolbar.granularityRangedMonthly, {"context":"May"})", + "value": { "endDate": 2019-05-31T23:59:59.999Z, "startDate": 2019-05-01T00:00:00.000Z, }, }, - "6": Object { + "6": { "_title": "june", - "title": "t(curiosity-toolbar.granularityRangedMonthly, {\\"context\\":\\"June\\"})", - "value": Object { + "title": "t(curiosity-toolbar.granularityRangedMonthly, {"context":"June"})", + "value": { "endDate": 2019-06-30T23:59:59.999Z, "startDate": 2019-06-01T00:00:00.000Z, }, }, - "7": Object { + "7": { "_title": "july", - "title": "t(curiosity-toolbar.granularityRangedMonthly, {\\"context\\":\\"July\\"})", - "value": Object { + "title": "t(curiosity-toolbar.granularityRangedMonthly, {"context":"July"})", + "value": { "endDate": 2019-07-31T23:59:59.999Z, "startDate": 2019-07-01T00:00:00.000Z, }, }, - "8": Object { + "8": { "_title": "august", - "title": "t(curiosity-toolbar.granularityRangedMonthly, {\\"context\\":\\"August 2018\\"})", - "value": Object { + "title": "t(curiosity-toolbar.granularityRangedMonthly, {"context":"August 2018"})", + "value": { "endDate": 2018-08-31T23:59:59.999Z, "startDate": 2018-08-01T00:00:00.000Z, }, }, - "9": Object { + "9": { "_title": "september", - "title": "t(curiosity-toolbar.granularityRangedMonthly, {\\"context\\":\\"September 2018\\"})", - "value": Object { + "title": "t(curiosity-toolbar.granularityRangedMonthly, {"context":"September 2018"})", + "value": { "endDate": 2018-09-30T23:59:59.999Z, "startDate": 2018-09-01T00:00:00.000Z, }, }, - "april": Object { + "april": { "_title": "april", - "title": "t(curiosity-toolbar.granularityRangedMonthly, {\\"context\\":\\"April\\"})", - "value": Object { + "title": "t(curiosity-toolbar.granularityRangedMonthly, {"context":"April"})", + "value": { "endDate": 2019-04-30T23:59:59.999Z, "startDate": 2019-04-01T00:00:00.000Z, }, }, - "august": Object { + "august": { "_title": "august", - "title": "t(curiosity-toolbar.granularityRangedMonthly, {\\"context\\":\\"August 2018\\"})", - "value": Object { + "title": "t(curiosity-toolbar.granularityRangedMonthly, {"context":"August 2018"})", + "value": { "endDate": 2018-08-31T23:59:59.999Z, "startDate": 2018-08-01T00:00:00.000Z, }, }, - "current": Object { + "current": { "_title": "current", "isCurrent": true, - "title": "t(curiosity-toolbar.granularityRangedMonthly, {\\"context\\":\\"current\\"})", - "value": Object { + "title": "t(curiosity-toolbar.granularityRangedMonthly, {"context":"current"})", + "value": { "endDate": 2019-07-31T23:59:59.999Z, "startDate": 2019-07-01T00:00:00.000Z, }, }, - "december": Object { + "december": { "_title": "december", - "title": "t(curiosity-toolbar.granularityRangedMonthly, {\\"context\\":\\"December 2018\\"})", - "value": Object { + "title": "t(curiosity-toolbar.granularityRangedMonthly, {"context":"December 2018"})", + "value": { "endDate": 2018-12-31T23:59:59.999Z, "startDate": 2018-12-01T00:00:00.000Z, }, }, - "february": Object { + "february": { "_title": "february", - "title": "t(curiosity-toolbar.granularityRangedMonthly, {\\"context\\":\\"February\\"})", - "value": Object { + "title": "t(curiosity-toolbar.granularityRangedMonthly, {"context":"February"})", + "value": { "endDate": 2019-02-28T23:59:59.999Z, "startDate": 2019-02-01T00:00:00.000Z, }, }, - "january": Object { + "january": { "_title": "january", - "title": "t(curiosity-toolbar.granularityRangedMonthly, {\\"context\\":\\"January\\"})", - "value": Object { + "title": "t(curiosity-toolbar.granularityRangedMonthly, {"context":"January"})", + "value": { "endDate": 2019-01-31T23:59:59.999Z, "startDate": 2019-01-01T00:00:00.000Z, }, }, - "july": Object { + "july": { "_title": "july", - "title": "t(curiosity-toolbar.granularityRangedMonthly, {\\"context\\":\\"July\\"})", - "value": Object { + "title": "t(curiosity-toolbar.granularityRangedMonthly, {"context":"July"})", + "value": { "endDate": 2019-07-31T23:59:59.999Z, "startDate": 2019-07-01T00:00:00.000Z, }, }, - "june": Object { + "june": { "_title": "june", - "title": "t(curiosity-toolbar.granularityRangedMonthly, {\\"context\\":\\"June\\"})", - "value": Object { + "title": "t(curiosity-toolbar.granularityRangedMonthly, {"context":"June"})", + "value": { "endDate": 2019-06-30T23:59:59.999Z, "startDate": 2019-06-01T00:00:00.000Z, }, }, - "march": Object { + "march": { "_title": "march", - "title": "t(curiosity-toolbar.granularityRangedMonthly, {\\"context\\":\\"March\\"})", - "value": Object { + "title": "t(curiosity-toolbar.granularityRangedMonthly, {"context":"March"})", + "value": { "endDate": 2019-03-31T23:59:59.999Z, "startDate": 2019-03-01T00:00:00.000Z, }, }, - "may": Object { + "may": { "_title": "may", - "title": "t(curiosity-toolbar.granularityRangedMonthly, {\\"context\\":\\"May\\"})", - "value": Object { + "title": "t(curiosity-toolbar.granularityRangedMonthly, {"context":"May"})", + "value": { "endDate": 2019-05-31T23:59:59.999Z, "startDate": 2019-05-01T00:00:00.000Z, }, }, - "november": Object { + "november": { "_title": "november", - "title": "t(curiosity-toolbar.granularityRangedMonthly, {\\"context\\":\\"November 2018\\"})", - "value": Object { + "title": "t(curiosity-toolbar.granularityRangedMonthly, {"context":"November 2018"})", + "value": { "endDate": 2018-11-30T23:59:59.999Z, "startDate": 2018-11-01T00:00:00.000Z, }, }, - "october": Object { + "october": { "_title": "october", - "title": "t(curiosity-toolbar.granularityRangedMonthly, {\\"context\\":\\"October 2018\\"})", - "value": Object { + "title": "t(curiosity-toolbar.granularityRangedMonthly, {"context":"October 2018"})", + "value": { "endDate": 2018-10-31T23:59:59.999Z, "startDate": 2018-10-01T00:00:00.000Z, }, }, - "september": Object { + "september": { "_title": "september", - "title": "t(curiosity-toolbar.granularityRangedMonthly, {\\"context\\":\\"September 2018\\"})", - "value": Object { + "title": "t(curiosity-toolbar.granularityRangedMonthly, {"context":"September 2018"})", + "value": { "endDate": 2018-09-30T23:59:59.999Z, "startDate": 2018-09-01T00:00:00.000Z, }, }, }, - "listDateTimeRanges": Array [ - Object { + "listDateTimeRanges": [ + { "_title": "current", "isCurrent": true, - "title": "t(curiosity-toolbar.granularityRangedMonthly, {\\"context\\":\\"current\\"})", - "value": Object { + "title": "t(curiosity-toolbar.granularityRangedMonthly, {"context":"current"})", + "value": { "endDate": 2019-07-31T23:59:59.999Z, "startDate": 2019-07-01T00:00:00.000Z, }, }, - Object { + { "_title": "june", - "title": "t(curiosity-toolbar.granularityRangedMonthly, {\\"context\\":\\"June\\"})", - "value": Object { + "title": "t(curiosity-toolbar.granularityRangedMonthly, {"context":"June"})", + "value": { "endDate": 2019-06-30T23:59:59.999Z, "startDate": 2019-06-01T00:00:00.000Z, }, }, - Object { + { "_title": "may", - "title": "t(curiosity-toolbar.granularityRangedMonthly, {\\"context\\":\\"May\\"})", - "value": Object { + "title": "t(curiosity-toolbar.granularityRangedMonthly, {"context":"May"})", + "value": { "endDate": 2019-05-31T23:59:59.999Z, "startDate": 2019-05-01T00:00:00.000Z, }, }, - Object { + { "_title": "april", - "title": "t(curiosity-toolbar.granularityRangedMonthly, {\\"context\\":\\"April\\"})", - "value": Object { + "title": "t(curiosity-toolbar.granularityRangedMonthly, {"context":"April"})", + "value": { "endDate": 2019-04-30T23:59:59.999Z, "startDate": 2019-04-01T00:00:00.000Z, }, }, - Object { + { "_title": "march", - "title": "t(curiosity-toolbar.granularityRangedMonthly, {\\"context\\":\\"March\\"})", - "value": Object { + "title": "t(curiosity-toolbar.granularityRangedMonthly, {"context":"March"})", + "value": { "endDate": 2019-03-31T23:59:59.999Z, "startDate": 2019-03-01T00:00:00.000Z, }, }, - Object { + { "_title": "february", - "title": "t(curiosity-toolbar.granularityRangedMonthly, {\\"context\\":\\"February\\"})", - "value": Object { + "title": "t(curiosity-toolbar.granularityRangedMonthly, {"context":"February"})", + "value": { "endDate": 2019-02-28T23:59:59.999Z, "startDate": 2019-02-01T00:00:00.000Z, }, }, - Object { + { "_title": "january", - "title": "t(curiosity-toolbar.granularityRangedMonthly, {\\"context\\":\\"January\\"})", - "value": Object { + "title": "t(curiosity-toolbar.granularityRangedMonthly, {"context":"January"})", + "value": { "endDate": 2019-01-31T23:59:59.999Z, "startDate": 2019-01-01T00:00:00.000Z, }, }, - Object { + { "_title": "december", - "title": "t(curiosity-toolbar.granularityRangedMonthly, {\\"context\\":\\"December 2018\\"})", - "value": Object { + "title": "t(curiosity-toolbar.granularityRangedMonthly, {"context":"December 2018"})", + "value": { "endDate": 2018-12-31T23:59:59.999Z, "startDate": 2018-12-01T00:00:00.000Z, }, }, - Object { + { "_title": "november", - "title": "t(curiosity-toolbar.granularityRangedMonthly, {\\"context\\":\\"November 2018\\"})", - "value": Object { + "title": "t(curiosity-toolbar.granularityRangedMonthly, {"context":"November 2018"})", + "value": { "endDate": 2018-11-30T23:59:59.999Z, "startDate": 2018-11-01T00:00:00.000Z, }, }, - Object { + { "_title": "october", - "title": "t(curiosity-toolbar.granularityRangedMonthly, {\\"context\\":\\"October 2018\\"})", - "value": Object { + "title": "t(curiosity-toolbar.granularityRangedMonthly, {"context":"October 2018"})", + "value": { "endDate": 2018-10-31T23:59:59.999Z, "startDate": 2018-10-01T00:00:00.000Z, }, }, - Object { + { "_title": "september", - "title": "t(curiosity-toolbar.granularityRangedMonthly, {\\"context\\":\\"September 2018\\"})", - "value": Object { + "title": "t(curiosity-toolbar.granularityRangedMonthly, {"context":"September 2018"})", + "value": { "endDate": 2018-09-30T23:59:59.999Z, "startDate": 2018-09-01T00:00:00.000Z, }, }, - Object { + { "_title": "august", - "title": "t(curiosity-toolbar.granularityRangedMonthly, {\\"context\\":\\"August 2018\\"})", - "value": Object { + "title": "t(curiosity-toolbar.granularityRangedMonthly, {"context":"August 2018"})", + "value": { "endDate": 2018-08-31T23:59:59.999Z, "startDate": 2018-08-01T00:00:00.000Z, }, @@ -393,31 +393,31 @@ Object { `; exports[`DateHelpers should return a predictable range based on granularity: granularity range of time 1`] = ` -Array [ - Object { +[ + { "granularity": "Daily", - "range": Object { + "range": { "endDate": 2019-07-20T23:59:59.999Z, "startDate": 2019-06-20T00:00:00.000Z, }, }, - Object { + { "granularity": "Weekly", - "range": Object { + "range": { "endDate": 2019-07-14T23:59:59.999Z, "startDate": 2019-04-21T00:00:00.000Z, }, }, - Object { + { "granularity": "Monthly", - "range": Object { + "range": { "endDate": 2019-07-01T23:59:59.999Z, "startDate": 2018-07-01T00:00:00.000Z, }, }, - Object { + { "granularity": "Quarterly", - "range": Object { + "range": { "endDate": 2019-07-01T23:59:59.999Z, "startDate": 2016-07-01T00:00:00.000Z, }, @@ -426,9 +426,9 @@ Array [ `; exports[`DateHelpers should return a predictable range of time: range of time 1`] = ` -Object { +{ "currentDate": 2019-07-20T00:00:00.000Z, - "rangeDateTime": Object { + "rangeDateTime": { "endDate": 2019-07-20T23:59:59.999Z, "startDate": 2019-07-15T00:00:00.000Z, }, diff --git a/src/common/__tests__/__snapshots__/downloadHelpers.test.js.snap b/src/common/__tests__/__snapshots__/downloadHelpers.test.js.snap index 04ccf7ca5..32ef67ce0 100644 --- a/src/common/__tests__/__snapshots__/downloadHelpers.test.js.snap +++ b/src/common/__tests__/__snapshots__/downloadHelpers.test.js.snap @@ -1,14 +1,14 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`DownloadHelpers should attempt to download data: data download 1`] = ` -Object { +{ "data": "", "fileName": "download.txt", } `; exports[`DownloadHelpers should have specific functions: helpers 1`] = ` -Object { +{ "debugLog": [Function], "downloadData": [Function], } diff --git a/src/common/__tests__/__snapshots__/helpers.test.js.snap b/src/common/__tests__/__snapshots__/helpers.test.js.snap index 539c002de..cbcffca27 100644 --- a/src/common/__tests__/__snapshots__/helpers.test.js.snap +++ b/src/common/__tests__/__snapshots__/helpers.test.js.snap @@ -7,7 +7,7 @@ t { `; exports[`Helpers should expose a window object: limited window object 1`] = ` -Object { +{ "DEV_MODE": false, "PROD_MODE": false, "REVIEW_MODE": false, @@ -49,7 +49,7 @@ Object { `; exports[`Helpers should expose a window object: window object 1`] = ` -Object { +{ "DEV_MODE": false, "PROD_MODE": false, "REVIEW_MODE": false, @@ -91,9 +91,9 @@ Object { `; exports[`Helpers should handle use aggregate error, or fallback: emulated aggregate error 1`] = ` -Object { +{ "aggregated": [AggregateError: testing aggregated], - "errors": Array [ + "errors": [ [Error: lorem ipsum], [Error: dolor sit], ], @@ -103,7 +103,7 @@ Object { `; exports[`Helpers should have specific functions: helpers 1`] = ` -Object { +{ "DEV_MODE": false, "PROD_MODE": false, "REVIEW_MODE": false, diff --git a/src/components/authentication/__tests__/__snapshots__/authentication.test.js.snap b/src/components/authentication/__tests__/__snapshots__/authentication.test.js.snap index 063677b7e..a8dbca8b2 100644 --- a/src/components/authentication/__tests__/__snapshots__/authentication.test.js.snap +++ b/src/components/authentication/__tests__/__snapshots__/authentication.test.js.snap @@ -3,7 +3,7 @@ exports[`Authentication Component should allow being disabled: disabled 1`] = ` , - "value": Object { + "value": { "chartContainerRef": [Function], - "chartSettings": Object { - "chartDomain": Object { - "domain": Object { - "y": Array [ + "chartSettings": { + "chartDomain": { + "domain": { + "y": [ 0, 3, ], }, }, - "chartElementsProps": Object { - "elements": Array [ - Object { + "chartElementsProps": { + "elements": [ + { "chartType": undefined, - "props": Object { - "data": Array [ - Object { + "props": { + "data": [ + { "x": 1, "xAxisLabel": "1 x axis label", "y": 1, }, - Object { + { "x": 2, "xAxisLabel": "2 x axis label", "y": 2, @@ -56,8 +56,8 @@ Array [ ], "key": "chart-ipsumGraph-", "name": "chart-ipsumGraph-", - "style": Object { - "data": Object { + "style": { + "data": { "fill": "#ipsum", "stroke": "#lorem", "strokeDasharray": "4,3", @@ -71,17 +71,17 @@ Array [ }, }, ], - "elementsById": Object { - "ipsumGraph": Object { + "elementsById": { + "ipsumGraph": { "chartType": undefined, - "props": Object { - "data": Array [ - Object { + "props": { + "data": [ + { "x": 1, "xAxisLabel": "1 x axis label", "y": 1, }, - Object { + { "x": 2, "xAxisLabel": "2 x axis label", "y": 2, @@ -89,8 +89,8 @@ Array [ ], "key": "chart-ipsumGraph-", "name": "chart-ipsumGraph-", - "style": Object { - "data": Object { + "style": { + "data": { "fill": "#ipsum", "stroke": "#lorem", "strokeDasharray": "4,3", @@ -104,17 +104,17 @@ Array [ }, }, }, - "stackedElements": Array [ - Object { + "stackedElements": [ + { "chartType": undefined, - "props": Object { - "data": Array [ - Object { + "props": { + "data": [ + { "x": 1, "xAxisLabel": "1 x axis label", "y": 1, }, - Object { + { "x": 2, "xAxisLabel": "2 x axis label", "y": 2, @@ -122,8 +122,8 @@ Array [ ], "key": "chart-loremGraph-", "name": "chart-loremGraph-", - "style": Object { - "data": Object { + "style": { + "data": { "fill": "#ipsum", "stroke": "#lorem", "strokeWidth": 2, @@ -136,17 +136,17 @@ Array [ }, }, ], - "stackedElementsById": Object { - "loremGraph": Object { + "stackedElementsById": { + "loremGraph": { "chartType": undefined, - "props": Object { - "data": Array [ - Object { + "props": { + "data": [ + { "x": 1, "xAxisLabel": "1 x axis label", "y": 1, }, - Object { + { "x": 2, "xAxisLabel": "2 x axis label", "y": 2, @@ -154,8 +154,8 @@ Array [ ], "key": "chart-loremGraph-", "name": "chart-loremGraph-", - "style": Object { - "data": Object { + "style": { + "data": { "fill": "#ipsum", "stroke": "#lorem", "strokeWidth": 2, @@ -171,15 +171,15 @@ Array [ }, "chartLegend": null, "chartWidth": 0, - "dataSets": Array [ - Object { - "data": Array [ - Object { + "dataSets": [ + { + "data": [ + { "x": 1, "xAxisLabel": "1 x axis label", "y": 1, }, - Object { + { "x": 2, "xAxisLabel": "2 x axis label", "y": 2, @@ -191,14 +191,14 @@ Array [ "stroke": "#lorem", "strokeWidth": 2, }, - Object { - "data": Array [ - Object { + { + "data": [ + { "x": 1, "xAxisLabel": "1 x axis label", "y": 1, }, - Object { + { "x": 2, "xAxisLabel": "2 x axis label", "y": 2, @@ -216,40 +216,40 @@ Array [ "isMultiYAxis": false, "maxX": 2, "maxY": 2, - "padding": Object { + "padding": { "bottom": 75, "left": 55, "right": 55, "top": 50, }, "themeColor": "blue", - "tooltipDataSetLookUp": Object {}, - "xAxisProps": Object { + "tooltipDataSetLookUp": {}, + "xAxisProps": { "fixLabelOverlap": true, "label": null, "tickFormat": [Function], - "tickValues": Array [ + "tickValues": [ 1, 2, ], }, - "yAxisProps": Array [ - Object { + "yAxisProps": [ + { "dependentAxis": true, "label": null, "orientation": "left", "showGrid": true, - "style": Object { - "axis": Object {}, - "tickLabels": Object {}, + "style": { + "axis": {}, + "tickLabels": {}, }, "tickFormat": [Function], }, ], }, "chartTooltipRef": [Function], - "dataSetsToggle": Array [ - Object {}, + "dataSetsToggle": [ + {}, [Function], ], }, diff --git a/src/components/chart/__tests__/__snapshots__/chartAxisLabel.test.js.snap b/src/components/chart/__tests__/__snapshots__/chartAxisLabel.test.js.snap index 435db045b..781fee2fd 100644 --- a/src/components/chart/__tests__/__snapshots__/chartAxisLabel.test.js.snap +++ b/src/components/chart/__tests__/__snapshots__/chartAxisLabel.test.js.snap @@ -11,7 +11,7 @@ exports[`ChartAxisLabel Component should handle an undefined coordinate: undefin
, @@ -187,7 +187,7 @@ exports[`ChartElements Component should render a basic component: basic 1`] = ` @@ -218,7 +218,7 @@ exports[`ChartElements Component should render a basic component: basic 1`] = ` @@ -249,7 +249,7 @@ exports[`ChartElements Component should render a basic component: basic 1`] = ` @@ -280,7 +280,7 @@ exports[`ChartElements Component should render a basic component: basic 1`] = ` @@ -325,7 +325,7 @@ exports[`ChartElements Component should render a basic component: basic 1`] = ` @@ -356,7 +356,7 @@ exports[`ChartElements Component should render a basic component: basic 1`] = ` @@ -387,7 +387,7 @@ exports[`ChartElements Component should render a basic component: basic 1`] = ` @@ -418,7 +418,7 @@ exports[`ChartElements Component should render a basic component: basic 1`] = ` @@ -449,7 +449,7 @@ exports[`ChartElements Component should render a basic component: basic 1`] = ` diff --git a/src/components/chart/__tests__/__snapshots__/chartHelpers.test.js.snap b/src/components/chart/__tests__/__snapshots__/chartHelpers.test.js.snap index 896772bca..e03f88252 100644 --- a/src/components/chart/__tests__/__snapshots__/chartHelpers.test.js.snap +++ b/src/components/chart/__tests__/__snapshots__/chartHelpers.test.js.snap @@ -1,22 +1,22 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`ChartHelpers should aggregated generated x,y axis props: default settings 1`] = ` -Object { - "xAxisProps": Object { +{ + "xAxisProps": { "fixLabelOverlap": true, "label": undefined, "tickFormat": [Function], - "tickValues": Array [], + "tickValues": [], }, - "yAxisProps": Array [ - Object { + "yAxisProps": [ + { "dependentAxis": true, "label": undefined, "orientation": "left", "showGrid": true, - "style": Object { - "axis": Object {}, - "tickLabels": Object {}, + "style": { + "axis": {}, + "tickLabels": {}, }, "tickFormat": [Function], }, @@ -25,8 +25,8 @@ Object { `; exports[`ChartHelpers should generate a max x, max y from datasets: max x, y 1`] = ` -Object { - "individualMaxY": Object { +{ + "individualMaxY": { "dolor": 100, "ipsum": 100, "lorem": 10, @@ -37,43 +37,43 @@ Object { `; exports[`ChartHelpers should generate domain ranges: domain, maxY less than 0.1 1`] = ` -Object { - "domain": Object { - "y": Array [ +{ + "domain": { + "y": [ 0, 0.0125, ], }, - "padding": Object {}, + "padding": {}, } `; exports[`ChartHelpers should generate domain ranges: domain, maxY number 1`] = ` -Object { - "domain": Object { - "y": Array [ +{ + "domain": { + "y": [ 0, 300, ], }, - "padding": Object {}, + "padding": {}, } `; exports[`ChartHelpers should generate domain ranges: domain, maxY object 1`] = ` -Object { - "domain": Object { - "y": Array [ +{ + "domain": { + "y": [ 0, 1.25, ], }, - "padding": Object {}, + "padding": {}, } `; exports[`ChartHelpers should generate element props: custom valueFormats 1`] = ` -Object { +{ "xValueNaN": 0, "xValueNull": null, "xValueNumber": 0, @@ -88,41 +88,41 @@ Object { `; exports[`ChartHelpers should generate element props: props 1`] = ` -Object { - "elements": Array [ - Object { +{ + "elements": [ + { "chartType": undefined, - "props": Object { - "data": Array [ - Object { + "props": { + "data": [ + { "x": 0, "y": 10, }, - Object { + { "x": 1, "y": 10, }, - Object { + { "x": 2, "y": 10, }, - Object { + { "x": 3, "y": 10, }, - Object { + { "x": 4, "y": 10, }, - Object { + { "x": 5, "y": 10, }, ], "key": "chart-lorem-", "name": "chart-lorem-", - "style": Object { - "data": Object {}, + "style": { + "data": {}, }, "themeColor": undefined, "themeVariant": undefined, @@ -131,40 +131,40 @@ Object { }, }, ], - "elementsById": Object { - "lorem": Object { + "elementsById": { + "lorem": { "chartType": undefined, - "props": Object { - "data": Array [ - Object { + "props": { + "data": [ + { "x": 0, "y": 10, }, - Object { + { "x": 1, "y": 10, }, - Object { + { "x": 2, "y": 10, }, - Object { + { "x": 3, "y": 10, }, - Object { + { "x": 4, "y": 10, }, - Object { + { "x": 5, "y": 10, }, ], "key": "chart-lorem-", "name": "chart-lorem-", - "style": Object { - "data": Object {}, + "style": { + "data": {}, }, "themeColor": undefined, "themeVariant": undefined, @@ -173,40 +173,40 @@ Object { }, }, }, - "stackedElements": Array [ - Object { + "stackedElements": [ + { "chartType": undefined, - "props": Object { - "data": Array [ - Object { + "props": { + "data": [ + { "x": 0, "y": 20, }, - Object { + { "x": 1, "y": 10, }, - Object { + { "x": 2, "y": 30, }, - Object { + { "x": 3, "y": 50, }, - Object { + { "x": 4, "y": 100, }, - Object { + { "x": 5, "y": 10, }, ], "key": "chart-ipsum-", "name": "chart-ipsum-", - "style": Object { - "data": Object {}, + "style": { + "data": {}, }, "themeColor": undefined, "themeVariant": undefined, @@ -214,32 +214,32 @@ Object { "y": [Function], }, }, - Object { + { "chartType": undefined, - "props": Object { + "props": { "animate": true, - "data": Array [ - Object { + "data": [ + { "x": 0, "y": 20, }, - Object { + { "x": 1, "y": 10, }, - Object { + { "x": 2, "y": 30, }, - Object { + { "x": 3, "y": 50, }, - Object { + { "x": 4, "y": 100, }, - Object { + { "x": 5, "y": 10, }, @@ -247,8 +247,8 @@ Object { "interpolation": "lorem ipsum interpolation", "key": "chart-dolor-", "name": "chart-dolor-", - "style": Object { - "data": Object {}, + "style": { + "data": {}, }, "themeColor": undefined, "themeVariant": undefined, @@ -257,33 +257,33 @@ Object { }, }, ], - "stackedElementsById": Object { - "dolor": Object { + "stackedElementsById": { + "dolor": { "chartType": undefined, - "props": Object { + "props": { "animate": true, - "data": Array [ - Object { + "data": [ + { "x": 0, "y": 20, }, - Object { + { "x": 1, "y": 10, }, - Object { + { "x": 2, "y": 30, }, - Object { + { "x": 3, "y": 50, }, - Object { + { "x": 4, "y": 100, }, - Object { + { "x": 5, "y": 10, }, @@ -291,8 +291,8 @@ Object { "interpolation": "lorem ipsum interpolation", "key": "chart-dolor-", "name": "chart-dolor-", - "style": Object { - "data": Object {}, + "style": { + "data": {}, }, "themeColor": undefined, "themeVariant": undefined, @@ -300,39 +300,39 @@ Object { "y": [Function], }, }, - "ipsum": Object { + "ipsum": { "chartType": undefined, - "props": Object { - "data": Array [ - Object { + "props": { + "data": [ + { "x": 0, "y": 20, }, - Object { + { "x": 1, "y": 10, }, - Object { + { "x": 2, "y": 30, }, - Object { + { "x": 3, "y": 50, }, - Object { + { "x": 4, "y": 100, }, - Object { + { "x": 5, "y": 10, }, ], "key": "chart-ipsum-", "name": "chart-ipsum-", - "style": Object { - "data": Object {}, + "style": { + "data": {}, }, "themeColor": undefined, "themeVariant": undefined, @@ -345,32 +345,32 @@ Object { `; exports[`ChartHelpers should generate tooltip data/content: tooltip, content 1`] = ` -Array [ - Array [ - Object { - "datum": Object { +[ + [ + { + "datum": { "index": 0, - "itemsByKey": Object { - "dolor": Object { + "itemsByKey": { + "dolor": { "chartType": undefined, "color": "", - "data": Object { + "data": { "x": 0, "y": 20, }, }, - "ipsum": Object { + "ipsum": { "chartType": undefined, "color": "", - "data": Object { + "data": { "x": 0, "y": 20, }, }, - "lorem": Object { + "lorem": { "chartType": undefined, "color": "", - "data": Object { + "data": { "x": 0, "y": 10, }, @@ -381,31 +381,31 @@ Array [ }, }, ], - Array [ - Object { - "datum": Object { + [ + { + "datum": { "index": 1, - "itemsByKey": Object { - "dolor": Object { + "itemsByKey": { + "dolor": { "chartType": undefined, "color": "", - "data": Object { + "data": { "x": 1, "y": 10, }, }, - "ipsum": Object { + "ipsum": { "chartType": undefined, "color": "", - "data": Object { + "data": { "x": 1, "y": 10, }, }, - "lorem": Object { + "lorem": { "chartType": undefined, "color": "", - "data": Object { + "data": { "x": 1, "y": 10, }, @@ -416,31 +416,31 @@ Array [ }, }, ], - Array [ - Object { - "datum": Object { + [ + { + "datum": { "index": 2, - "itemsByKey": Object { - "dolor": Object { + "itemsByKey": { + "dolor": { "chartType": undefined, "color": "", - "data": Object { + "data": { "x": 2, "y": 30, }, }, - "ipsum": Object { + "ipsum": { "chartType": undefined, "color": "", - "data": Object { + "data": { "x": 2, "y": 30, }, }, - "lorem": Object { + "lorem": { "chartType": undefined, "color": "", - "data": Object { + "data": { "x": 2, "y": 10, }, @@ -451,31 +451,31 @@ Array [ }, }, ], - Array [ - Object { - "datum": Object { + [ + { + "datum": { "index": 3, - "itemsByKey": Object { - "dolor": Object { + "itemsByKey": { + "dolor": { "chartType": undefined, "color": "", - "data": Object { + "data": { "x": 3, "y": 50, }, }, - "ipsum": Object { + "ipsum": { "chartType": undefined, "color": "", - "data": Object { + "data": { "x": 3, "y": 50, }, }, - "lorem": Object { + "lorem": { "chartType": undefined, "color": "", - "data": Object { + "data": { "x": 3, "y": 10, }, @@ -486,31 +486,31 @@ Array [ }, }, ], - Array [ - Object { - "datum": Object { + [ + { + "datum": { "index": 4, - "itemsByKey": Object { - "dolor": Object { + "itemsByKey": { + "dolor": { "chartType": undefined, "color": "", - "data": Object { + "data": { "x": 4, "y": 100, }, }, - "ipsum": Object { + "ipsum": { "chartType": undefined, "color": "", - "data": Object { + "data": { "x": 4, "y": 100, }, }, - "lorem": Object { + "lorem": { "chartType": undefined, "color": "", - "data": Object { + "data": { "x": 4, "y": 10, }, @@ -521,31 +521,31 @@ Array [ }, }, ], - Array [ - Object { - "datum": Object { + [ + { + "datum": { "index": 5, - "itemsByKey": Object { - "dolor": Object { + "itemsByKey": { + "dolor": { "chartType": undefined, "color": "", - "data": Object { + "data": { "x": 5, "y": 10, }, }, - "ipsum": Object { + "ipsum": { "chartType": undefined, "color": "", - "data": Object { + "data": { "x": 5, "y": 10, }, }, - "lorem": Object { + "lorem": { "chartType": undefined, "color": "", - "data": Object { + "data": { "x": 5, "y": 10, }, @@ -560,29 +560,29 @@ Array [ `; exports[`ChartHelpers should generate tooltip data/content: tooltip, settings 1`] = ` -Object { - "0": Object { - "itemsByKey": Object { - "dolor": Object { +{ + "0": { + "itemsByKey": { + "dolor": { "chartType": undefined, "color": "", - "data": Object { + "data": { "x": 0, "y": 20, }, }, - "ipsum": Object { + "ipsum": { "chartType": undefined, "color": "", - "data": Object { + "data": { "x": 0, "y": 20, }, }, - "lorem": Object { + "lorem": { "chartType": undefined, "color": "", - "data": Object { + "data": { "x": 0, "y": 10, }, @@ -592,28 +592,28 @@ Object { "x": 0, "y": null, }, - "1": Object { - "itemsByKey": Object { - "dolor": Object { + "1": { + "itemsByKey": { + "dolor": { "chartType": undefined, "color": "", - "data": Object { + "data": { "x": 1, "y": 10, }, }, - "ipsum": Object { + "ipsum": { "chartType": undefined, "color": "", - "data": Object { + "data": { "x": 1, "y": 10, }, }, - "lorem": Object { + "lorem": { "chartType": undefined, "color": "", - "data": Object { + "data": { "x": 1, "y": 10, }, @@ -623,28 +623,28 @@ Object { "x": 1, "y": null, }, - "2": Object { - "itemsByKey": Object { - "dolor": Object { + "2": { + "itemsByKey": { + "dolor": { "chartType": undefined, "color": "", - "data": Object { + "data": { "x": 2, "y": 30, }, }, - "ipsum": Object { + "ipsum": { "chartType": undefined, "color": "", - "data": Object { + "data": { "x": 2, "y": 30, }, }, - "lorem": Object { + "lorem": { "chartType": undefined, "color": "", - "data": Object { + "data": { "x": 2, "y": 10, }, @@ -654,28 +654,28 @@ Object { "x": 2, "y": null, }, - "3": Object { - "itemsByKey": Object { - "dolor": Object { + "3": { + "itemsByKey": { + "dolor": { "chartType": undefined, "color": "", - "data": Object { + "data": { "x": 3, "y": 50, }, }, - "ipsum": Object { + "ipsum": { "chartType": undefined, "color": "", - "data": Object { + "data": { "x": 3, "y": 50, }, }, - "lorem": Object { + "lorem": { "chartType": undefined, "color": "", - "data": Object { + "data": { "x": 3, "y": 10, }, @@ -685,28 +685,28 @@ Object { "x": 3, "y": null, }, - "4": Object { - "itemsByKey": Object { - "dolor": Object { + "4": { + "itemsByKey": { + "dolor": { "chartType": undefined, "color": "", - "data": Object { + "data": { "x": 4, "y": 100, }, }, - "ipsum": Object { + "ipsum": { "chartType": undefined, "color": "", - "data": Object { + "data": { "x": 4, "y": 100, }, }, - "lorem": Object { + "lorem": { "chartType": undefined, "color": "", - "data": Object { + "data": { "x": 4, "y": 10, }, @@ -716,28 +716,28 @@ Object { "x": 4, "y": null, }, - "5": Object { - "itemsByKey": Object { - "dolor": Object { + "5": { + "itemsByKey": { + "dolor": { "chartType": undefined, "color": "", - "data": Object { + "data": { "x": 5, "y": 10, }, }, - "ipsum": Object { + "ipsum": { "chartType": undefined, "color": "", - "data": Object { + "data": { "x": 5, "y": 10, }, }, - "lorem": Object { + "lorem": { "chartType": undefined, "color": "", - "data": Object { + "data": { "x": 5, "y": 10, }, @@ -751,18 +751,18 @@ Object { `; exports[`ChartHelpers should generate x axis props: format callback 1`] = ` -Array [ - Object { - "item": Object { +[ + { + "item": { "x": 1, "y": 10, }, "maxX": 6, - "nextItem": Object { + "nextItem": { "x": 2, "y": 10, }, - "previousItem": Object { + "previousItem": { "x": 0, "y": 10, }, @@ -772,10 +772,10 @@ Array [ `; exports[`ChartHelpers should generate x axis props: props 1`] = ` -Object { +{ "label": undefined, "tickFormat": [Function], - "tickValues": Array [ + "tickValues": [ 0, 1, 2, @@ -787,8 +787,8 @@ Object { `; exports[`ChartHelpers should generate y axis props: format callback, 0, left axis 1`] = ` -Array [ - Object { +[ + { "isMultiAxis": true, "maxY": 10, "tick": 10, @@ -797,8 +797,8 @@ Array [ `; exports[`ChartHelpers should generate y axis props: format callback, 1, right axis 1`] = ` -Array [ - Object { +[ + { "isMultiAxis": true, "maxY": 100, "tick": 100, @@ -807,25 +807,25 @@ Array [ `; exports[`ChartHelpers should generate y axis props: props 1`] = ` -Array [ - Object { +[ + { "label": undefined, "orientation": "left", - "style": Object { - "axis": Object {}, - "tickLabels": Object {}, + "style": { + "axis": {}, + "tickLabels": {}, }, "tickFormat": [Function], }, - Object { + { "label": undefined, "orientation": "right", - "style": Object { - "axis": Object { + "style": { + "axis": { "stroke": "lorem ipsum stroke", "strokeWidth": 2, }, - "tickLabels": Object {}, + "tickLabels": {}, }, "tickFormat": [Function], }, @@ -833,7 +833,7 @@ Array [ `; exports[`ChartHelpers should return specific properties: specific properties 1`] = ` -Object { +{ "generateAxisProps": [Function], "generateDomains": [Function], "generateElementsProps": [Function], diff --git a/src/components/chart/__tests__/__snapshots__/chartIcon.test.js.snap b/src/components/chart/__tests__/__snapshots__/chartIcon.test.js.snap index 0aaf5d0ab..0ead16ffb 100644 --- a/src/components/chart/__tests__/__snapshots__/chartIcon.test.js.snap +++ b/src/components/chart/__tests__/__snapshots__/chartIcon.test.js.snap @@ -6,7 +6,7 @@ exports[`ChartIcon Component should handle basic icons, variations in settings: >
diff --git a/src/components/graphCard/__tests__/__snapshots__/graphCard.test.js.snap b/src/components/graphCard/__tests__/__snapshots__/graphCard.test.js.snap index 7b9f843df..788a65e21 100644 --- a/src/components/graphCard/__tests__/__snapshots__/graphCard.test.js.snap +++ b/src/components/graphCard/__tests__/__snapshots__/graphCard.test.js.snap @@ -6,8 +6,8 @@ exports[`GraphCard Component should render a basic component: basic 1`] = ` 0 and NOT hasData on report 1`] = ` -Object { +{ "daily": t(curiosity-graph.label_noData) , @@ -85,7 +85,7 @@ Object { `; exports[`GraphCardChartTooltip Component should return a formatted tooltip based on data and granularity: data display > 0 and UNDEFINED hasData on report 1`] = ` -Object { +{ "daily": 50 , @@ -102,7 +102,7 @@ Object { `; exports[`GraphCardChartTooltip Component should return a formatted tooltip based on data and granularity: data display > 0 and hasData on report 1`] = ` -Object { +{ "daily": 50 , @@ -119,7 +119,7 @@ Object { `; exports[`GraphCardChartTooltip Component should return a formatted tooltip based on data and granularity: data display for null and NOT hasData on report 1`] = ` -Object { +{ "daily": t(curiosity-graph.label_noData) , @@ -136,7 +136,7 @@ Object { `; exports[`GraphCardChartTooltip Component should return a formatted tooltip based on data and granularity: data display for null and UNDEFINED hasData on report 1`] = ` -Object { +{ "daily": 0 , @@ -153,7 +153,7 @@ Object { `; exports[`GraphCardChartTooltip Component should return a formatted tooltip based on data and granularity: data display for null and hasData on report 1`] = ` -Object { +{ "daily": 0 , @@ -170,7 +170,7 @@ Object { `; exports[`GraphCardChartTooltip Component should return a formatted tooltip based on data and granularity: data display for zero and NOT hasData on report 1`] = ` -Object { +{ "daily": t(curiosity-graph.label_noData) , @@ -187,7 +187,7 @@ Object { `; exports[`GraphCardChartTooltip Component should return a formatted tooltip based on data and granularity: data display for zero and UNDEFINED hasData on report 1`] = ` -Object { +{ "daily": 0 , @@ -204,7 +204,7 @@ Object { `; exports[`GraphCardChartTooltip Component should return a formatted tooltip based on data and granularity: data display for zero and hasData on report 1`] = ` -Object { +{ "daily": 0 , @@ -221,7 +221,7 @@ Object { `; exports[`GraphCardChartTooltip Component should return a formatted tooltip based on data and granularity: no data granularity data display 1`] = ` -Object { +{ "daily": null, "monthly": null, "quarterly": null, @@ -230,7 +230,7 @@ Object { `; exports[`GraphCardChartTooltip Component should return a formatted tooltip based on data and granularity: threshold display for > 0 and NOT hasInfinite on threshold 1`] = ` -Object { +{ "daily": 100 , @@ -247,7 +247,7 @@ Object { `; exports[`GraphCardChartTooltip Component should return a formatted tooltip based on data and granularity: threshold display for > 0 and UNDEFINED hasInfinite on threshold 1`] = ` -Object { +{ "daily": 100 , @@ -264,7 +264,7 @@ Object { `; exports[`GraphCardChartTooltip Component should return a formatted tooltip based on data and granularity: threshold display for > 0 and hasInfinite on threshold 1`] = ` -Object { +{ "daily": t(curiosity-graph.label_threshold, {"context":"infinite"}) , @@ -281,7 +281,7 @@ Object { `; exports[`GraphCardChartTooltip Component should return a formatted tooltip based on data and granularity: threshold display for null and NOT hasInfinite on threshold 1`] = ` -Object { +{ "daily": t(curiosity-graph.label_noData) , @@ -298,7 +298,7 @@ Object { `; exports[`GraphCardChartTooltip Component should return a formatted tooltip based on data and granularity: threshold display for null and UNDEFINED hasInfinite on threshold 1`] = ` -Object { +{ "daily": t(curiosity-graph.label_noData) , @@ -315,7 +315,7 @@ Object { `; exports[`GraphCardChartTooltip Component should return a formatted tooltip based on data and granularity: threshold display for null and hasInfinite on threshold 1`] = ` -Object { +{ "daily": t(curiosity-graph.label_threshold, {"context":"infinite"}) , @@ -332,7 +332,7 @@ Object { `; exports[`GraphCardChartTooltip Component should return a formatted tooltip based on data and granularity: threshold display for zero and NOT hasInfinite on threshold 1`] = ` -Object { +{ "daily": 0 , @@ -349,7 +349,7 @@ Object { `; exports[`GraphCardChartTooltip Component should return a formatted tooltip based on data and granularity: threshold display for zero and UNDEFINED hasInfinite on threshold 1`] = ` -Object { +{ "daily": 0 , @@ -366,7 +366,7 @@ Object { `; exports[`GraphCardChartTooltip Component should return a formatted tooltip based on data and granularity: threshold display for zero and hasInfinite on threshold 1`] = ` -Object { +{ "daily": t(curiosity-graph.label_threshold, {"context":"infinite"}) , diff --git a/src/components/graphCard/__tests__/__snapshots__/graphCardContext.test.js.snap b/src/components/graphCard/__tests__/__snapshots__/graphCardContext.test.js.snap index 9585ffc56..30bf645df 100644 --- a/src/components/graphCard/__tests__/__snapshots__/graphCardContext.test.js.snap +++ b/src/components/graphCard/__tests__/__snapshots__/graphCardContext.test.js.snap @@ -1,29 +1,29 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`GraphCardContext should aggregate metric API calls: aggregated calls, error 1`] = ` -Object { - "data": Object { - "dolor": Object { - "data": Array [], +{ + "data": { + "dolor": { + "data": [], "id": "dolor", - "meta": Object {}, + "meta": {}, }, - "ipsum": Object { - "data": Array [], + "ipsum": { + "data": [], "id": "ipsum", - "meta": Object {}, + "meta": {}, }, }, - "dataSets": Array [ - Object { - "data": Array [], + "dataSets": [ + { + "data": [], "id": "ipsum", - "meta": Object {}, + "meta": {}, }, - Object { - "data": Array [], + { + "data": [], "id": "dolor", - "meta": Object {}, + "meta": {}, }, ], "error": true, @@ -33,29 +33,29 @@ Object { `; exports[`GraphCardContext should aggregate metric API calls: aggregated calls, fulfilled 1`] = ` -Object { - "data": Object { - "dolor": Object { - "data": Array [], +{ + "data": { + "dolor": { + "data": [], "id": "dolor", - "meta": Object {}, + "meta": {}, }, - "ipsum": Object { - "data": Array [], + "ipsum": { + "data": [], "id": "ipsum", - "meta": Object {}, + "meta": {}, }, }, - "dataSets": Array [ - Object { - "data": Array [], + "dataSets": [ + { + "data": [], "id": "ipsum", - "meta": Object {}, + "meta": {}, }, - Object { - "data": Array [], + { + "data": [], "id": "dolor", - "meta": Object {}, + "meta": {}, }, ], "error": false, @@ -65,29 +65,29 @@ Object { `; exports[`GraphCardContext should aggregate metric API calls: aggregated calls, fulfilled error 1`] = ` -Object { - "data": Object { - "dolor": Object { - "data": Array [], +{ + "data": { + "dolor": { + "data": [], "id": "dolor", - "meta": Object {}, + "meta": {}, }, - "ipsum": Object { - "data": Array [], + "ipsum": { + "data": [], "id": "ipsum", - "meta": Object {}, + "meta": {}, }, }, - "dataSets": Array [ - Object { - "data": Array [], + "dataSets": [ + { + "data": [], "id": "ipsum", - "meta": Object {}, + "meta": {}, }, - Object { - "data": Array [], + { + "data": [], "id": "dolor", - "meta": Object {}, + "meta": {}, }, ], "error": false, @@ -97,29 +97,29 @@ Object { `; exports[`GraphCardContext should aggregate metric API calls: aggregated calls, fulfilled pending 1`] = ` -Object { - "data": Object { - "dolor": Object { - "data": Array [], +{ + "data": { + "dolor": { + "data": [], "id": "dolor", - "meta": Object {}, + "meta": {}, }, - "ipsum": Object { - "data": Array [], + "ipsum": { + "data": [], "id": "ipsum", - "meta": Object {}, + "meta": {}, }, }, - "dataSets": Array [ - Object { - "data": Array [], + "dataSets": [ + { + "data": [], "id": "ipsum", - "meta": Object {}, + "meta": {}, }, - Object { - "data": Array [], + { + "data": [], "id": "dolor", - "meta": Object {}, + "meta": {}, }, ], "error": false, @@ -129,29 +129,29 @@ Object { `; exports[`GraphCardContext should aggregate metric API calls: aggregated calls, pending 1`] = ` -Object { - "data": Object { - "dolor": Object { - "data": Array [], +{ + "data": { + "dolor": { + "data": [], "id": "dolor", - "meta": Object {}, + "meta": {}, }, - "ipsum": Object { - "data": Array [], + "ipsum": { + "data": [], "id": "ipsum", - "meta": Object {}, + "meta": {}, }, }, - "dataSets": Array [ - Object { - "data": Array [], + "dataSets": [ + { + "data": [], "id": "ipsum", - "meta": Object {}, + "meta": {}, }, - Object { - "data": Array [], + { + "data": [], "id": "dolor", - "meta": Object {}, + "meta": {}, }, ], "error": false, @@ -161,29 +161,29 @@ Object { `; exports[`GraphCardContext should aggregate metric API calls: aggregated calls, pending error 1`] = ` -Object { - "data": Object { - "dolor": Object { - "data": Array [], +{ + "data": { + "dolor": { + "data": [], "id": "dolor", - "meta": Object {}, + "meta": {}, }, - "ipsum": Object { - "data": Array [], + "ipsum": { + "data": [], "id": "ipsum", - "meta": Object {}, + "meta": {}, }, }, - "dataSets": Array [ - Object { - "data": Array [], + "dataSets": [ + { + "data": [], "id": "ipsum", - "meta": Object {}, + "meta": {}, }, - Object { - "data": Array [], + { + "data": [], "id": "dolor", - "meta": Object {}, + "meta": {}, }, ], "error": false, @@ -193,47 +193,47 @@ Object { `; exports[`GraphCardContext should return specific properties: specific properties 1`] = ` -Object { - "DEFAULT_CONTEXT": Array [ - Object { - "settings": Object { +{ + "DEFAULT_CONTEXT": [ + { + "settings": { "isStandalone": false, "metric": undefined, - "metrics": Array [], + "metrics": [], }, }, [Function], ], - "GraphCardContext": Object { + "GraphCardContext": { "$$typeof": Symbol(react.context), - "Consumer": Object { + "Consumer": { "$$typeof": Symbol(react.context), "_calculateChangedBits": null, "_context": [Circular], }, - "Provider": Object { + "Provider": { "$$typeof": Symbol(react.provider), "_context": [Circular], }, "_calculateChangedBits": null, "_currentRenderer": null, "_currentRenderer2": null, - "_currentValue": Array [ - Object { - "settings": Object { + "_currentValue": [ + { + "settings": { "isStandalone": false, "metric": undefined, - "metrics": Array [], + "metrics": [], }, }, [Function], ], - "_currentValue2": Array [ - Object { - "settings": Object { + "_currentValue2": [ + { + "settings": { "isStandalone": false, "metric": undefined, - "metrics": Array [], + "metrics": [], }, }, [Function], diff --git a/src/components/graphCard/__tests__/__snapshots__/graphCardHelpers.test.js.snap b/src/components/graphCard/__tests__/__snapshots__/graphCardHelpers.test.js.snap index b3dc19620..b919f2bc7 100644 --- a/src/components/graphCard/__tests__/__snapshots__/graphCardHelpers.test.js.snap +++ b/src/components/graphCard/__tests__/__snapshots__/graphCardHelpers.test.js.snap @@ -1,9 +1,9 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`GraphCardHelpers generateChartSettings should return base graph settings: basic filters 1`] = ` -Object { - "groupedFilters": Array [ - Object { +{ + "groupedFilters": [ + { "dolor": "sit", "id": "dolorSit", "isStacked": true, @@ -12,19 +12,19 @@ Object { "strokeWidth": 2, }, ], - "standaloneFilters": Array [], + "standaloneFilters": [], } `; exports[`GraphCardHelpers generateChartSettings should return base graph settings: no filters 1`] = ` -Object { - "groupedFilters": Array [], - "standaloneFilters": Array [], +{ + "groupedFilters": [], + "standaloneFilters": [], } `; exports[`GraphCardHelpers generateExtendedChartSettings should return extended graph settings: basic settings 1`] = ` -Object { +{ "lorem": "ipsum", "xAxisLabelIncrement": 5, "xAxisTickFormat": [Function], @@ -33,7 +33,7 @@ Object { `; exports[`GraphCardHelpers generateExtendedChartSettings should return extended graph settings: no settings 1`] = ` -Object { +{ "xAxisLabelIncrement": 1, "xAxisTickFormat": [Function], "yAxisTickFormat": [Function], @@ -41,7 +41,7 @@ Object { `; exports[`GraphCardHelpers getChartXAxisLabelIncrement should return a x axis tick increment based on granularity: x axis tick increment 1`] = ` -Object { +{ "daily": 5, "monthly": 2, "quarterly": 1, @@ -50,7 +50,7 @@ Object { `; exports[`GraphCardHelpers getTooltipDate should return a formatted date based on granularity: granularity based date 1`] = ` -Object { +{ "daily": "June 1", "monthly": "June 2019", "quarterly": "Jun 2019 - Sep 2019", @@ -59,7 +59,7 @@ Object { `; exports[`GraphCardHelpers should have specific functions: graphCardHelpers 1`] = ` -Object { +{ "generateChartSettings": [Function], "generateExtendedChartSettings": [Function], "getChartXAxisLabelIncrement": [Function], @@ -70,15 +70,15 @@ Object { `; exports[`GraphCardHelpers xAxisTickFormat should produce consistent x axis tick values: x axis should be undefined if date or granularity are missing 1`] = ` -Object { +{ "missingDate": undefined, "missingGranularity": undefined, } `; exports[`GraphCardHelpers xAxisTickFormat should produce consistent x axis tick values: x axis tick values 1`] = ` -Object { - "daily": Array [ +{ + "daily": [ "Jun 20", "Jun 21", "Jun 22", @@ -111,7 +111,7 @@ Object { "Jul 19", "Jul 20", ], - "monthly": Array [ + "monthly": [ "Jul", "Aug", "Sep", @@ -127,7 +127,7 @@ Object { "Jun", "Jul", ], - "quarterly": Array [ + "quarterly": [ "Jul", "Oct", "Jan @@ -145,7 +145,7 @@ Object { "Apr", "Jul", ], - "weekly": Array [ + "weekly": [ "Apr 21", "Apr 28", "May 5", @@ -164,7 +164,7 @@ Object { `; exports[`GraphCardHelpers yAxisTickFormat should produce consistent y axis tick values: y axis tick values 1`] = ` -Object { +{ "0.00001345": "0", "0.0000269": "0", "0.00004035": "0", diff --git a/src/components/graphCard/__tests__/__snapshots__/graphCardMetric.test.js.snap b/src/components/graphCard/__tests__/__snapshots__/graphCardMetric.test.js.snap index 7410803fa..ed9bd1f5a 100644 --- a/src/components/graphCard/__tests__/__snapshots__/graphCardMetric.test.js.snap +++ b/src/components/graphCard/__tests__/__snapshots__/graphCardMetric.test.js.snap @@ -2,7 +2,7 @@ exports[`GraphCardMetric Component should render a basic component: basic 1`] = `
@@ -308,11 +308,11 @@ exports[`GraphCardMetricTotals Component should handle multiple display states:
@@ -335,17 +335,17 @@ exports[`GraphCardMetricTotals Component should handle multiple display states:
t(lorem.ipsum, hello world)"`; exports[`I18n Component should attempt to perform a string replace: translate 1`] = ` -Object { - "emptyContext": "t(lorem.ipsum, {\\"context\\":\\" \\"})", - "emptyPartialContext": "t(lorem.ipsum, {\\"context\\":\\"hello_ \\"})", +{ + "emptyContext": "t(lorem.ipsum, {"context":" "})", + "emptyPartialContext": "t(lorem.ipsum, {"context":"hello_ "})", "localeKey": "t(lorem.ipsum)", - "multiContext": "t(lorem.ipsum, {\\"context\\":\\"hello_world\\"})", - "multiContextWithEmptyValue": "t(lorem.ipsum, {\\"context\\":\\"hello_world\\"})", + "multiContext": "t(lorem.ipsum, {"context":"hello_world"})", + "multiContextWithEmptyValue": "t(lorem.ipsum, {"context":"hello_world"})", "multiKey": "t([lorem.ipsum,lorem.fallback])", "placeholder": "t(lorem.ipsum, hello world)", } @@ -17,739 +17,739 @@ Object { exports[`I18n Component should attempt to perform translate with a node: translated node 1`] = `"
t(lorem.ipsum, {"hello":"world"}, [object Object])
"`; exports[`I18n Component should generate a predictable locale key output snapshot: key output 1`] = ` -Array [ - Object { +[ + { "file": "./src/common/dateHelpers.js", - "keys": Array [ - Object { + "keys": [ + { "key": "curiosity-toolbar.granularityRangedMonthly", "match": "translate('curiosity-toolbar.granularityRangedMonthly', { context: dateTime.title })", }, - Object { + { "key": "curiosity-toolbar.granularityRangedMonthly", "match": "translate('curiosity-toolbar.granularityRangedMonthly', { context: 'current' })", }, ], }, - Object { + { "file": "./src/common/helpers.js", - "keys": Array [ - Object { + "keys": [ + { "key": "", "match": "t(\${updatedKey}\${(updatedValue && \`, \${updatedValue}\`)", }, ], }, - Object { + { "file": "./src/components/authentication/authentication.js", - "keys": Array [ - Object { + "keys": [ + { "key": "curiosity-auth.maintenanceCopy", "match": "t('curiosity-auth.maintenanceCopy', '...')", }, - Object { + { "key": "curiosity-auth.pending", "match": "t('curiosity-auth.pending', '...')", }, ], }, - Object { + { "file": "./src/components/bannerMessages/bannerMessages.js", - "keys": Array [ - Object { + "keys": [ + { "key": "curiosity-banner.dataMismatchTitle", "match": "translate('curiosity-banner.dataMismatchTitle')", }, - Object { + { "key": "curiosity-banner.dataMismatchMessage", - "match": "translate( 'curiosity-banner.dataMismatchMessage', { context: helpers.UI_LINK_REPORT_ACCURACY_RECOMMENDATIONS !== '' && 'cloudigradeMismatch', appName: helpers.UI_DISPLAY_NAME }, [