0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-24 00:47:50 +01:00

fix(flags): group filters acting funky (#25447)

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Dylan Martin 2024-10-09 01:11:19 +02:00 committed by GitHub
parent 32cca0c287
commit 376279d41d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 13 additions and 4 deletions

View File

@ -34,7 +34,7 @@ export default defineConfig({
// cypress default is 'top' this means sometimes the element is underneath the top navbar // cypress default is 'top' this means sometimes the element is underneath the top navbar
// not what a human would do... so, set it to center to avoid this weird behavior // not what a human would do... so, set it to center to avoid this weird behavior
scrollBehavior: 'center', scrollBehavior: 'center',
retries: {runMode: 2}, retries: { runMode: 2 },
e2e: { e2e: {
// We've imported your old cypress plugins here. // We've imported your old cypress plugins here.
// You may want to clean this up later by importing these. // You may want to clean this up later by importing these.
@ -101,11 +101,19 @@ export default defineConfig({
.on('error', (err) => console.log('Redis client error', err)) .on('error', (err) => console.log('Redis client error', err))
.connect() .connect()
// Clear cache // Clear cache
for await (const key of redisClient.scanIterator({ TYPE: 'string', MATCH: '*cache*', COUNT: 500 })) { for await (const key of redisClient.scanIterator({
TYPE: 'string',
MATCH: '*cache*',
COUNT: 500,
})) {
await redisClient.del(key) await redisClient.del(key)
} }
// Also clear the more ephemeral async query statuses // Also clear the more ephemeral async query statuses
for await (const key of redisClient.scanIterator({ TYPE: 'string', MATCH: 'query_async*', COUNT: 500 })) { for await (const key of redisClient.scanIterator({
TYPE: 'string',
MATCH: 'query_async*',
COUNT: 500,
})) {
await redisClient.del(key) await redisClient.del(key)
} }
await redisClient.quit() await redisClient.quit()
@ -117,5 +125,6 @@ export default defineConfig({
}, },
baseUrl: 'http://localhost:8000', baseUrl: 'http://localhost:8000',
specPattern: 'cypress/e2e/**/*.{js,jsx,ts,tsx}', specPattern: 'cypress/e2e/**/*.{js,jsx,ts,tsx}',
chromeWebSecurity: false,
}, },
}) })

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 173 KiB

After

Width:  |  Height:  |  Size: 173 KiB

View File

@ -73,7 +73,7 @@ export function OperatorValueSelect({
}: OperatorValueSelectProps): JSX.Element { }: OperatorValueSelectProps): JSX.Element {
const propertyDefinition = propertyDefinitions.find((pd) => pd.name === propertyKey) const propertyDefinition = propertyDefinitions.find((pd) => pd.name === propertyKey)
const isCohortProperty = propertyKey === 'id' const isCohortProperty = propertyKey === 'id' && type === PropertyFilterType.Cohort
// DateTime properties should not default to Exact // DateTime properties should not default to Exact
const isDateTimeProperty = propertyDefinition?.property_type == PropertyType.DateTime const isDateTimeProperty = propertyDefinition?.property_type == PropertyType.DateTime