diff --git a/cypress/e2e/bar-chart.cy.ts b/cypress/e2e/bar-chart.cy.ts index 9b2da2a6b..5b94118e7 100644 --- a/cypress/e2e/bar-chart.cy.ts +++ b/cypress/e2e/bar-chart.cy.ts @@ -87,7 +87,7 @@ context("Bar Chart", () => { legend().find(".legend-header").should("have.text", "Channel"); }); - function assertLegendRowsInOrder(...values) { + function assertLegendRowsInOrder(...values: string[]) { values.forEach((label, idx) => { legendValue(idx + 1).should("contain", label); }); diff --git a/cypress/e2e/boolean-filter-menu.cy.ts b/cypress/e2e/boolean-filter-menu.cy.ts index a9b801260..420542238 100644 --- a/cypress/e2e/boolean-filter-menu.cy.ts +++ b/cypress/e2e/boolean-filter-menu.cy.ts @@ -33,8 +33,8 @@ context("Boolean Filter Menu", () => { // tslint:enable:max-line-length }; - function assertSelection(isTrueOptionSelected, isFalseOptionSelected) { - function selectionToPredicate(isSelected) { + function assertSelection(isTrueOptionSelected: boolean, isFalseOptionSelected: boolean) { + function selectionToPredicate(isSelected: boolean) { return isSelected ? "have.class" : "not.have.class"; } diff --git a/cypress/e2e/csv-data-source.cy.ts b/cypress/e2e/csv-data-source.cy.ts index 2815bef22..7edeff425 100644 --- a/cypress/e2e/csv-data-source.cy.ts +++ b/cypress/e2e/csv-data-source.cy.ts @@ -21,13 +21,13 @@ context("CSV Data Source", () => { const splitValue = (idx: number) => leftGutter().get(`.split-value:nth-child(${idx})`); const measureValue = (idx: number) => body().get(`.measure-row:nth-child(${idx}) .measure-label`); - function assertDates(...dates) { + function assertDates(...dates: string[]) { dates.forEach((date, idx) => { splitValue(idx + 1).should("contain", date); }); } - function assertValues(...values) { + function assertValues(...values: string[]) { values.forEach((value, idx) => { measureValue(idx + 1).should("contain", value); }); diff --git a/cypress/e2e/fixed-time-filter-menu.cy.ts b/cypress/e2e/fixed-time-filter-menu.cy.ts index 232ddc9b9..2d5b57c5b 100644 --- a/cypress/e2e/fixed-time-filter-menu.cy.ts +++ b/cypress/e2e/fixed-time-filter-menu.cy.ts @@ -39,14 +39,14 @@ context("Fixed Time Filter Menu", () => { fixedTimeFilter: "http://localhost:9090/#wiki/4/N4IgbglgzgrghgGwgLzgFwgewHYgFwhqZqJQgA0hEAtgKbI634gCiaAxgPQCqAKgMIUQAMwgI0tAE5k8AbVBoAngAcmBDHSGTaw5hqaV9AJTjYA5rRnyQUEpLTMATAAYAjAFYAtM4Ccn1468zs54bqHOAHTBzgBaQrTYACZObl6+/gDMQSFhwVHBcQC+ALollFDKSGhWxeVSEJb41trCUgnsaiBwiYm0yZTCmJLU6PgKKp29wnAw4kJgiDCdIIWGE8x0cLDaK7UgyhDY2H0AIjQJUFjYViDsABamxwhC2HB0FXAdQtBGmABGxBAewORz6AGUhg4CN1ev0QAhaBYkvhsLMEJQ7hAzHckNioaiEAhCkA==" }; - function assertInputValues(startDate, startTime, endDate, endTime) { + function assertInputValues(startDate: string, startTime: string, endDate: string, endTime: string) { startDateInput().should("have.value", startDate); startTimeInput().should("have.value", startTime); endDateInput().should("have.value", endDate); endTimeInput().should("have.value", endTime); } - function assertCalendarValues(date, startDay, endDay) { + function assertCalendarValues(date: string, startDay: number, endDay: number) { calendarHeader().should("contain", date); calendarDay(startDay).should("have.class", "selected"); calendarDay(endDay).should("have.class", "selected"); diff --git a/cypress/e2e/legend.cy.ts b/cypress/e2e/legend.cy.ts index 43829d854..567475bee 100644 --- a/cypress/e2e/legend.cy.ts +++ b/cypress/e2e/legend.cy.ts @@ -30,7 +30,7 @@ context("Line Chart Legend", () => { // tslint:enable:max-line-length }; - function assertLegendRowsInOrder(...values) { + function assertLegendRowsInOrder(...values: string[]) { const rows = legendValues(); rows.should("have.length", values.length); diff --git a/cypress/e2e/line-chart.cy.ts b/cypress/e2e/line-chart.cy.ts index e6028b226..3d16f5d10 100644 --- a/cypress/e2e/line-chart.cy.ts +++ b/cypress/e2e/line-chart.cy.ts @@ -215,7 +215,7 @@ context("Line Chart", () => { }); describe("Highlight", () => { - const assertHighlighterPosition = (expectedLeft, expectedWidth) => + const assertHighlighterPosition = (expectedLeft: number, expectedWidth: number) => highlighterFrame().should($frame => { const frame = $frame.get(0); expect(frame.offsetLeft).to.eq(expectedLeft); diff --git a/cypress/e2e/split-tile.cy.ts b/cypress/e2e/split-tile.cy.ts index 8ebfe6428..e8329ddc6 100644 --- a/cypress/e2e/split-tile.cy.ts +++ b/cypress/e2e/split-tile.cy.ts @@ -39,7 +39,7 @@ context("Split Tile", () => { // tslint:enable:max-line-length }; - const shouldHaveSplits = (...splits) => { + const shouldHaveSplits = (...splits: string[]) => { splitItems().should("have.length", splits.length); splitItemsRow().within(() => { splits.forEach((split, idx) => { diff --git a/cypress/e2e/string-split-menu.cy.ts b/cypress/e2e/string-split-menu.cy.ts index 327749f55..dd89c82fa 100644 --- a/cypress/e2e/string-split-menu.cy.ts +++ b/cypress/e2e/string-split-menu.cy.ts @@ -31,7 +31,7 @@ context("String Split Menu", () => { channelSplit: "http://localhost:9090/#wiki/4/N4IgbglgzgrghgGwgLzgFwgewHYgFwhpwBGCApiADSEQC2ZyOFBAomgMYD0AqgCoDCVEADMICNGQBOUfAG1QaAJ4AHZjXpDJZYfnUVqGegAUpWACYy88kGZiT0WXASMBGACJCoE5fgC0LgxU1BHQyLxAAXwBdaOooZSQ0S2slVV0vSQhsAHMhMzoybChHXXYACzhsbDIET0xJNHxQLR0CODMzMjMhVLUoUzC8iC12DBxdTqh2QvycoVVMzG6CSOokWghGvABWAAZYkH7Mwatm7SlC6d12zu7qYXradCbCIIntOBhxITBEGDVVq80gR6HBYFpIlFqMostUzG4CkVHMkQOVKtVatRsHB6PE4FdqNAAEqYYiYRpQkAwqpdADK9S2IBuXSE5GyM3w2C+CGoZQg2TKSAFWy5CAQESAA==" }; - function assertSplitSettings(orderBy, descending, limit) { + function assertSplitSettings(orderBy: string, descending: boolean, limit: number) { sortBySelection().should("contain", orderBy); sortDirection().should("have.class", descending ? "descending" : "ascending"); limitSelection().should("contain", limit); diff --git a/cypress/e2e/table.cy.ts b/cypress/e2e/table.cy.ts index c70dbbd2a..629c6a47b 100644 --- a/cypress/e2e/table.cy.ts +++ b/cypress/e2e/table.cy.ts @@ -23,8 +23,8 @@ context("Table", () => { const highlightModal = () => cy.get(".highlight-modal"); const acceptHighlight = () => highlightModal().find(".accept"); const dropHighlight = () => highlightModal().find(".drop"); - const findSplitValue = label => table().find(`.split-value:contains("${label}")`); - const nthRow = n => table().find(`.measure-row:nth-child(${n})`); + const findSplitValue = (label: string) => table().find(`.split-value:contains("${label}")`); + const nthRow = (n: number) => table().find(`.measure-row:nth-child(${n})`); describe("Highlight", () => { const urls = { @@ -37,7 +37,7 @@ context("Table", () => { clickSplitValue("Main"); }); - function clickSplitValue(label) { + function clickSplitValue(label: string) { return findSplitValue(label) .then($splitValue => { const { top: scrollerOffset } = $splitValue.closest(".scroller").offset(); @@ -48,7 +48,7 @@ context("Table", () => { }); } - function assertSplitValueRowHighlight(label) { + function assertSplitValueRowHighlight(label: string) { const splitValue = findSplitValue(label); splitValue .should("have.class", "highlight") @@ -63,7 +63,7 @@ context("Table", () => { table().find(".split-value.selected").should("not.exist"); } - function assertFilterTileValues(values) { + function assertFilterTileValues(values: string[]) { values.forEach((value, idx) => { filterTile(idx + 1).should("contain", value); });