summaryrefslogtreecommitdiff
path: root/spec/frontend/helpers/wait_for_text.js
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/helpers/wait_for_text.js')
-rw-r--r--spec/frontend/helpers/wait_for_text.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/spec/frontend/helpers/wait_for_text.js b/spec/frontend/helpers/wait_for_text.js
new file mode 100644
index 00000000000..6bed8a90a98
--- /dev/null
+++ b/spec/frontend/helpers/wait_for_text.js
@@ -0,0 +1,3 @@
+import { findByText } from '@testing-library/dom';
+
+export const waitForText = async (text, container = document) => findByText(container, text);