Skip to content
Snippets Groups Projects
Unverified Commit eff98403 authored by Nemanja Glumac's avatar Nemanja Glumac Committed by GitHub
Browse files

Consolidate dashboard sql filters (#17661)

* Rename file to make it more specific

* Extract dashboard sql filters into separate folder and CI group

* Add short descriptions to dashboard filters repros

* Extract dashboard sql filters helpers (data objects)
parent 864e78d6
No related branches found
No related tags found
No related merge requests found
Showing
with 142 additions and 143 deletions
......@@ -1272,7 +1272,7 @@ workflows:
matrix:
parameters:
edition: ["ee", "oss"]
folder: ["admin", "binning", "collections", "dashboard", "dashboard-filters", "moderation", "native", "native-filters", "onboarding", "question", "sharing", "smoketest", "visualizations"]
folder: ["admin", "binning", "collections", "dashboard", "dashboard-filters", "dashboard-filters-sql", "moderation", "native", "native-filters", "onboarding", "question", "sharing", "smoketest", "visualizations"]
name: e2e-tests-<< matrix.folder >>-<< matrix.edition >>
requires:
- build-uberjar-<< matrix.edition >>
......
......@@ -8,7 +8,7 @@ import {
setFilter,
} from "__support__/e2e/cypress";
import { DASHBOARD_SQL_DATE_FILTERS } from "./helpers/e2e-dashboard-filter-data-objects";
import { DASHBOARD_SQL_DATE_FILTERS } from "./helpers/e2e-dashboard-filter-sql-data-objects";
import * as DateFilter from "../native-filters/helpers/e2e-date-filter-helpers";
import { SAMPLE_DATASET } from "__support__/e2e/cypress_sample_dataset";
......
......@@ -8,7 +8,7 @@ import {
setFilter,
} from "__support__/e2e/cypress";
import { DASHBOARD_SQL_LOCATION_FILTERS } from "./helpers/e2e-dashboard-filter-data-objects";
import { DASHBOARD_SQL_LOCATION_FILTERS } from "./helpers/e2e-dashboard-filter-sql-data-objects";
import { addWidgetStringFilter } from "../native-filters/helpers/e2e-field-filter-helpers";
import { SAMPLE_DATASET } from "__support__/e2e/cypress_sample_dataset";
......
......@@ -8,7 +8,7 @@ import {
setFilter,
} from "__support__/e2e/cypress";
import { DASHBOARD_SQL_NUMBER_FILTERS } from "./helpers/e2e-dashboard-filter-data-objects";
import { DASHBOARD_SQL_NUMBER_FILTERS } from "./helpers/e2e-dashboard-filter-sql-data-objects";
import { addWidgetNumberFilter } from "../native-filters/helpers/e2e-field-filter-helpers";
import { SAMPLE_DATASET } from "__support__/e2e/cypress_sample_dataset";
......
......@@ -8,7 +8,7 @@ import {
setFilter,
} from "__support__/e2e/cypress";
import { DASHBOARD_SQL_TEXT_FILTERS } from "./helpers/e2e-dashboard-filter-data-objects";
import { DASHBOARD_SQL_TEXT_FILTERS } from "./helpers/e2e-dashboard-filter-sql-data-objects";
import { addWidgetStringFilter } from "../native-filters/helpers/e2e-field-filter-helpers";
import { SAMPLE_DATASET } from "__support__/e2e/cypress_sample_dataset";
......
export const DASHBOARD_SQL_TEXT_FILTERS = {
Dropdown: {
sqlFilter: "string/=",
value: "Gizmo",
representativeResult: "Rustic Paper Wallet",
},
"Is not": {
sqlFilter: "string/!=",
value: "Gadget",
representativeResult: "Rustic Paper Wallet",
},
Contains: {
sqlFilter: "string/contains",
value: "oo",
representativeResult: "Small Marble Shoes",
},
"Does not contain": {
sqlFilter: "string/does-not-contain",
value: "oo",
representativeResult: "Rustic Paper Wallet",
},
"Starts with": {
sqlFilter: "string/starts-with",
value: "G",
representativeResult: "Rustic Paper Wallet",
},
"Ends with": {
sqlFilter: "string/ends-with",
value: "y",
representativeResult: "Small Marble Shoes",
},
};
export const DASHBOARD_SQL_NUMBER_FILTERS = {
"Equal to": {
sqlFilter: "number/=",
value: "3.8",
representativeResult: "Small Marble Hat",
},
"Not equal to": {
sqlFilter: "number/!=",
value: "2.07",
representativeResult: "Rustic Paper Wallet",
},
Between: {
sqlFilter: "number/between",
value: ["3", "4"],
representativeResult: "Small Marble Hat",
},
"Greater than or equal to": {
sqlFilter: "number/>=",
value: "4.3",
representativeResult: "Aerodynamic Linen Coat",
},
"Less than or equal to": {
sqlFilter: "number/<=",
value: "3",
representativeResult: "Enormous Aluminum Shirt",
},
};
export const DASHBOARD_SQL_LOCATION_FILTERS = {
Dropdown: {
sqlFilter: "string/=",
value: "Rye",
representativeResult: "Arnold Adams",
},
"Is not": {
sqlFilter: "string/!=",
value: "Rye",
representativeResult: "Hudson Borer",
},
Contains: {
sqlFilter: "string/contains",
value: "oo",
representativeResult: "Hudson Borer",
},
"Does not contain": {
sqlFilter: "string/does-not-contain",
value: "oo",
representativeResult: "Domenica Williamson",
},
"Starts with": {
sqlFilter: "string/starts-with",
value: "W",
representativeResult: "Hudson Borer",
},
"Ends with": {
sqlFilter: "string/ends-with",
value: "g",
representativeResult: "Aracely Jenkins",
},
};
export const DASHBOARD_SQL_DATE_FILTERS = {
"Month and Year": {
sqlFilter: "date/month-year",
value: {
month: "October",
year: "2017",
},
representativeResult: "Hudson Borer",
},
"Quarter and Year": {
sqlFilter: "date/quarter-year",
value: {
quarter: "Q1",
year: "2018",
},
representativeResult: "Lolita Schaefer",
},
"Single Date": {
sqlFilter: "date/single",
value: "15",
representativeResult: "No results!",
},
"Date Range": {
sqlFilter: "date/range",
value: {
startDate: "13",
endDate: "15",
},
representativeResult: "No results!",
},
"Relative Date": {
sqlFilter: "date/relative",
value: "Past 7 days",
representativeResult: "No results!",
},
"All Options": {
sqlFilter: "date/all-options",
value: {
timeBucket: "Years",
},
representativeResult: "Hudson Borer",
},
};
......@@ -112,141 +112,3 @@ export const DASHBOARD_TEXT_FILTERS = {
representativeResult: "47.68",
},
};
export const DASHBOARD_SQL_TEXT_FILTERS = {
Dropdown: {
sqlFilter: "string/=",
value: "Gizmo",
representativeResult: "Rustic Paper Wallet",
},
"Is not": {
sqlFilter: "string/!=",
value: "Gadget",
representativeResult: "Rustic Paper Wallet",
},
Contains: {
sqlFilter: "string/contains",
value: "oo",
representativeResult: "Small Marble Shoes",
},
"Does not contain": {
sqlFilter: "string/does-not-contain",
value: "oo",
representativeResult: "Rustic Paper Wallet",
},
"Starts with": {
sqlFilter: "string/starts-with",
value: "G",
representativeResult: "Rustic Paper Wallet",
},
"Ends with": {
sqlFilter: "string/ends-with",
value: "y",
representativeResult: "Small Marble Shoes",
},
};
export const DASHBOARD_SQL_NUMBER_FILTERS = {
"Equal to": {
sqlFilter: "number/=",
value: "3.8",
representativeResult: "Small Marble Hat",
},
"Not equal to": {
sqlFilter: "number/!=",
value: "2.07",
representativeResult: "Rustic Paper Wallet",
},
Between: {
sqlFilter: "number/between",
value: ["3", "4"],
representativeResult: "Small Marble Hat",
},
"Greater than or equal to": {
sqlFilter: "number/>=",
value: "4.3",
representativeResult: "Aerodynamic Linen Coat",
},
"Less than or equal to": {
sqlFilter: "number/<=",
value: "3",
representativeResult: "Enormous Aluminum Shirt",
},
};
export const DASHBOARD_SQL_LOCATION_FILTERS = {
Dropdown: {
sqlFilter: "string/=",
value: "Rye",
representativeResult: "Arnold Adams",
},
"Is not": {
sqlFilter: "string/!=",
value: "Rye",
representativeResult: "Hudson Borer",
},
Contains: {
sqlFilter: "string/contains",
value: "oo",
representativeResult: "Hudson Borer",
},
"Does not contain": {
sqlFilter: "string/does-not-contain",
value: "oo",
representativeResult: "Domenica Williamson",
},
"Starts with": {
sqlFilter: "string/starts-with",
value: "W",
representativeResult: "Hudson Borer",
},
"Ends with": {
sqlFilter: "string/ends-with",
value: "g",
representativeResult: "Aracely Jenkins",
},
};
export const DASHBOARD_SQL_DATE_FILTERS = {
"Month and Year": {
sqlFilter: "date/month-year",
value: {
month: "October",
year: "2017",
},
representativeResult: "Hudson Borer",
},
"Quarter and Year": {
sqlFilter: "date/quarter-year",
value: {
quarter: "Q1",
year: "2018",
},
representativeResult: "Lolita Schaefer",
},
"Single Date": {
sqlFilter: "date/single",
value: "15",
representativeResult: "No results!",
},
"Date Range": {
sqlFilter: "date/range",
value: {
startDate: "13",
endDate: "15",
},
representativeResult: "No results!",
},
"Relative Date": {
sqlFilter: "date/relative",
value: "Past 7 days",
representativeResult: "No results!",
},
"All Options": {
sqlFilter: "date/all-options",
value: {
timeBucket: "Years",
},
representativeResult: "Hudson Borer",
},
};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment