0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-30 19:41:46 +01:00
posthog/cypress/e2e/onboarding.cy.ts

183 lines
8.1 KiB
TypeScript
Raw Normal View History

import { decideResponse } from '../fixtures/api/decide'
describe('Onboarding', () => {
beforeEach(() => {
cy.intercept('/api/billing/', { fixture: 'api/billing/billing-unsubscribed.json' })
feat: Add Cypress Tests for Onboarding Flow (#20676) * wip * iteration 1 * some small fixes * update * Update UI snapshots for `chromium` (1) * fix up product intro page test * Update UI snapshots for `webkit` (2) * Update UI snapshots for `webkit` (2) * rebase on main, fix a type issue * Update UI snapshots for `chromium` (2) * Update UI snapshots for `chromium` (2) * remove console log * remove extraneous file * fix tests again... * Update UI snapshots for `chromium` (2) * more test tweaks * Update UI snapshots for `chromium` (2) * yet another set of fixeds * Update UI snapshots for `chromium` (2) * Update UI snapshots for `webkit` (2) * Update UI snapshots for `chromium` (2) * Update UI snapshots for `webkit` (2) * one more test tweak * fix(admin): follow up for org page performance improvements (#20912) * feat: Add clickhouse migration to create a dictionary (#20665) * feat: Add clickhouse migration to create a dictionary * refactor: Use dictionary created in migration for squashing * fix: Test file drop references to dictionary * fix: Update comment * chore: Master merge * fix: Typo in dictionary Co-authored-by: James Greenhill <fuziontech@gmail.com> --------- Co-authored-by: James Greenhill <fuziontech@gmail.com> * fix: picking embedding input samples (#20913) * fix: Split healthcheck to separate nginx unit app (#20917) Split healthcheck to separate nginx unit app When posthog is under load the healthcheck can stop responding. Split it off into a separate app so it has a dedicated thread to handle it * chore: BillingProduct cleanup (#20910) * fix: show names on frontend (#20918) * fix(experiment): revert default goal back to Trends (#20921) * Add missing healthcheck routes to app (#20923) * Add missing healthcheck routes to app * Switch healthz to _health * chore: Add context to deployment messages (#20911) Add context to deployment messages Co-authored-by: xneyder <xneyder@gmail.com> * chore(environments): Add migration to backfill projects (#20887) * chore(environments): Add migration to backfill projects * Fix `noop` * Add `project_id` to plugin server test setup * Fix `project_id` * Also add `posthog_project` to plugin server tests * Update `createTeam` * Fix func tests * refactor(style): do not use star imports for locals (#20915) * feat(sentry): enable sampling via http header (#20916) * fix: Add missing underscore to healthcheck routes (#20926) Add missing underscore to healthcheck routes * chore(deps): Update posthog-js to 1.115.0 (#20924) * fix(toolbar): Keep flags in sync (#20927) * fix(toolbar): Keep flags in sync * add test * fix: some typos in summary settings (#20925) * fix: some typos in summary settings * Update UI snapshots for `chromium` (2) * don't compare instance equality you fool * feels wrong for reset to change opt in status... * Fix --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * fix: custom player inspector events should respect mini filters (#20929) * fix: custom player inspector events should respect mini filters * all the alls * fix: don't show billing step on self-hosted (#20931) don't show billing step on self-hosted * chore: improve onboarding spacing consistency (#20838) * Make the space between sections consistent * add more space above team section * Improve the topbar spacing and positioning * Move the breadcrumbs above and center the title * Make spacing consistent across all SDKs * Add chain op to plans for when they aren't available * Make sdk margin top consistent with other steps * Update the invite onboarding step title * Move the breadcrumbs to be left aligned * Set top bar title to onboarding in onboarding * Fix cypress tests * Update cypress tests * Remove stale snapshots * remove billing changes --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * fix: flappy snapshot (#20930) * attempt fix for flappy snapshot * Update UI snapshots for `chromium` (2) * fix another one * Update UI snapshots for `chromium` (2) --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * fix storybook * Update UI snapshots for `webkit` (2) * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) * fix some tests * another round of fixes --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Thomas Obermüller <thomas.obermueller@gmail.com> Co-authored-by: Tomás Farías Santana <tomas@tomasfarias.dev> Co-authored-by: James Greenhill <fuziontech@gmail.com> Co-authored-by: David Newell <d.newell1@outlook.com> Co-authored-by: Frank Hamand <frankhamand@gmail.com> Co-authored-by: Juraj Majerik <juro.majerik@gmail.com> Co-authored-by: danielxnj <115043334+danielxnj@users.noreply.github.com> Co-authored-by: xneyder <xneyder@gmail.com> Co-authored-by: Michael Matloka <dev@twixes.com> Co-authored-by: PostHog Bot <69588470+posthog-bot@users.noreply.github.com> Co-authored-by: Neil Kakkar <neilkakkar@gmail.com> Co-authored-by: Paul D'Ambra <paul@posthog.com> Co-authored-by: Raquel Smith <raquelmsmith@users.noreply.github.com> Co-authored-by: Zach Waterfield <zlwaterfield@gmail.com>
2024-03-19 05:19:26 +01:00
cy.intercept('**/decide/*', (req) =>
req.reply(
decideResponse({
'product-intro-pages': 'test',
})
)
)
})
it('Navigate between /products to /onboarding to a product intro page', () => {
cy.visit('/products')
// Get started on product analytics onboarding
fix: Tweak the /products and config onboarding pages to better match mocks. (#20390) * fix up /products page, fix up config pages * Update UI snapshots for `webkit` (2) * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) * remove commented out code * Revert "Update UI snapshots for `chromium` (1)" This reverts commit d0994ba16aa92fb5096c9c55ca1990cd9094360a. * Revert "Update UI snapshots for `chromium` (2)" This reverts commit f78b780a5be794394d656173ddd324b6d94f9207. * type errors * Update UI snapshots for `webkit` (2) * Update UI snapshots for `chromium` (2) * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) * pr comments * fix small visual nit * merge, fix up test * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) * Update UI snapshots for `chromium` (2) * Update UI snapshots for `chromium` (2) * Update UI snapshots for `chromium` (2) * Update UI snapshots for `chromium` (2) * types! * fix: allow usage exceeded alert to be dismissed (#20282) * allow usage exceeded alert to be dismissed * Update UI snapshots for `chromium` (1) * forgot a css change * reset dismissKey if status reverts to not usage exceeded * fix the cookie reset logic * hide billing notice on intro screens * Update UI snapshots for `webkit` (2) * Update UI snapshots for `webkit` (2) * Revert "Update UI snapshots for `chromium` (1)" This reverts commit 58f0a2dd0525678fdd3c4d151a8e271e7ed5b73f. * temp for attempting to use logic to reset localstorage * fix up my banner logic reset * Update UI snapshots for `webkit` (2) * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) * undo changes made for testing purposes * Revert "Update UI snapshots for `chromium` (2)" This reverts commit 9a70d4fce4bea975af395aa5d03d01ce28e24d26. * Revert "Update UI snapshots for `webkit` (2)" This reverts commit 8bd00799be40158ffe8436fd9f09b8e03f942eae. * Revert "Update UI snapshots for `chromium` (1)" This reverts commit cc8b660001a3094d36fe10517ee78fac5a47ccb8. --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * remove scss file, center vert /products * Revert "Update UI snapshots for `chromium` (2)" This reverts commit 6954c5f56322690aeac988aa898eeca399e6353f. * Revert "Update UI snapshots for `chromium` (2)" This reverts commit ce9cdaeb57292c95a831e60fe9d1d127ee415db9. * Revert "Update UI snapshots for `chromium` (2)" This reverts commit 1a3d6a7e516205890126cacedc1898f041bc8437. * Revert "Update UI snapshots for `chromium` (2)" This reverts commit 0f419bf773fac85120cbfb49a875e2fc1df054d5. * delete snapshots * clean up some more snapshots * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-02-29 21:41:23 +01:00
cy.get('[data-attr=product_analytics-onboarding-card]').click()
// Click "Get started" button
cy.get('[data-attr=onboarding-continue]').click()
// Confirm product intro is not included as the first step in the upper right breadcrumbs
cy.get('[data-attr=onboarding-breadcrumbs] > :first-child > * span').should('not.contain', 'Product intro')
feat: Add Cypress Tests for Onboarding Flow (#20676) * wip * iteration 1 * some small fixes * update * Update UI snapshots for `chromium` (1) * fix up product intro page test * Update UI snapshots for `webkit` (2) * Update UI snapshots for `webkit` (2) * rebase on main, fix a type issue * Update UI snapshots for `chromium` (2) * Update UI snapshots for `chromium` (2) * remove console log * remove extraneous file * fix tests again... * Update UI snapshots for `chromium` (2) * more test tweaks * Update UI snapshots for `chromium` (2) * yet another set of fixeds * Update UI snapshots for `chromium` (2) * Update UI snapshots for `webkit` (2) * Update UI snapshots for `chromium` (2) * Update UI snapshots for `webkit` (2) * one more test tweak * fix(admin): follow up for org page performance improvements (#20912) * feat: Add clickhouse migration to create a dictionary (#20665) * feat: Add clickhouse migration to create a dictionary * refactor: Use dictionary created in migration for squashing * fix: Test file drop references to dictionary * fix: Update comment * chore: Master merge * fix: Typo in dictionary Co-authored-by: James Greenhill <fuziontech@gmail.com> --------- Co-authored-by: James Greenhill <fuziontech@gmail.com> * fix: picking embedding input samples (#20913) * fix: Split healthcheck to separate nginx unit app (#20917) Split healthcheck to separate nginx unit app When posthog is under load the healthcheck can stop responding. Split it off into a separate app so it has a dedicated thread to handle it * chore: BillingProduct cleanup (#20910) * fix: show names on frontend (#20918) * fix(experiment): revert default goal back to Trends (#20921) * Add missing healthcheck routes to app (#20923) * Add missing healthcheck routes to app * Switch healthz to _health * chore: Add context to deployment messages (#20911) Add context to deployment messages Co-authored-by: xneyder <xneyder@gmail.com> * chore(environments): Add migration to backfill projects (#20887) * chore(environments): Add migration to backfill projects * Fix `noop` * Add `project_id` to plugin server test setup * Fix `project_id` * Also add `posthog_project` to plugin server tests * Update `createTeam` * Fix func tests * refactor(style): do not use star imports for locals (#20915) * feat(sentry): enable sampling via http header (#20916) * fix: Add missing underscore to healthcheck routes (#20926) Add missing underscore to healthcheck routes * chore(deps): Update posthog-js to 1.115.0 (#20924) * fix(toolbar): Keep flags in sync (#20927) * fix(toolbar): Keep flags in sync * add test * fix: some typos in summary settings (#20925) * fix: some typos in summary settings * Update UI snapshots for `chromium` (2) * don't compare instance equality you fool * feels wrong for reset to change opt in status... * Fix --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * fix: custom player inspector events should respect mini filters (#20929) * fix: custom player inspector events should respect mini filters * all the alls * fix: don't show billing step on self-hosted (#20931) don't show billing step on self-hosted * chore: improve onboarding spacing consistency (#20838) * Make the space between sections consistent * add more space above team section * Improve the topbar spacing and positioning * Move the breadcrumbs above and center the title * Make spacing consistent across all SDKs * Add chain op to plans for when they aren't available * Make sdk margin top consistent with other steps * Update the invite onboarding step title * Move the breadcrumbs to be left aligned * Set top bar title to onboarding in onboarding * Fix cypress tests * Update cypress tests * Remove stale snapshots * remove billing changes --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * fix: flappy snapshot (#20930) * attempt fix for flappy snapshot * Update UI snapshots for `chromium` (2) * fix another one * Update UI snapshots for `chromium` (2) --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * fix storybook * Update UI snapshots for `webkit` (2) * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) * fix some tests * another round of fixes --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Thomas Obermüller <thomas.obermueller@gmail.com> Co-authored-by: Tomás Farías Santana <tomas@tomasfarias.dev> Co-authored-by: James Greenhill <fuziontech@gmail.com> Co-authored-by: David Newell <d.newell1@outlook.com> Co-authored-by: Frank Hamand <frankhamand@gmail.com> Co-authored-by: Juraj Majerik <juro.majerik@gmail.com> Co-authored-by: danielxnj <115043334+danielxnj@users.noreply.github.com> Co-authored-by: xneyder <xneyder@gmail.com> Co-authored-by: Michael Matloka <dev@twixes.com> Co-authored-by: PostHog Bot <69588470+posthog-bot@users.noreply.github.com> Co-authored-by: Neil Kakkar <neilkakkar@gmail.com> Co-authored-by: Paul D'Ambra <paul@posthog.com> Co-authored-by: Raquel Smith <raquelmsmith@users.noreply.github.com> Co-authored-by: Zach Waterfield <zlwaterfield@gmail.com>
2024-03-19 05:19:26 +01:00
cy.window().then((win) => {
win.POSTHOG_APP_CONTEXT.current_team.has_completed_onboarding_for = {}
})
cy.get('[data-attr=menu-item-savedinsights]').click()
// Confirm we're on the product_intro page
cy.get('[data-attr=top-bar-name] > span').contains('Onboarding')
feat: Add Cypress Tests for Onboarding Flow (#20676) * wip * iteration 1 * some small fixes * update * Update UI snapshots for `chromium` (1) * fix up product intro page test * Update UI snapshots for `webkit` (2) * Update UI snapshots for `webkit` (2) * rebase on main, fix a type issue * Update UI snapshots for `chromium` (2) * Update UI snapshots for `chromium` (2) * remove console log * remove extraneous file * fix tests again... * Update UI snapshots for `chromium` (2) * more test tweaks * Update UI snapshots for `chromium` (2) * yet another set of fixeds * Update UI snapshots for `chromium` (2) * Update UI snapshots for `webkit` (2) * Update UI snapshots for `chromium` (2) * Update UI snapshots for `webkit` (2) * one more test tweak * fix(admin): follow up for org page performance improvements (#20912) * feat: Add clickhouse migration to create a dictionary (#20665) * feat: Add clickhouse migration to create a dictionary * refactor: Use dictionary created in migration for squashing * fix: Test file drop references to dictionary * fix: Update comment * chore: Master merge * fix: Typo in dictionary Co-authored-by: James Greenhill <fuziontech@gmail.com> --------- Co-authored-by: James Greenhill <fuziontech@gmail.com> * fix: picking embedding input samples (#20913) * fix: Split healthcheck to separate nginx unit app (#20917) Split healthcheck to separate nginx unit app When posthog is under load the healthcheck can stop responding. Split it off into a separate app so it has a dedicated thread to handle it * chore: BillingProduct cleanup (#20910) * fix: show names on frontend (#20918) * fix(experiment): revert default goal back to Trends (#20921) * Add missing healthcheck routes to app (#20923) * Add missing healthcheck routes to app * Switch healthz to _health * chore: Add context to deployment messages (#20911) Add context to deployment messages Co-authored-by: xneyder <xneyder@gmail.com> * chore(environments): Add migration to backfill projects (#20887) * chore(environments): Add migration to backfill projects * Fix `noop` * Add `project_id` to plugin server test setup * Fix `project_id` * Also add `posthog_project` to plugin server tests * Update `createTeam` * Fix func tests * refactor(style): do not use star imports for locals (#20915) * feat(sentry): enable sampling via http header (#20916) * fix: Add missing underscore to healthcheck routes (#20926) Add missing underscore to healthcheck routes * chore(deps): Update posthog-js to 1.115.0 (#20924) * fix(toolbar): Keep flags in sync (#20927) * fix(toolbar): Keep flags in sync * add test * fix: some typos in summary settings (#20925) * fix: some typos in summary settings * Update UI snapshots for `chromium` (2) * don't compare instance equality you fool * feels wrong for reset to change opt in status... * Fix --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * fix: custom player inspector events should respect mini filters (#20929) * fix: custom player inspector events should respect mini filters * all the alls * fix: don't show billing step on self-hosted (#20931) don't show billing step on self-hosted * chore: improve onboarding spacing consistency (#20838) * Make the space between sections consistent * add more space above team section * Improve the topbar spacing and positioning * Move the breadcrumbs above and center the title * Make spacing consistent across all SDKs * Add chain op to plans for when they aren't available * Make sdk margin top consistent with other steps * Update the invite onboarding step title * Move the breadcrumbs to be left aligned * Set top bar title to onboarding in onboarding * Fix cypress tests * Update cypress tests * Remove stale snapshots * remove billing changes --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * fix: flappy snapshot (#20930) * attempt fix for flappy snapshot * Update UI snapshots for `chromium` (2) * fix another one * Update UI snapshots for `chromium` (2) --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * fix storybook * Update UI snapshots for `webkit` (2) * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) * fix some tests * another round of fixes --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Thomas Obermüller <thomas.obermueller@gmail.com> Co-authored-by: Tomás Farías Santana <tomas@tomasfarias.dev> Co-authored-by: James Greenhill <fuziontech@gmail.com> Co-authored-by: David Newell <d.newell1@outlook.com> Co-authored-by: Frank Hamand <frankhamand@gmail.com> Co-authored-by: Juraj Majerik <juro.majerik@gmail.com> Co-authored-by: danielxnj <115043334+danielxnj@users.noreply.github.com> Co-authored-by: xneyder <xneyder@gmail.com> Co-authored-by: Michael Matloka <dev@twixes.com> Co-authored-by: PostHog Bot <69588470+posthog-bot@users.noreply.github.com> Co-authored-by: Neil Kakkar <neilkakkar@gmail.com> Co-authored-by: Paul D'Ambra <paul@posthog.com> Co-authored-by: Raquel Smith <raquelmsmith@users.noreply.github.com> Co-authored-by: Zach Waterfield <zlwaterfield@gmail.com>
2024-03-19 05:19:26 +01:00
cy.get('[data-attr=product-intro-title]').contains('Product analytics with autocapture')
feat: Add Cypress Tests for Onboarding Flow (#20676) * wip * iteration 1 * some small fixes * update * Update UI snapshots for `chromium` (1) * fix up product intro page test * Update UI snapshots for `webkit` (2) * Update UI snapshots for `webkit` (2) * rebase on main, fix a type issue * Update UI snapshots for `chromium` (2) * Update UI snapshots for `chromium` (2) * remove console log * remove extraneous file * fix tests again... * Update UI snapshots for `chromium` (2) * more test tweaks * Update UI snapshots for `chromium` (2) * yet another set of fixeds * Update UI snapshots for `chromium` (2) * Update UI snapshots for `webkit` (2) * Update UI snapshots for `chromium` (2) * Update UI snapshots for `webkit` (2) * one more test tweak * fix(admin): follow up for org page performance improvements (#20912) * feat: Add clickhouse migration to create a dictionary (#20665) * feat: Add clickhouse migration to create a dictionary * refactor: Use dictionary created in migration for squashing * fix: Test file drop references to dictionary * fix: Update comment * chore: Master merge * fix: Typo in dictionary Co-authored-by: James Greenhill <fuziontech@gmail.com> --------- Co-authored-by: James Greenhill <fuziontech@gmail.com> * fix: picking embedding input samples (#20913) * fix: Split healthcheck to separate nginx unit app (#20917) Split healthcheck to separate nginx unit app When posthog is under load the healthcheck can stop responding. Split it off into a separate app so it has a dedicated thread to handle it * chore: BillingProduct cleanup (#20910) * fix: show names on frontend (#20918) * fix(experiment): revert default goal back to Trends (#20921) * Add missing healthcheck routes to app (#20923) * Add missing healthcheck routes to app * Switch healthz to _health * chore: Add context to deployment messages (#20911) Add context to deployment messages Co-authored-by: xneyder <xneyder@gmail.com> * chore(environments): Add migration to backfill projects (#20887) * chore(environments): Add migration to backfill projects * Fix `noop` * Add `project_id` to plugin server test setup * Fix `project_id` * Also add `posthog_project` to plugin server tests * Update `createTeam` * Fix func tests * refactor(style): do not use star imports for locals (#20915) * feat(sentry): enable sampling via http header (#20916) * fix: Add missing underscore to healthcheck routes (#20926) Add missing underscore to healthcheck routes * chore(deps): Update posthog-js to 1.115.0 (#20924) * fix(toolbar): Keep flags in sync (#20927) * fix(toolbar): Keep flags in sync * add test * fix: some typos in summary settings (#20925) * fix: some typos in summary settings * Update UI snapshots for `chromium` (2) * don't compare instance equality you fool * feels wrong for reset to change opt in status... * Fix --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * fix: custom player inspector events should respect mini filters (#20929) * fix: custom player inspector events should respect mini filters * all the alls * fix: don't show billing step on self-hosted (#20931) don't show billing step on self-hosted * chore: improve onboarding spacing consistency (#20838) * Make the space between sections consistent * add more space above team section * Improve the topbar spacing and positioning * Move the breadcrumbs above and center the title * Make spacing consistent across all SDKs * Add chain op to plans for when they aren't available * Make sdk margin top consistent with other steps * Update the invite onboarding step title * Move the breadcrumbs to be left aligned * Set top bar title to onboarding in onboarding * Fix cypress tests * Update cypress tests * Remove stale snapshots * remove billing changes --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * fix: flappy snapshot (#20930) * attempt fix for flappy snapshot * Update UI snapshots for `chromium` (2) * fix another one * Update UI snapshots for `chromium` (2) --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * fix storybook * Update UI snapshots for `webkit` (2) * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) * fix some tests * another round of fixes --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Thomas Obermüller <thomas.obermueller@gmail.com> Co-authored-by: Tomás Farías Santana <tomas@tomasfarias.dev> Co-authored-by: James Greenhill <fuziontech@gmail.com> Co-authored-by: David Newell <d.newell1@outlook.com> Co-authored-by: Frank Hamand <frankhamand@gmail.com> Co-authored-by: Juraj Majerik <juro.majerik@gmail.com> Co-authored-by: danielxnj <115043334+danielxnj@users.noreply.github.com> Co-authored-by: xneyder <xneyder@gmail.com> Co-authored-by: Michael Matloka <dev@twixes.com> Co-authored-by: PostHog Bot <69588470+posthog-bot@users.noreply.github.com> Co-authored-by: Neil Kakkar <neilkakkar@gmail.com> Co-authored-by: Paul D'Ambra <paul@posthog.com> Co-authored-by: Raquel Smith <raquelmsmith@users.noreply.github.com> Co-authored-by: Zach Waterfield <zlwaterfield@gmail.com>
2024-03-19 05:19:26 +01:00
cy.get('[data-attr=start-onboarding]').should('be.visible')
cy.get('[data-attr=skip-onboarding]').should('not.exist')
})
feat: Add Cypress Tests for Onboarding Flow (#20676) * wip * iteration 1 * some small fixes * update * Update UI snapshots for `chromium` (1) * fix up product intro page test * Update UI snapshots for `webkit` (2) * Update UI snapshots for `webkit` (2) * rebase on main, fix a type issue * Update UI snapshots for `chromium` (2) * Update UI snapshots for `chromium` (2) * remove console log * remove extraneous file * fix tests again... * Update UI snapshots for `chromium` (2) * more test tweaks * Update UI snapshots for `chromium` (2) * yet another set of fixeds * Update UI snapshots for `chromium` (2) * Update UI snapshots for `webkit` (2) * Update UI snapshots for `chromium` (2) * Update UI snapshots for `webkit` (2) * one more test tweak * fix(admin): follow up for org page performance improvements (#20912) * feat: Add clickhouse migration to create a dictionary (#20665) * feat: Add clickhouse migration to create a dictionary * refactor: Use dictionary created in migration for squashing * fix: Test file drop references to dictionary * fix: Update comment * chore: Master merge * fix: Typo in dictionary Co-authored-by: James Greenhill <fuziontech@gmail.com> --------- Co-authored-by: James Greenhill <fuziontech@gmail.com> * fix: picking embedding input samples (#20913) * fix: Split healthcheck to separate nginx unit app (#20917) Split healthcheck to separate nginx unit app When posthog is under load the healthcheck can stop responding. Split it off into a separate app so it has a dedicated thread to handle it * chore: BillingProduct cleanup (#20910) * fix: show names on frontend (#20918) * fix(experiment): revert default goal back to Trends (#20921) * Add missing healthcheck routes to app (#20923) * Add missing healthcheck routes to app * Switch healthz to _health * chore: Add context to deployment messages (#20911) Add context to deployment messages Co-authored-by: xneyder <xneyder@gmail.com> * chore(environments): Add migration to backfill projects (#20887) * chore(environments): Add migration to backfill projects * Fix `noop` * Add `project_id` to plugin server test setup * Fix `project_id` * Also add `posthog_project` to plugin server tests * Update `createTeam` * Fix func tests * refactor(style): do not use star imports for locals (#20915) * feat(sentry): enable sampling via http header (#20916) * fix: Add missing underscore to healthcheck routes (#20926) Add missing underscore to healthcheck routes * chore(deps): Update posthog-js to 1.115.0 (#20924) * fix(toolbar): Keep flags in sync (#20927) * fix(toolbar): Keep flags in sync * add test * fix: some typos in summary settings (#20925) * fix: some typos in summary settings * Update UI snapshots for `chromium` (2) * don't compare instance equality you fool * feels wrong for reset to change opt in status... * Fix --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * fix: custom player inspector events should respect mini filters (#20929) * fix: custom player inspector events should respect mini filters * all the alls * fix: don't show billing step on self-hosted (#20931) don't show billing step on self-hosted * chore: improve onboarding spacing consistency (#20838) * Make the space between sections consistent * add more space above team section * Improve the topbar spacing and positioning * Move the breadcrumbs above and center the title * Make spacing consistent across all SDKs * Add chain op to plans for when they aren't available * Make sdk margin top consistent with other steps * Update the invite onboarding step title * Move the breadcrumbs to be left aligned * Set top bar title to onboarding in onboarding * Fix cypress tests * Update cypress tests * Remove stale snapshots * remove billing changes --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * fix: flappy snapshot (#20930) * attempt fix for flappy snapshot * Update UI snapshots for `chromium` (2) * fix another one * Update UI snapshots for `chromium` (2) --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * fix storybook * Update UI snapshots for `webkit` (2) * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) * fix some tests * another round of fixes --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Thomas Obermüller <thomas.obermueller@gmail.com> Co-authored-by: Tomás Farías Santana <tomas@tomasfarias.dev> Co-authored-by: James Greenhill <fuziontech@gmail.com> Co-authored-by: David Newell <d.newell1@outlook.com> Co-authored-by: Frank Hamand <frankhamand@gmail.com> Co-authored-by: Juraj Majerik <juro.majerik@gmail.com> Co-authored-by: danielxnj <115043334+danielxnj@users.noreply.github.com> Co-authored-by: xneyder <xneyder@gmail.com> Co-authored-by: Michael Matloka <dev@twixes.com> Co-authored-by: PostHog Bot <69588470+posthog-bot@users.noreply.github.com> Co-authored-by: Neil Kakkar <neilkakkar@gmail.com> Co-authored-by: Paul D'Ambra <paul@posthog.com> Co-authored-by: Raquel Smith <raquelmsmith@users.noreply.github.com> Co-authored-by: Zach Waterfield <zlwaterfield@gmail.com>
2024-03-19 05:19:26 +01:00
// it('Step through PA onboarding', () => {
// cy.visit('/products')
feat: Add Cypress Tests for Onboarding Flow (#20676) * wip * iteration 1 * some small fixes * update * Update UI snapshots for `chromium` (1) * fix up product intro page test * Update UI snapshots for `webkit` (2) * Update UI snapshots for `webkit` (2) * rebase on main, fix a type issue * Update UI snapshots for `chromium` (2) * Update UI snapshots for `chromium` (2) * remove console log * remove extraneous file * fix tests again... * Update UI snapshots for `chromium` (2) * more test tweaks * Update UI snapshots for `chromium` (2) * yet another set of fixeds * Update UI snapshots for `chromium` (2) * Update UI snapshots for `webkit` (2) * Update UI snapshots for `chromium` (2) * Update UI snapshots for `webkit` (2) * one more test tweak * fix(admin): follow up for org page performance improvements (#20912) * feat: Add clickhouse migration to create a dictionary (#20665) * feat: Add clickhouse migration to create a dictionary * refactor: Use dictionary created in migration for squashing * fix: Test file drop references to dictionary * fix: Update comment * chore: Master merge * fix: Typo in dictionary Co-authored-by: James Greenhill <fuziontech@gmail.com> --------- Co-authored-by: James Greenhill <fuziontech@gmail.com> * fix: picking embedding input samples (#20913) * fix: Split healthcheck to separate nginx unit app (#20917) Split healthcheck to separate nginx unit app When posthog is under load the healthcheck can stop responding. Split it off into a separate app so it has a dedicated thread to handle it * chore: BillingProduct cleanup (#20910) * fix: show names on frontend (#20918) * fix(experiment): revert default goal back to Trends (#20921) * Add missing healthcheck routes to app (#20923) * Add missing healthcheck routes to app * Switch healthz to _health * chore: Add context to deployment messages (#20911) Add context to deployment messages Co-authored-by: xneyder <xneyder@gmail.com> * chore(environments): Add migration to backfill projects (#20887) * chore(environments): Add migration to backfill projects * Fix `noop` * Add `project_id` to plugin server test setup * Fix `project_id` * Also add `posthog_project` to plugin server tests * Update `createTeam` * Fix func tests * refactor(style): do not use star imports for locals (#20915) * feat(sentry): enable sampling via http header (#20916) * fix: Add missing underscore to healthcheck routes (#20926) Add missing underscore to healthcheck routes * chore(deps): Update posthog-js to 1.115.0 (#20924) * fix(toolbar): Keep flags in sync (#20927) * fix(toolbar): Keep flags in sync * add test * fix: some typos in summary settings (#20925) * fix: some typos in summary settings * Update UI snapshots for `chromium` (2) * don't compare instance equality you fool * feels wrong for reset to change opt in status... * Fix --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * fix: custom player inspector events should respect mini filters (#20929) * fix: custom player inspector events should respect mini filters * all the alls * fix: don't show billing step on self-hosted (#20931) don't show billing step on self-hosted * chore: improve onboarding spacing consistency (#20838) * Make the space between sections consistent * add more space above team section * Improve the topbar spacing and positioning * Move the breadcrumbs above and center the title * Make spacing consistent across all SDKs * Add chain op to plans for when they aren't available * Make sdk margin top consistent with other steps * Update the invite onboarding step title * Move the breadcrumbs to be left aligned * Set top bar title to onboarding in onboarding * Fix cypress tests * Update cypress tests * Remove stale snapshots * remove billing changes --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * fix: flappy snapshot (#20930) * attempt fix for flappy snapshot * Update UI snapshots for `chromium` (2) * fix another one * Update UI snapshots for `chromium` (2) --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * fix storybook * Update UI snapshots for `webkit` (2) * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) * fix some tests * another round of fixes --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Thomas Obermüller <thomas.obermueller@gmail.com> Co-authored-by: Tomás Farías Santana <tomas@tomasfarias.dev> Co-authored-by: James Greenhill <fuziontech@gmail.com> Co-authored-by: David Newell <d.newell1@outlook.com> Co-authored-by: Frank Hamand <frankhamand@gmail.com> Co-authored-by: Juraj Majerik <juro.majerik@gmail.com> Co-authored-by: danielxnj <115043334+danielxnj@users.noreply.github.com> Co-authored-by: xneyder <xneyder@gmail.com> Co-authored-by: Michael Matloka <dev@twixes.com> Co-authored-by: PostHog Bot <69588470+posthog-bot@users.noreply.github.com> Co-authored-by: Neil Kakkar <neilkakkar@gmail.com> Co-authored-by: Paul D'Ambra <paul@posthog.com> Co-authored-by: Raquel Smith <raquelmsmith@users.noreply.github.com> Co-authored-by: Zach Waterfield <zlwaterfield@gmail.com>
2024-03-19 05:19:26 +01:00
// // Get started on product analytics onboarding
// cy.get('[data-attr=product_analytics-onboarding-card]').click()
feat: Add Cypress Tests for Onboarding Flow (#20676) * wip * iteration 1 * some small fixes * update * Update UI snapshots for `chromium` (1) * fix up product intro page test * Update UI snapshots for `webkit` (2) * Update UI snapshots for `webkit` (2) * rebase on main, fix a type issue * Update UI snapshots for `chromium` (2) * Update UI snapshots for `chromium` (2) * remove console log * remove extraneous file * fix tests again... * Update UI snapshots for `chromium` (2) * more test tweaks * Update UI snapshots for `chromium` (2) * yet another set of fixeds * Update UI snapshots for `chromium` (2) * Update UI snapshots for `webkit` (2) * Update UI snapshots for `chromium` (2) * Update UI snapshots for `webkit` (2) * one more test tweak * fix(admin): follow up for org page performance improvements (#20912) * feat: Add clickhouse migration to create a dictionary (#20665) * feat: Add clickhouse migration to create a dictionary * refactor: Use dictionary created in migration for squashing * fix: Test file drop references to dictionary * fix: Update comment * chore: Master merge * fix: Typo in dictionary Co-authored-by: James Greenhill <fuziontech@gmail.com> --------- Co-authored-by: James Greenhill <fuziontech@gmail.com> * fix: picking embedding input samples (#20913) * fix: Split healthcheck to separate nginx unit app (#20917) Split healthcheck to separate nginx unit app When posthog is under load the healthcheck can stop responding. Split it off into a separate app so it has a dedicated thread to handle it * chore: BillingProduct cleanup (#20910) * fix: show names on frontend (#20918) * fix(experiment): revert default goal back to Trends (#20921) * Add missing healthcheck routes to app (#20923) * Add missing healthcheck routes to app * Switch healthz to _health * chore: Add context to deployment messages (#20911) Add context to deployment messages Co-authored-by: xneyder <xneyder@gmail.com> * chore(environments): Add migration to backfill projects (#20887) * chore(environments): Add migration to backfill projects * Fix `noop` * Add `project_id` to plugin server test setup * Fix `project_id` * Also add `posthog_project` to plugin server tests * Update `createTeam` * Fix func tests * refactor(style): do not use star imports for locals (#20915) * feat(sentry): enable sampling via http header (#20916) * fix: Add missing underscore to healthcheck routes (#20926) Add missing underscore to healthcheck routes * chore(deps): Update posthog-js to 1.115.0 (#20924) * fix(toolbar): Keep flags in sync (#20927) * fix(toolbar): Keep flags in sync * add test * fix: some typos in summary settings (#20925) * fix: some typos in summary settings * Update UI snapshots for `chromium` (2) * don't compare instance equality you fool * feels wrong for reset to change opt in status... * Fix --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * fix: custom player inspector events should respect mini filters (#20929) * fix: custom player inspector events should respect mini filters * all the alls * fix: don't show billing step on self-hosted (#20931) don't show billing step on self-hosted * chore: improve onboarding spacing consistency (#20838) * Make the space between sections consistent * add more space above team section * Improve the topbar spacing and positioning * Move the breadcrumbs above and center the title * Make spacing consistent across all SDKs * Add chain op to plans for when they aren't available * Make sdk margin top consistent with other steps * Update the invite onboarding step title * Move the breadcrumbs to be left aligned * Set top bar title to onboarding in onboarding * Fix cypress tests * Update cypress tests * Remove stale snapshots * remove billing changes --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * fix: flappy snapshot (#20930) * attempt fix for flappy snapshot * Update UI snapshots for `chromium` (2) * fix another one * Update UI snapshots for `chromium` (2) --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * fix storybook * Update UI snapshots for `webkit` (2) * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) * fix some tests * another round of fixes --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Thomas Obermüller <thomas.obermueller@gmail.com> Co-authored-by: Tomás Farías Santana <tomas@tomasfarias.dev> Co-authored-by: James Greenhill <fuziontech@gmail.com> Co-authored-by: David Newell <d.newell1@outlook.com> Co-authored-by: Frank Hamand <frankhamand@gmail.com> Co-authored-by: Juraj Majerik <juro.majerik@gmail.com> Co-authored-by: danielxnj <115043334+danielxnj@users.noreply.github.com> Co-authored-by: xneyder <xneyder@gmail.com> Co-authored-by: Michael Matloka <dev@twixes.com> Co-authored-by: PostHog Bot <69588470+posthog-bot@users.noreply.github.com> Co-authored-by: Neil Kakkar <neilkakkar@gmail.com> Co-authored-by: Paul D'Ambra <paul@posthog.com> Co-authored-by: Raquel Smith <raquelmsmith@users.noreply.github.com> Co-authored-by: Zach Waterfield <zlwaterfield@gmail.com>
2024-03-19 05:19:26 +01:00
// // Installation should be complete
// cy.get('svg.LemonIcon.text-success').should('exist')
// cy.get('svg.LemonIcon.text-success').parent().should('contain', 'Installation complete')
// // Continue to configuration step
// cy.get('[data-attr=sdk-continue]').click()
// // Confirm the appropriate breadcrumb is highlighted
// cy.get('[data-attr=onboarding-breadcrumbs] > :nth-child(3) > * span').should('contain', 'Configure')
// cy.get('[data-attr=onboarding-breadcrumbs] > :nth-child(3) > * span').should('not.have.css', 'text-muted')
// // Continue to plans
// cy.get('[data-attr=onboarding-continue]').click()
// // Verify pricing table visible
// cy.get('.BillingHero').should('be.visible')
// cy.get('table.PlanComparison').should('be.visible')
// // Confirm buttons on pricing comparison
// cy.get('[data-attr=upgrade-Paid] .LemonButton__content').should('have.text', 'Upgrade')
// cy.get('[data-attr=upgrade-Free] .LemonButton__content').should('have.text', 'Current plan')
// // Continue
// cy.get('[data-attr=onboarding-skip-button]').click()
// // Click back to Install step
// cy.get('[data-attr=onboarding-breadcrumbs] > :first-child > * span').click()
// // Continue through to finish
// cy.get('[data-attr=sdk-continue]').click()
// cy.get('[data-attr=onboarding-continue]').click()
// cy.get('[data-attr=onboarding-skip-button]').click()
// cy.get('[data-attr=onboarding-continue]').click()
// // Confirm we're on the insights list page
// cy.url().should('contain', 'project/1/insights')
// cy.visit('/onboarding/product_analytics?step=product_intro')
// // Should see both an option to skip onboarding and an option to see the sdk instructions
// cy.get('[data-attr=skip-onboarding]').should('be.visible')
// cy.get('[data-attr=start-onboarding-sdk]').should('be.visible')
// cy.get('[data-attr=skip-onboarding]').first().click()
// cy.url().should('contain', 'project/1/insights')
// cy.visit('/onboarding/product_analytics?step=product_intro')
// cy.get('[data-attr=start-onboarding-sdk]').first().click()
// cy.url().should('contain', 'project/1/onboarding/product_analytics?step=install')
// cy.visit('/products')
// cy.get('[data-attr=return-to-product_analytics] > svg').click()
// cy.url().should('contain', 'project/1/insights')
// })
// it('Step through SR onboarding', () => {
// cy.visit('/products')
// cy.get('[data-attr=session_replay-onboarding-card]').click()
// // Installation should be complete
// cy.get('svg.LemonIcon.text-success').should('exist')
// cy.get('svg.LemonIcon.text-success').parent().should('contain', 'Installation complete')
// // Continue to configuration step
// cy.get('[data-attr=sdk-continue]').click()
// // Continue to plans
// cy.get('[data-attr=onboarding-continue]').click()
// // Verify pricing table visible
// cy.get('.BillingHero').should('be.visible')
// cy.get('table.PlanComparison').should('be.visible')
// // Confirm buttons on pricing comparison
// cy.get('[data-attr=upgrade-Paid] .LemonButton__content').should('have.text', 'Upgrade')
// cy.get('[data-attr=upgrade-Free] .LemonButton__content').should('have.text', 'Current plan')
// // Continue through to finish
// cy.get('[data-attr=onboarding-skip-button]').click()
// cy.get('[data-attr=onboarding-continue]').click()
// // Confirm we're on the recordings list page
// cy.url().should('contain', 'project/1/replay/recent')
// cy.visit('/onboarding/session_replay?step=product_intro')
// cy.get('[data-attr=skip-onboarding]').should('be.visible')
// cy.get('[data-attr=start-onboarding-sdk]').should('not.exist')
// })
// it('Step through FF onboarding', () => {
// cy.visit('/onboarding/feature_flags?step=product_intro')
// cy.get('[data-attr=start-onboarding-sdk]').first().click()
// cy.get('[data-attr=sdk-continue]').click()
// // Confirm the appropriate breadcrumb is highlighted
// cy.get('[data-attr=onboarding-breadcrumbs] > :nth-child(5) > * span').should('contain', 'Plans')
// cy.get('[data-attr=onboarding-breadcrumbs] > :nth-child(3) > * span').should('not.have.css', 'text-muted')
// cy.get('[data-attr=onboarding-skip-button]').click()
// cy.get('[data-attr=onboarding-continue]').click()
// cy.url().should('contain', '/feature_flags')
// cy.visit('/onboarding/feature_flags?step=product_intro')
// cy.get('[data-attr=skip-onboarding]').should('be.visible')
// cy.get('[data-attr=start-onboarding-sdk]').should('be.visible')
// cy.get('[data-attr=skip-onboarding]').first().click()
// })
// it('Step through Surveys onboarding', () => {
// cy.visit('/onboarding/surveys?step=product_intro')
// cy.get('[data-attr=skip-onboarding]').should('be.visible')
// cy.get('[data-attr=start-onboarding-sdk]').should('not.exist')
// cy.get('[data-attr=skip-onboarding]').first().click()
// cy.url().should('contain', 'survey_templates')
// cy.visit('/products')
// cy.get('[data-attr=surveys-onboarding-card]').click()
// // Installation should be complete
// cy.get('svg.LemonIcon.text-success').should('exist')
// cy.get('svg.LemonIcon.text-success').parent().should('contain', 'Installation complete')
// // Continue to configuration step
// cy.get('[data-attr=sdk-continue]').click()
// // Verify pricing table visible
// cy.get('.BillingHero').should('be.visible')
// cy.get('table.PlanComparison').should('be.visible')
// // Confirm buttons on pricing comparison
// cy.get('[data-attr=upgrade-Paid] .LemonButton__content').should('have.text', 'Upgrade')
// cy.get('[data-attr=upgrade-Free] .LemonButton__content').should('have.text', 'Current plan')
// // Continue
// cy.get('[data-attr=onboarding-skip-button]').click()
// cy.get('[data-attr=onboarding-continue]').click()
// cy.url().should('contain', '/survey_templates')
// })
})