Skip to content

Commit

Permalink
Merge branch 'master' into dn-chore/linting
Browse files Browse the repository at this point in the history
  • Loading branch information
daibhin committed Nov 6, 2023
2 parents c8697e6 + 91cadb8 commit d2341f8
Show file tree
Hide file tree
Showing 270 changed files with 11,790 additions and 4,180 deletions.
8 changes: 8 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,10 @@ module.exports = {
element: 'Select',
message: 'use <LemonSelect> instead',
},
{
element: 'LemonButtonWithDropdown',
message: 'use <LemonMenu> with a <LemonButton> child instead',
},
],
},
],
Expand Down Expand Up @@ -169,6 +173,10 @@ module.exports = {
element: 'Collapse',
message: 'use <LemonCollapse> instead',
},
{
element: 'Checkbox',
message: 'use <LemonCheckbox> instead',
},
{
element: 'MonacoEditor',
message: 'use <CodeEditor> instead',
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ jobs:
- name: Check for syntax errors, import sort, and code style violations
run: |
ruff check .
ruff check .
- name: Check formatting
run: |
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@ gen/
.antlr
upgrade/
hogvm/typescript/dist

.wokeignore
44 changes: 44 additions & 0 deletions cypress/e2e/billingv2.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
describe('Billing', () => {
beforeEach(() => {
cy.intercept('/api/billing-v2/', { fixture: 'api/billing-v2/billing-v2.json' })

cy.visit('/organization/billing')
})

it('Show unsubscribe survey', () => {
cy.intercept('/api/billing-v2/deactivate?products=product_analytics', {
fixture: 'api/billing-v2/billing-v2-unsubscribed-product-analytics.json',
})
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.contains('.LemonModal .LemonButton', 'Unsubscribe').click()

cy.get('[data-attr=upgrade-card-product_analytics]').should('be.visible')
})

it('Unsubscribe survey text area maintains unique state between product types', () => {
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', 'Cancel').click()

cy.get('[data-attr=more-button]').eq(1).click()
cy.contains('.LemonButton', 'Unsubscribe').click()
cy.get('.LemonModal__content h3').should('contain', 'Why are you unsubscribing from Session replay?')
cy.get('[data-attr=unsubscribe-reason-survey-textarea]').type('Session replay')
cy.contains('.LemonModal .LemonButton', 'Cancel').click()

cy.get('[data-attr=more-button]').first().click()
cy.contains('.LemonButton', 'Unsubscribe').click()
cy.get('[data-attr=unsubscribe-reason-survey-textarea]').should('have.value', 'Product analytics')
})
})
Loading

0 comments on commit d2341f8

Please sign in to comment.