Skip to content

Commit

Permalink
test(visual): skip flaky visual regression tests for insight cards (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
thmsobrmlr authored Aug 20, 2024
1 parent 05210d6 commit c333823
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 39 deletions.
Binary file not shown.
Binary file not shown.
1 change: 1 addition & 0 deletions frontend/src/exporter/Exporter.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ const Template: StoryFn<typeof Exporter> = (props) => {
</div>
)
}
Template.tags = ['test-skip'] // :FIXME: flaky tests, most likely due to resize observer changes

export const TrendsLineInsight: Story = Template.bind({})
TrendsLineInsight.args = { insight: require('../mocks/fixtures/api/projects/team_id/insights/trendsLine.json') }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import { Meta, Story } from '@storybook/react'
import { useState } from 'react'

import { filtersToQueryNode } from '~/queries/nodes/InsightQuery/utils/filtersToQueryNode'
import { getQueryBasedInsightModel } from '~/queries/nodes/InsightViz/utils'
import { NodeKind } from '~/queries/schema'
import { ChartDisplayType, InsightColor, InsightModel, InsightShortId, TrendsFilterType } from '~/types'

import EXAMPLE_DATA_TABLE_NODE_EVENTS_QUERY from '../../../../mocks/fixtures/api/projects/team_id/insights/dataTableEvents.json'
Expand Down Expand Up @@ -66,6 +64,7 @@ const meta: Meta = {
control: { type: 'boolean' },
},
},
tags: ['test-skip'], // :FIXME: flaky tests, most likely due to resize observer changes
}
export default meta
export const InsightCard: Story = (args) => {
Expand Down Expand Up @@ -191,40 +190,3 @@ export const InsightCard: Story = (args) => {
</div>
)
}

export const QueryInsightCard: Story = (args) => {
return (
<div className="grid gap-4 grid-cols-2 min-w-[50rem]">
{examples.map((insight) => {
// turn into HogQL based insight
if (!insight.filters.insight || insight.query) {
return null
}

const query = {
kind: NodeKind.InsightVizNode,
source: filtersToQueryNode(insight.filters),
}
const { filters: _, ...baseInsight } = insight
return (
<InsightCardComponent
key={insight.id}
insight={{
...baseInsight,
query,
}}
rename={() => {}}
duplicate={() => {}}
placement="SavedInsightGrid"
loading={args.loading}
apiErrored={args.apiErrored}
highlighted={args.highlighted}
timedOut={args.timedOut}
showResizeHandles={args.resizable}
doNotLoad
/>
)
})}
</div>
)
}

0 comments on commit c333823

Please sign in to comment.