Skip to content

Commit

Permalink
Increase toast loading duration to biggest number (#2514)
Browse files Browse the repository at this point in the history
  • Loading branch information
jameskerr authored Sep 2, 2022
1 parent 1d61783 commit ef351e6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
12 changes: 4 additions & 8 deletions src/js/components/BrimToaster.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import env from "src/app/core/env"
import React from "react"
import {Toaster} from "react-hot-toast"

Expand All @@ -9,15 +8,12 @@ const BrimToaster = () => {
toastOptions={{
role: "status",
className: "brim-toast",
duration: env.isTest ? 2 ** 31 - 1 : undefined,
success: {
duration: env.isTest ? 2 ** 31 - 1 : undefined,
},
loading: {
duration: env.isTest ? 2 ** 31 - 1 : undefined,
// This is so that the loading indicator does not go away.
duration: 2 ** 31 - 1,
},
error: {
duration: env.isTest ? 2 ** 31 - 1 : undefined,
success: {
duration: 6000,
},
}}
/>
Expand Down
2 changes: 1 addition & 1 deletion src/js/components/ExportModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const ExportModal = ({onClose}) => {
toast
.promise(dispatch(exportResults(filePath, format as ResponseFormat)), {
loading: "Exporting...",
success: "Export Complete",
success: "Export Completed: " + filePath,
error: "Error Exporting",
})
.catch((e) => {
Expand Down
2 changes: 1 addition & 1 deletion src/test/system/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import "./real-paths"

export {screen, act} from "@testing-library/react"
export {SystemTest} from "./system-test-class"

0 comments on commit ef351e6

Please sign in to comment.