Skip to content

Commit

Permalink
fix: fix unsubscribe survey typo (#18585)
Browse files Browse the repository at this point in the history
* fix unsubscribe survey typo

* try to test surveys with event capture

* undo attempt at intercepting posthog.capture in cypress

---------

Co-authored-by: Bianca Yang <[email protected]>
  • Loading branch information
xrdt and Bianca Yang authored Nov 16, 2023
1 parent b081abe commit 558661e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions cypress/e2e/billingv2.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@ describe('Billing', () => {
cy.intercept('/api/billing-v2/deactivate?products=product_analytics', {
fixture: 'api/billing-v2/billing-v2-unsubscribed-product-analytics.json',
}).as('unsubscribeProductAnalytics')

cy.get('[data-attr=more-button]').first().click()
cy.contains('.LemonButton', 'Unsubscribe').click()
cy.get('.LemonModal__content h3').should(
'contain',
'Why are you unsubscribing from Product analytics + data stack?'
)
cy.get('[data-attr=unsubscribe-reason-survey-textarea]').type('Product analytics')
cy.contains('.LemonModal .LemonButton', 'Unsubscribe').click()

cy.get('.LemonModal').should('not.exist')
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/scenes/billing/UnsubscribeSurveyModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const UnsubscribeSurveyModal = ({ product }: { product: BillingProductV2T
const { setSurveyResponse, reportSurveySent, reportSurveyDismissed } = useActions(billingProductLogic({ product }))
const { deactivateProduct } = useActions(billingLogic)

const textAreaNotEmpty = surveyResponse['$survey_repsonse']?.length > 0
const textAreaNotEmpty = surveyResponse['$survey_response']?.length > 0
return (
<LemonModal
onClose={() => {
Expand Down

0 comments on commit 558661e

Please sign in to comment.