0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-25 11:17:50 +01:00
Commit Graph

75 Commits

Author SHA1 Message Date
Marius Andra
ef2b6acda0
Misc fixes from 4571 (#4658)
* simplify cypress nav menu clicks

* clean unused annotations code

* don't blank all cohorts when deleting one

* add data-test-filters-loading to better target loading indicators in tests
2021-06-09 16:58:34 +02:00
Marius Andra
a9fae11074
App context + persist feature flags + joy (#4652)
* preload user via django

* create django app context

* persist feature flags in localStorage

* add preflight into app context

* return undefined if no context

* keep user as `null`, it'll be overriden before anything renders anyway via `afterMount`

* remove broken and unused user code

* call `registerInstrumentationProps` when preloading `preflight`

* for cypress premium tests: add a search param to opt-out of using the preloaded context, so we could intercept the users api call
2021-06-09 11:08:49 +02:00
Marius Andra
f2744edeb1
Cypress component test fix + style refactor (#4628)
* clean up styles into a folder

* fix cypress helper styles
2021-06-08 14:33:51 +02:00
Tim Glaser
bbb4025ab1
Fix e2e tests (#4357)
* Fix e2e tests

* Run as 'production' to better mimick CI

* try no self capture

* Correct event/property definitions

* fix

* fix system status

* Try caching cypress separately

* Cache node modules

* cache pip better

* fix tests

* dont run if not cache

* test

* Cache cypress

* Fix event definitions

* Fix and speed up

* try fixing

* fix

* fix

* faster install

* try self capture 1

* fix multiple

* fix

* fix

* fix

* more speeding up

* Fix tests

* try not installing deps

* fix test global

* possibly quicker

* correct

* Fix
2021-05-20 16:42:26 +02:00
Karl-Aksel Puulmann
f512028bff
Fix organization membership changing (#4177)
Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
2021-04-30 18:21:23 -07:00
Paolo D'Amico
ae6b8eef90
User V2 Part II - Frontend changes (#3866) 2021-04-08 13:40:29 -07:00
Paolo D'Amico
da61c55666
Description & tagging on dashboards (#3756) 2021-03-26 17:38:13 -07:00
Paolo D'Amico
89b71a9959
New login & signup (React) (#3701) 2021-03-25 07:40:20 -07: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
Eric Duong
66641546d7
Trend component test (#3278)
* temp changes

* more tests

* initial trend tests

* merge master

* remove creepover

* remove stubs

* remove unnecessary check

* remove flaky test

* change fixture

* remove console

* focus tests

* update names

* make test more specific

* remove unecessary check

* fix insights file

* checkout insight file
2021-02-17 13:50:41 +02:00
Karl-Aksel Puulmann
c6d00fc3ee
Allow viewing sessions/recordings on persons page (#3302)
* Add spec for being able to reach session recording to sessions page

* Add basic Person page component test

* Fix viewing session recorings on person page

I broke this in a recent PR by narrowing the URLs down too much to fix
another bug (logics clashing).

* Persons tests pass again
2021-02-11 21:14:28 +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
Paolo D'Amico
167a79fa2f
Release navigation-1775 (#3167)
Co-authored-by: yakkomajuri <yakko.majuri@gmail.com>
2021-02-04 10:53:00 +01:00
Tim Glaser
7d7dca8f47
Remove signup process from cypress (#2264)
* Remove signup process from cypress

* adds cypress preflight tests

* run migrations before setting up test data

* fix preflight tests

* Update preflight.js

Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
2020-12-02 14:12:43 +01:00
Yakko Majuri
38135ba73a
fix feature flags test (#1858) 2020-10-14 10:01:17 +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
Paolo D'Amico
cf2ec2894c
Signup improvements (#1535)
Co-authored-by: Yakko Majuri <yakko.majuri@gmail.com>
Co-authored-by: Michael Matloka <dev@twixes.com>
2020-09-07 09:23:13 -05:00
Yakko Majuri
acaf1a59d0
Fixed broken Cypress tests (+ made it all much faster!) (#1486)
* Fixed and improved Cypress tests

* Try with even less cy.wait

* Fix selector

* Add back some cy.wait

Co-authored-by: Twixes <dev@twixes.com>
2020-08-22 18:03:12 +02:00
Marius Andra
52cdd7e572
New toolbar cookie + Secure session/csrf cookies (#1387)
* - set a custom cookie to tell the toolbar we're logged in
- make other cookies secure

* skip adding new toolbar cookie on API requests

* fix demo page local https

* enable/disable secure cookies as needed

* show django toolbar only for API requests

* update posthog-js and kea versions

* satisfy mypy

* add SECURE_COOKIES=0 to cypress tests, since they run over HTTP

* revert kea version

* add test for toolbar cookie middleware

* try something for cypress

* add debug

* add cypress-terminal-report for better logging

* fix demo api_url

* revert previous change that triggered cypress
2020-08-11 10:52:43 +02:00
Eric Duong
fb10127633
add requirement for password (#1162)
* add regex requirement for input and prompt

* update test with new password restrictions

* fix more tests
2020-07-08 09:44:29 +02:00
Michał Matłoka
93aebb9e7b
Update prettier to 2.0.x (#1143)
* Update prettier devDependency to 2.0.x

* Format with prettier 2.0.5

* Update yarn.lock
2020-07-03 14:37:07 +02:00
Eric Duong
6ccc38b11e
Add flutter docs and reorder flow (#1134)
* add flutter docs and reorient flow

* make consistent

* fix tests
2020-07-02 10:56:22 -04:00
Eric Duong
c6428e9190
Onboarding Wizard (#1051)
* intiial working

* remove animation and added snippets

* full flow working

* reorganize

* more cleanup

* fix linting

* add test for the onboarding flow

* add elixir and send event script

* try without cache

* restore cache and move directory

* udpate case

* add lazy loading to onboarding flow

* move field to team

* .

* update styling

* add default

* migration with default working

* add missing model field

* conditional test based on DOM

* add promise return

* try wait

* test again x2
2020-06-24 12:03:28 -04:00
Tim Glaser
9b8736d576
Fix cypress linting errors and speed up tests (#865)
* Speed up e2e builds

* Don't go to demo when logging in/cypress errors

* Execute cypress in docker container

* Pull from correct image

* add -T

* Try something else

* Add dockerfile

* Don't push tags

* Tag

* Try another tag

* image tag

* Try pulling

* Try

* Try caching

* no docker ifle

* Install node

* name

* name
2020-06-08 19:34:39 +01: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