-
- Downloads
Update "Clear" and "Reset" buttons (#46050)
* Refactor dashboard helpers to TypeScript * Reuse existing helper * Refactor cy.createQuestionAndDashboard to a function helper - there was no good place to put it, so I also created new helpers/api directory - and I moved all helpers using cy.request (with 1 exception, where a CSV download helper also does a bunch of assertions) in there * Merge TS command definitions into a single file * Export types * Make dashboardDetails optional * Export StructuredQuestionDetails * Remove duplicated function * Extract createNativeQuestion to separate file - 1 exported helper per file, no exceptions! * Reuse const * Add test for unit of time parameters * Improve assertions * Extract createDashboardWithParameters * Add tests for time parameters * Fix hardcoded parameter_mappings ids * Format code * Extract checkButtonVisible * Improve test names * Add tests for location parameters * Reuse const * Update test name * Add WidgetStatusButton * Add unit tests for WidgetStatusButton * Rename handler * Remove redundant assertions * Add iconSize prop * Fix styling * Replace WidgetStatusIcon with WidgetStatusButton - Remove WidgetStatusIcon * Fix tooltip issue * Fix tooltip for good * Use default compact button size * Prevent overflow * Fix alignment issues in parameter sidebar - Remove iconSize prop - Simplify StatusConfig * Update padding in Unit of Time input to make it consistent with other inputs in dashboard parameter sidebar * Update unit tests * Rename WidgetStatusButton to WidgetStatus * Explicitly specify what is a button * Update helpers in tests * Update when buttons are displayed according to the new spec, update tests * Simplify label * Remove utils * Adjust padding * Update reset icon * Make the button gray when color is undesired * Remove old definitions * Add missing export * Remove unused type * Add test for location (single value) * Add test for id (single value) * Add more assertions * Add test for id (multiple values) * Improve name * Add tests for number (single and multi value) * Add tests for text (single and multi value) * Rename file * Update comment * Update test name * Use unique ids * Use new color name * Add a test for chevron icons alignment * Lift className up * Make types more specific * Sort attributes * Revert "Make types more specific" This reverts commit 2e6994b5. * Revert "Use new color name" This reverts commit 2cc68df6. * Remove TODO * Introduce editFilter util, refactor chevron assertions to work with any number of chevrons * Connect label to the default value input in ParameterSettings * Add a whitespace in the default value label when required "(required)" is shown * Add parameter sidebar tests for unit of time * Add parameter sidebar tests for date filters * Extract checkParameterSidebarDefaultValue * Add parameter sidebar tests for location - single values * Add parameter sidebar tests for location - multiple values * Use constants for test case names * Add parameter sidebar tests for id parameters - single values * Add parameter sidebar tests for id parameters - multi values * Add parameter sidebar tests for number parameters - single values * Add parameter sidebar tests for number parameters - multi values * Add parameter sidebar tests for text parameters - single values * Add parameter sidebar tests for text parameters - multi values * Extract checkDashboardFilters * Use checkDashboardFilters in time parameters * Use checkParameterSidebarDefaultValue in checkDashboardFilters * Use checkDashboardFilters everywhere * Sort helpers * Rename checkDashboardFilters to checkDashboardParameters * Rename checkOnlyOneButtonVisible to checkStatusIcon * Add test suite for sql filters, coverage for text filter - single value * Add a whitespace in the default value label when required "(required)" is shown - SQL filters - Similar to 930dd3a5 * Add test suite for sql filters, coverage for number filters * Add test for sql filters - date * Remove unused things, rename placeholder to labelOrPlaceholder * Apply label only to 1 input * Add test for sql filters - field parameters * Fix date tests * Make all sql filters tests work * Add assertions for required without default in text filters * Add assertions for required without default in date filters * Add assertions for required without default in field filters * Allow clearing required SQL filters without default value * Add a test to ensure comma-separated numeric values work * Update unit test * Update helper * Update e2e tests * Use != null and == null checks with defaultValue instead of just checking if its truthy/falsy * Run `yarn test-visual:loki` and then `yarn loki approve` - see https://metaboat.slack.com/archives/C505ZNNH4/p1721289287037069 * Use parameterHasNoDisplayValue to account for empty strings * Run `yarn test-visual:loki` and then `yarn loki approve` after merging master - see https://metaboat.slack.com/archives/C505ZNNH4/p1721289287037069 * Run `yarn test-visual:loki` and then `yarn loki approve` - see https://metaboat.slack.com/archives/C505ZNNH4/p1721289287037069 * Run `yarn test-visual:loki` and then `yarn loki approve` - see https://metaboat.slack.com/archives/C505ZNNH4/p1721289287037069
Showing
- .loki/reference/chrome_laptop_Visualizations_ChartSkeleton_Pie.png 0 additions, 0 deletions...erence/chrome_laptop_Visualizations_ChartSkeleton_Pie.png
- .loki/reference/chrome_laptop_embed_PublicOrEmbeddedDashboardView_Dark_Theme_Default.png 0 additions, 0 deletions...mbed_PublicOrEmbeddedDashboardView_Dark_Theme_Default.png
- .loki/reference/chrome_laptop_embed_PublicOrEmbeddedDashboardView_Dark_Theme_No_Background_Default.png 0 additions, 0 deletions...mbeddedDashboardView_Dark_Theme_No_Background_Default.png
- .loki/reference/chrome_laptop_embed_PublicOrEmbeddedDashboardView_Dark_Theme_No_Background_Scroll.png 0 additions, 0 deletions...EmbeddedDashboardView_Dark_Theme_No_Background_Scroll.png
- .loki/reference/chrome_laptop_embed_PublicOrEmbeddedDashboardView_Dark_Theme_Scroll.png 0 additions, 0 deletions...embed_PublicOrEmbeddedDashboardView_Dark_Theme_Scroll.png
- .loki/reference/chrome_laptop_embed_PublicOrEmbeddedDashboardView_Light_Theme_Default.png 0 additions, 0 deletions...bed_PublicOrEmbeddedDashboardView_Light_Theme_Default.png
- .loki/reference/chrome_laptop_embed_PublicOrEmbeddedDashboardView_Light_Theme_No_Background_Default.png 0 additions, 0 deletions...beddedDashboardView_Light_Theme_No_Background_Default.png
- .loki/reference/chrome_laptop_embed_PublicOrEmbeddedDashboardView_Light_Theme_No_Background_Scroll.png 0 additions, 0 deletions...mbeddedDashboardView_Light_Theme_No_Background_Scroll.png
- .loki/reference/chrome_laptop_embed_PublicOrEmbeddedDashboardView_Light_Theme_Scroll.png 0 additions, 0 deletions...mbed_PublicOrEmbeddedDashboardView_Light_Theme_Scroll.png
- .loki/reference/chrome_laptop_embed_PublicOrEmbeddedDashboardView_Transparent_Theme_Default.png 0 additions, 0 deletions...blicOrEmbeddedDashboardView_Transparent_Theme_Default.png
- .loki/reference/chrome_laptop_embed_PublicOrEmbeddedDashboardView_Transparent_Theme_No_Background_Default.png 0 additions, 0 deletions...DashboardView_Transparent_Theme_No_Background_Default.png
- .loki/reference/chrome_laptop_embed_PublicOrEmbeddedDashboardView_Transparent_Theme_No_Background_Scroll.png 0 additions, 0 deletions...dDashboardView_Transparent_Theme_No_Background_Scroll.png
- .loki/reference/chrome_laptop_embed_PublicOrEmbeddedDashboardView_Transparent_Theme_Scroll.png 0 additions, 0 deletions...ublicOrEmbeddedDashboardView_Transparent_Theme_Scroll.png
- .loki/reference/chrome_laptop_embed_PublicOrEmbeddedQuestionView_Light_Theme_Default.png 0 additions, 0 deletions...mbed_PublicOrEmbeddedQuestionView_Light_Theme_Default.png
- .loki/reference/chrome_laptop_static_viz_ComboChart_Bar_Stack_Display_Overrides_Series_Displays.png 0 additions, 0 deletions...omboChart_Bar_Stack_Display_Overrides_Series_Displays.png
- .loki/reference/chrome_laptop_static_viz_LineAreaBarChart_Categorical_Line_Bar.png 0 additions, 0 deletions...ptop_static_viz_LineAreaBarChart_Categorical_Line_Bar.png
- .loki/reference/chrome_laptop_static_viz_LineAreaBarChart_Line_Bar_Area.png 0 additions, 0 deletions...rome_laptop_static_viz_LineAreaBarChart_Line_Bar_Area.png
- .loki/reference/chrome_laptop_static_viz_LineAreaBarChart_Line_Two_Bars.png 0 additions, 0 deletions...rome_laptop_static_viz_LineAreaBarChart_Line_Two_Bars.png
- .loki/reference/chrome_laptop_static_viz_LineAreaBarChart_Single_Series_Bar.png 0 additions, 0 deletions..._laptop_static_viz_LineAreaBarChart_Single_Series_Bar.png
- .loki/reference/chrome_laptop_static_viz_LineAreaBarChart_Single_Series_Many_Bars.png 0 additions, 0 deletions...p_static_viz_LineAreaBarChart_Single_Series_Many_Bars.png
8.23 KiB

| W: | H:
| W: | H:



| W: | H:
| W: | H:



| W: | H:
| W: | H:



| W: | H:
| W: | H:



| W: | H:
| W: | H:



| W: | H:
| W: | H:



| W: | H:
| W: | H:



| W: | H:
| W: | H:



| W: | H:
| W: | H:



| W: | H:
| W: | H:



| W: | H:
| W: | H:



| W: | H:
| W: | H:



| W: | H:
| W: | H:


47.1 KiB
27 KiB
21.9 KiB
24.5 KiB
12.4 KiB