From a0c806d6ecbaaeddbec20d6cad4deb03359076bc Mon Sep 17 00:00:00 2001 From: Bianca Yang Date: Mon, 13 Nov 2023 12:40:58 -0800 Subject: [PATCH 1/3] fix unsubscribe survey typo --- frontend/src/scenes/billing/UnsubscribeSurveyModal.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/scenes/billing/UnsubscribeSurveyModal.tsx b/frontend/src/scenes/billing/UnsubscribeSurveyModal.tsx index 9a3b65fa24c03..b76a6945055f6 100644 --- a/frontend/src/scenes/billing/UnsubscribeSurveyModal.tsx +++ b/frontend/src/scenes/billing/UnsubscribeSurveyModal.tsx @@ -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 ( { From eb3ab82fe571c3f76c043b58b3cdcbfcd460d63a Mon Sep 17 00:00:00 2001 From: Bianca Yang Date: Tue, 14 Nov 2023 09:25:18 -0800 Subject: [PATCH 2/3] try to test surveys with event capture --- cypress/e2e/billingv2.cy.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cypress/e2e/billingv2.cy.ts b/cypress/e2e/billingv2.cy.ts index 3c01f489e1f78..2a8b25e1de5bf 100644 --- a/cypress/e2e/billingv2.cy.ts +++ b/cypress/e2e/billingv2.cy.ts @@ -9,14 +9,19 @@ describe('Billing', () => { cy.intercept('/api/billing-v2/deactivate?products=product_analytics', { fixture: 'api/billing-v2/billing-v2-unsubscribed-product-analytics.json', }).as('unsubscribeProductAnalytics') + cy.intercept('POST', '/e/?compression=gzip-js').as('eventAPICall') + 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.wait(['@eventAPICall']).its('response.statusCode').should('eq', '200') + cy.get('.LemonModal').should('not.exist') cy.wait(['@unsubscribeProductAnalytics']) }) From d72d35dc8fa1f7d934fb8731595d639830de5910 Mon Sep 17 00:00:00 2001 From: Bianca Yang Date: Wed, 15 Nov 2023 11:44:26 -0800 Subject: [PATCH 3/3] undo attempt at intercepting posthog.capture in cypress --- cypress/e2e/billingv2.cy.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/cypress/e2e/billingv2.cy.ts b/cypress/e2e/billingv2.cy.ts index 2a8b25e1de5bf..5fa21e7b99d2f 100644 --- a/cypress/e2e/billingv2.cy.ts +++ b/cypress/e2e/billingv2.cy.ts @@ -9,7 +9,6 @@ describe('Billing', () => { cy.intercept('/api/billing-v2/deactivate?products=product_analytics', { fixture: 'api/billing-v2/billing-v2-unsubscribed-product-analytics.json', }).as('unsubscribeProductAnalytics') - cy.intercept('POST', '/e/?compression=gzip-js').as('eventAPICall') cy.get('[data-attr=more-button]').first().click() cy.contains('.LemonButton', 'Unsubscribe').click() @@ -20,8 +19,6 @@ describe('Billing', () => { cy.get('[data-attr=unsubscribe-reason-survey-textarea]').type('Product analytics') cy.contains('.LemonModal .LemonButton', 'Unsubscribe').click() - cy.wait(['@eventAPICall']).its('response.statusCode').should('eq', '200') - cy.get('.LemonModal').should('not.exist') cy.wait(['@unsubscribeProductAnalytics']) })