summaryrefslogtreecommitdiffstats
path: root/pkg/gui/gui_common.go
diff options
context:
space:
mode:
authorStefan Haller <stefan@haller-berlin.de>2023-08-30 10:54:32 +0200
committerStefan Haller <stefan@haller-berlin.de>2023-08-30 10:54:32 +0200
commit81216189e41287426ef374ceff26fcf65d363730 (patch)
tree96b2c045f2b56cd7a570e98e893227baeabc707c /pkg/gui/gui_common.go
parent2b26b380b6ac40d3acfbf0446237990c11e5e0d2 (diff)
Don't show toasts when running integration tests
It's pointless because you can't check for them in tests anyway, so they unnecessarily slow down the test run by two seconds for no reason.
Diffstat (limited to 'pkg/gui/gui_common.go')
-rw-r--r--pkg/gui/gui_common.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/pkg/gui/gui_common.go b/pkg/gui/gui_common.go
index 72662f1c1..e3e288c11 100644
--- a/pkg/gui/gui_common.go
+++ b/pkg/gui/gui_common.go
@@ -182,6 +182,10 @@ func (self *guiCommon) AfterLayout(f func() error) {
}
}
+func (self *guiCommon) RunningIntegrationTest() bool {
+ return self.gui.integrationTest != nil
+}
+
func (self *guiCommon) InDemo() bool {
return self.gui.integrationTest != nil && self.gui.integrationTest.IsDemo()
}