0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-24 09:14:46 +01:00
Commit Graph

9 Commits

Author SHA1 Message Date
Tim Glaser
bb572272ca
Improve e2e flakeyness, skip Insights spec test (#4869)
* attempt to fix toolbar flakyness

* fix dashboard flakyness

* fix flake

* add retries to components

* Try speeding up build by skipping sourcemaps

* debug components

* show errors

* better error

* don't generate source map

* fix errors

* speed up component tests

* Try empty insights page

* Revert "Try empty insights page"

This reverts commit 68701b3804.

* Skip trends tests for now
2021-06-29 22:20:02 +02:00
Karl-Aksel Puulmann
b7bdad90eb
Add test for bar charts (#3474)
* Add test for bar charts

Since our charts are rendered on a canvas we can't really interact well
with it. Instead, we take a screenshot now (new dependency).

* Debug error in CI

* Make sure images are the same size on CI and locally
2021-02-26 16:50:36 +02:00
Karl-Aksel Puulmann
30b6692920
React component tests with cypress (#3233)
* WIP: get cypress something doing

* Get a test running

* Get css loading, stub posthog

* Move helpers to separate file

* Givens > given2

It plays nicer with beforeEach

* Test for session filters

* Test date navigation

* Test filtering

* Try keep old tests running

* Try get tests running under CI

* Prettify fixtures

* Cleanup, use cypress 6

* Add yarn build

* Fix e2e cypress tests

* given2 => givens

* Rename `frontend-test-runner` to `e2e-test-runner`

* Fix cypress test

* Add webpack-preprocessor as a devDependency

* Improve freezing time

* Make css inclusions automatic for component tests
2021-02-09 17:28:01 +02:00
Michael Matloka
533c7df105
Organization<>Team<>User structure (closes #1540) (#1562)
* Backend changes to implement #1461

* Added the missing migration files

* Fixes Typecheck errors

* Refactor request.user.team_set.get() to use request.user.team

* Updated user patch method to change current_team on team id instead of name

* Merged migration file

* Changes team property to return first item in queryset

* Fixes failing tests

* Changed User api to return the ids of the teams they are currently part of

* Frontend for changing teams

* Update and simplify migrations

* Improve team and user buttons

* Make team changing backend more logical

* Improve current_team mechanics

* Update test_team.py

* Fix Team.objects.create_with_data

* Update migration

* Update tests

* Make setup_review more convenient

* Add Organization and OrganizationMembership

* Replace is_admin with level

* Extend API

* Update team.py

* Improve modeling

* Improve handling of new mechanics

* Add proper migration

* Remove _ensure_organization_and_team

* Update 0084_org_team_user.py

* Improve user, org and team creation

* Make MembershipLevel more flexible for the future

* Add member deletion

* Fix naive datetime warnings

* Update setup_review.py

* Update API route

* Make PersonalAPIKey changes

* Update models and migrations, fix typing

* Fix typing

* Use MAC-less UUID v1 instead of v4 for better performance

* Add abstract UUIDModel

* Update utils.py

* Update utils.py

* Fix multi/unicast bit

* Update APIs, frontend and tests

* Update pull_request_template.md

* Fix comment

* Fix migration error

* Compress migrations

* Updates with minimal renaming

* More updates

* Make further updates

* Update test_team_user.py

* Fix issues

* Add migration

* Satisfy mypy

* Remove Signup redirect on logged in

* Use uuid1_macless in Person

* Fix typing

* Update tests

* Update /api/team/signup to /api/organization/signup

* Fix mypy issues and update tests

The remaining failures are actually missing functionality (TDD applied), so filling these in.

* Update 0086_org_live

* Make small improvements

* Implement permissions

* Remove now unneccesary membership check

* Update setup_dev.py

* Make small frontend improvements

* Add drf-nested-routers as requirement

* Remove unused import

* Implemented nested routes

* Remove cruft

* Add relevant org/proj/user name to headings

* Fix imports

* Update migration

* Replace unreliable drf-nested-routers with drf-extensions

* Improve unset team handling

* Make org and team creation proper

* Update migration

* Fix migration

* Update TopContent

* Update command palette for new sidebar structure

* Remove deprecated demo data deletion

* Assume that each org has a project and fix typing

* Require paid plan for multiple orgs and projects

* Make HogFlix demo a separate team

* Update migration

* Slightly improve style

* Adjust page layout bottom padding

* Make user dropdown nicer

* Fix base app tests

* Satisfy mypy

* Fix test_leave_organization

* Improve wording

* Possibly fix import

* Remove misplaced None check

* Enhance org and teams APIs and add tests

* Fix /api/projects for particular Team

* Improve invites and demo data

* Address feedback

* Put everything related to billing on Organization

* Fix minor issues

* Simplify invitation creation

* Update team model

* Make orgs and projects premium only on self-hosted

* Improve testing

* Update migration

* Remove extra License import

* Fix minor issues

* Fix Django tests

* Fix Cypress

* Fix yarn build

* Fix TeamSignupViewset

* Fix posthog-production incompatibility

* Remove extraneous insight endpoint registration

* Adjust tests for posthog-production

* Simplify invitations and fix email validation

* Address all feedback

* Satisfy mypy

* Update migration

* Fix constraint removal in migration

* Update tests

* Fix test creation edge case

* Run posthog-production CI tests against this branch and teams-live

* Ensure that js_posthog_api_key is always passed

* Fix preflight check pre-login

* Update cypress tests

* Update instanceStatus.js

* Bring ee tets up to par

* Bring actions-ux-201012 back

* Cypress retry in cypress.json

* Revert "Run posthog-production CI tests against this branch and teams-live"

This reverts commit d79cb844d8.

Co-authored-by: anna <ms.annaphilips@gmail.com>
Co-authored-by: Anna Philips <aphilips@matmacorp.com>
2020-10-22 10:58:32 +02:00
Karl-Aksel Puulmann
c24c58828f
Upgrade cypress, fix and stabilize tests (#1872)
* Upgrade cypress

- https://docs.cypress.io/guides/references/migration-guide.html#Migrating-to-Cypress-5-0
- https://docs.cypress.io/guides/references/changelog.html#5-0-0

* Run tests multiple times if flaky

* Fix broken command palette cypress test

* Remove default retries options
2020-10-14 15:36:25 +03:00
Yakko Majuri
4cb64d0c74
Fix Cypress tests (#1635)
* added timeouts and waits to ensure flow of cypress tests

* removed unused test

* fixed trends elements tests

* testing a longer wait time - temp

* fix trends sessions and retetion filtering tests

* fix events filtering test

* removed wait

* trends sessions fix

* minor update

* fix live actions & sessions

* improve timeouts

* more timouts

* removed some waits

* added timeouts to trends tests

* modify config

* remove test on bug

* removed timeout from events table

* remove dashboards timeout

* change selector for sessions tab

* use data-attr
2020-09-18 09:26:12 -04:00
James Greenhill
a8bff8387e
Run cypress in parallel and record job to dashboard (#959)
* Run cypress in parallel and record job to dashboard

* arbitrary change to test cache and to see if 4 is faster than 3
2020-06-09 12:20:31 +01:00
Eric Duong
720c06f9e6
E2e important paths (#802)
* initial test

* add yaml

* add logs

* without tail

* run again for consistency

* wait longer

* manuall configure cypress

* use latest ubuntu

* try installing all

* yarn install

* yarn install with cypress

* full flow

* run again for consistency

* initial tests for trends

* handle exception

* separate e2e docker-compose

* run on pr

* trends-testing foundation

* run test

* don't pass everything

* handle uncaught exceptions

* fix dashboard tests

* change email domain

* change dataattr to data-attr and boilerplate cleanup

* base url config

* add script for test runner

* change default postgres

* test all pages

* basic actions per page and create funnel

* trend breakdown filter

* test create action

* add DAU and entity-specific filter

* uncomment

* run test

* .

* add clicks to tables

* add auth

* add changelog

* add dashbaord click

* uncomment test for single funnel

* add test for pinned dashboard

* fix copy paste button and add invite team link tests

* use data-attr for all filtesr

* fix overall filter

* remove filter

* disasble virtual scroll

* uncomment

* remove unnecessary

* run again

* increase timeout

* remove flimsy test

* run again

* add cypress checklist item

* force click cohorts button

* add opt out capture for tests

* remove some tests

* run twice

* .

* run twice
2020-05-22 12:34:48 -04:00
Eric Duong
a012aa6723
Cypress tests (#789)
* initial test

* add yaml

* add logs

* without tail

* run again for consistency

* wait longer

* manuall configure cypress

* use latest ubuntu

* try installing all

* yarn install

* yarn install with cypress

* full flow

* run again for consistency

* initial tests for trends

* handle exception

* separate e2e docker-compose

* run on pr

* trends-testing foundation

* run test

* don't pass everything

* handle uncaught exceptions

* fix dashboard tests

* change email domain

* change dataattr to data-attr and boilerplate cleanup

* base url config

* add script for test runner

* change default postgres
2020-05-19 14:48:10 -04:00