Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
liyiy committed Oct 2, 2023
1 parent ec7d1f6 commit 771b358
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/__tests__/extensions/surveys.js
Original file line number Diff line number Diff line change
Expand Up @@ -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', {
Expand Down

0 comments on commit 771b358

Please sign in to comment.