From fa3b1fe8338ed1af882b08edbceb8c60e74f3c3f Mon Sep 17 00:00:00 2001 From: Michael Matloka Date: Thu, 8 Aug 2024 09:23:59 +0200 Subject: [PATCH] Make tests happy --- cypress/e2e/dashboard.cy.ts | 4 ++-- cypress/e2e/insights.cy.ts | 2 +- .../__snapshots__/verifiedDomainsLogic.test.ts.snap | 1 + posthog/migrations/0452_organization_logo.py | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/cypress/e2e/dashboard.cy.ts b/cypress/e2e/dashboard.cy.ts index 3065aee903311..3af5333100eef 100644 --- a/cypress/e2e/dashboard.cy.ts +++ b/cypress/e2e/dashboard.cy.ts @@ -14,7 +14,7 @@ describe('Dashboard', () => { it('Dashboards loaded', () => { cy.get('h1').should('contain', 'Dashboards') // Breadcrumbs work - cy.get('[data-attr=breadcrumb-organization]').should('contain', 'H') + cy.get('[data-attr=breadcrumb-organization]').should('contain', 'H') // "H" as the lettermark of "Hogflix" cy.get('[data-attr=breadcrumb-project]').should('contain', 'Hogflix Demo App') cy.get('[data-attr=breadcrumb-Dashboards]').should('have.text', 'Dashboards') }) @@ -233,7 +233,7 @@ describe('Dashboard', () => { cy.get('.InsightCard').its('length').should('be.gte', 2) // Breadcrumbs work - cy.get('[data-attr=breadcrumb-organization]').should('contain', 'Hogflix') + cy.get('[data-attr=breadcrumb-organization]').should('contain', 'H') // "H" as the lettermark of "Hogflix" cy.get('[data-attr=breadcrumb-project]').should('contain', 'Hogflix Demo App') cy.get('[data-attr=breadcrumb-Dashboards]').should('have.text', 'Dashboards') cy.get('[data-attr^="breadcrumb-Dashboard:"]').should('have.text', TEST_DASHBOARD_NAME + 'UnnamedCancelSave') diff --git a/cypress/e2e/insights.cy.ts b/cypress/e2e/insights.cy.ts index 1bfcf5524c08b..19a453afbe620 100644 --- a/cypress/e2e/insights.cy.ts +++ b/cypress/e2e/insights.cy.ts @@ -13,7 +13,7 @@ describe('Insights', () => { it('Saving an insight sets breadcrumbs', () => { createInsight('insight name') - cy.get('[data-attr=breadcrumb-organization]').should('contain', 'H') + cy.get('[data-attr=breadcrumb-organization]').should('contain', 'H') // "H" as the lettermark of "Hogflix" cy.get('[data-attr=breadcrumb-project]').should('contain', 'Hogflix Demo App') cy.get('[data-attr=breadcrumb-SavedInsights]').should('have.text', 'Product analytics') cy.get('[data-attr^="breadcrumb-Insight:"]').should('have.text', 'insight name') diff --git a/frontend/src/scenes/settings/organization/VerifiedDomains/__snapshots__/verifiedDomainsLogic.test.ts.snap b/frontend/src/scenes/settings/organization/VerifiedDomains/__snapshots__/verifiedDomainsLogic.test.ts.snap index 4ada7b6b11b44..f97f2175d40aa 100644 --- a/frontend/src/scenes/settings/organization/VerifiedDomains/__snapshots__/verifiedDomainsLogic.test.ts.snap +++ b/frontend/src/scenes/settings/organization/VerifiedDomains/__snapshots__/verifiedDomainsLogic.test.ts.snap @@ -20,6 +20,7 @@ exports[`verifiedDomainsLogic values has proper defaults 1`] = ` "enforce_2fa": false, "id": "ABCD", "is_member_join_email_enabled": true, + "logo_media_id": null, "member_count": 2, "membership_level": 8, "metadata": {}, diff --git a/posthog/migrations/0452_organization_logo.py b/posthog/migrations/0452_organization_logo.py index 5cc10020f69ef..b1ca34e0bf586 100644 --- a/posthog/migrations/0452_organization_logo.py +++ b/posthog/migrations/0452_organization_logo.py @@ -27,7 +27,7 @@ class Migration(migrations.Migration): migrations.RunSQL( """ ALTER TABLE "posthog_organization" ADD COLUMN "logo_media_id" uuid NULL CONSTRAINT "posthog_organization_logo_media_id_1c12c9dc_fk_posthog_u" REFERENCES "posthog_uploadedmedia"("id") DEFERRABLE INITIALLY DEFERRED; -- existing-table-constraint-ignore - SET CONSTRAINTS "posthog_organization_logo_media_id_1c12c9dc_fk_posthog_u" IMMEDIATE; + SET CONSTRAINTS "posthog_organization_logo_media_id_1c12c9dc_fk_posthog_u" IMMEDIATE; -- existing-table-constraint-ignore """, reverse_sql=""" ALTER TABLE "posthog_organization" DROP COLUMN IF EXISTS "logo_media_id";