forked from metabase/metabase
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loki flake: make delays configurable independently (metabase#50806)
* Add delay helper * Remove delays in storybook * Use skippable delay in ListField and SingleSelectListField * Use skippable delay in ExplicitSize * Remove waitTimeContext in storybook * Remove waitTimeContext altogether * Add documentation to delay * Remove all context references in ExplicitSize * Update flaky snapshots
- Loading branch information
Showing
13 changed files
with
36 additions
and
51 deletions.
There are no files selected for viewing
Binary file modified
BIN
+14 Bytes
(100%)
...OrEmbeddedDashboardView_filters_Dark_Theme_Parameter_List_Single_With_Value.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+586 Bytes
(100%)
..._PublicOrEmbeddedDashboardView_filters_Dark_Theme_Parameter_List_With_Value.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+41 Bytes
(100%)
...rEmbeddedDashboardView_filters_Light_Theme_Parameter_List_Single_With_Value.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+392 Bytes
(100%)
...PublicOrEmbeddedDashboardView_filters_Light_Theme_Parameter_List_With_Value.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
declare global { | ||
interface Window { | ||
// Set REMOVE_DELAYS to true in environments where we want to remove them. | ||
// For example, in Storybook we want to remove delays to make Loki tests more | ||
// predictable. | ||
METABASE_REMOVE_DELAYS?: boolean; | ||
} | ||
} | ||
|
||
/** | ||
* Wrap any delay with this helper to make it skippable in | ||
* certain environments. | ||
*/ | ||
export function delay(ms: number): number { | ||
if (typeof window !== "undefined" && window.METABASE_REMOVE_DELAYS) { | ||
return 0; | ||
} | ||
|
||
return ms; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters