0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-28 09:16:49 +01:00
posthog/cypress
Paul D'Ambra 1974cbb3d2
Remove hard-coded DateTime knowledge from Property Filter UI (#7892)
* wip

* display known unix timestamps as date strings in property filter select box

* show selected unix timestamp property as a datetime string in the property filter

* remove console.log

* update test to construct property definition correctly

* correct another test

* dates have different operators

* format property filter values for display in Select boxes and the PropertyValue component

* fix typescript error

* it _is_ a type, I don't need to say it is

* don't have before and after for unmatched types of operators

* separate the current applicable operators and the operator to display mapping, and add cypress tests for before and after operator visibility

* correct cypress test

* remove unused method

* remove dangling comment

* why does test fail in CI but not locally

* why does test fail in CI but not locally

* why does test fail in CI but not locally

* log values of operator options, why does this fail in CI but not locally

* why does test fail in CI but not locally

* intercept more decide calls to try and set feature flags from cypress test

* why does test fail in CI but not locally

* Remove cypress install

* add a readme for how to test feature flags so it isn't lost if there are no tests currently testing feature flags
2022-01-13 20:10:39 +00:00
..
fixtures Remove hard-coded DateTime knowledge from Property Filter UI (#7892) 2022-01-13 20:10:39 +00:00
integration Remove hard-coded DateTime knowledge from Property Filter UI (#7892) 2022-01-13 20:10:39 +00:00
plugins
support Release lemonade for self-hosted users (#7059) 2021-11-11 12:20:01 -08:00
README.md Remove hard-coded DateTime knowledge from Property Filter UI (#7892) 2022-01-13 20:10:39 +00:00
wait.py Update mypy and typed-ast, fail early if db version not in range (#7599) 2021-12-10 09:29:04 +01:00

Testing Feature Flags

The Cypress tests run with a PostHog instance that has no feature flags set up.

To test feature flags you can intercept the call to the decide endpoint

  // sometimes the system under test calls `/decide`
  // and sometimes it calls https://app.posthog.com/decide
  cy.intercept(/.*\/decide\/.*/, (req) =>
      req.reply(
          decideResponse({
                '6619-query-events-by-date': true,
          })
      )
  )