From 771b3584d1275deb0fbf40c374cdadf086bc80e2 Mon Sep 17 00:00:00 2001
From: Li Yi Yu
Date: Mon, 2 Oct 2023 16:35:08 -0400
Subject: [PATCH] update test
---
src/__tests__/extensions/surveys.js | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/__tests__/extensions/surveys.js b/src/__tests__/extensions/surveys.js
index 3cb97c086..516a744c1 100644
--- a/src/__tests__/extensions/surveys.js
+++ b/src/__tests__/extensions/surveys.js
@@ -81,9 +81,13 @@ describe('survey display logic', () => {
})
// submit the survey
- const submitButton = document
+ const ratingButton = document
.getElementsByClassName(`PostHogSurvey${mockSurveys[0].id}`)[0]
.shadowRoot.querySelectorAll('.rating_1')[0]
+ ratingButton.click()
+ const submitButton = document
+ .getElementsByClassName(`PostHogSurvey${mockSurveys[0].id}`)[0]
+ .shadowRoot.querySelectorAll('.form-submit')[0]
submitButton.click()
expect(mockPostHog.capture).toBeCalledTimes(2)
expect(mockPostHog.capture).toBeCalledWith('survey sent', {