Skip to content

Commit

Permalink
fix: fixing stories issues
Browse files Browse the repository at this point in the history
  • Loading branch information
benfdking committed Jun 17, 2024
1 parent 402f5a8 commit 775512a
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 32 deletions.
34 changes: 17 additions & 17 deletions js/packages/quary-extension-ui/src/components/Dag.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,87 +15,87 @@ export const Main: Story = {
models: [
{
name: 'orders',
modelOrSeedOrSource: 3,
assetType: 3,
filePath: '/path/to/orders.sql',
},
{
name: 'customers',
modelOrSeedOrSource: 3,
assetType: 3,
filePath: '/path/to/customers.sql',
},
{
name: 'products',
modelOrSeedOrSource: 3,
assetType: 3,
filePath: '/path/to/products.sql',
},
{
name: 'inventory',
modelOrSeedOrSource: 3,
assetType: 3,
filePath: '/path/to/inventory.sql',
},
{
name: 'shipping',
modelOrSeedOrSource: 3,
assetType: 3,
filePath: '/path/to/shipping.sql',
},
{
name: 'order_enrichment',
modelOrSeedOrSource: 1,
assetType: 1,
filePath: '/path/to/order_enrichment.sql',
},
{
name: 'customer_segmentation',
modelOrSeedOrSource: 1,
assetType: 1,
filePath: '/path/to/customer_segmentation.sql',
},
{
name: 'product_analysis',
modelOrSeedOrSource: 1,
assetType: 1,
filePath: '/path/to/product_analysis.sql',
},
{
name: 'inventory_analysis',
modelOrSeedOrSource: 1,
assetType: 1,
filePath: '/path/to/inventory_analysis.sql',
},
{
name: 'shipping_analysis',
modelOrSeedOrSource: 1,
assetType: 1,
filePath: '/path/to/shipping_analysis.sql',
},
{
name: 'sales_forecasting',
modelOrSeedOrSource: 1,
assetType: 1,
filePath: '/path/to/sales_forecasting.sql',
},
{
name: 'logistics_optimization',
modelOrSeedOrSource: 1,
assetType: 1,
filePath: '/path/to/logistics_optimization.sql',
},
{
name: 'market_trends',
modelOrSeedOrSource: 1,
assetType: 1,
filePath: '/path/to/market_trends.sql',
},
{
name: 'combined_insights',
modelOrSeedOrSource: 1,
assetType: 1,
filePath: '/path/to/combined_insights.sql',
},
{
name: 'finance_insights',
modelOrSeedOrSource: 1,
assetType: 1,
filePath: '/path/to/finance_insights.sql',
},
{
name: 'operational_insights',
modelOrSeedOrSource: 1,
assetType: 1,
filePath: '/path/to/operational_insights.sql',
},
{
name: 'strategic_decisions',
modelOrSeedOrSource: 1,
assetType: 1,
filePath: '/path/to/strategic_decisions.sql',
},
],
Expand Down
8 changes: 4 additions & 4 deletions js/packages/quary-extension-ui/src/lib/sampleData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ export const sampleQueryResult: QueryResult = {
],
},
{ name: 'currency', values: ['GBP', 'GBP', 'GBP', 'GBP'] },
{ name: 'value', values: [33406.5, 33406.5, 33406.5, 33406.5] },
{ name: 'value', values: ['33406.5', '33406.5', '33406.5', '33406.5'] },
{
name: 'date_opened',
values: ['2022-12-21', '2022-12-21', '2022-12-21', '2022-12-21'],
},
{ name: 'date_closed', values: [null, null, null, null] },
{ name: 'date_closed', values: ['null', 'null', 'null', 'null'] },
],
}

Expand Down Expand Up @@ -47,7 +47,7 @@ export const sampleQueryResultWithTypes: QueryResult = {
{
name: 'value',
type: 'REAL',
values: [33406.5, 33406.5, 33406.5, 33406.5],
values: ['33406.5', '33406.5', '33406.5', '33406.5'],
},
{
name: 'date_opened',
Expand All @@ -57,7 +57,7 @@ export const sampleQueryResultWithTypes: QueryResult = {
{
name: 'date_closed',
type: 'DATE',
values: [null, null, null, null],
values: ['null', 'null', 'null', 'null'],
},
],
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const Main: Story = {
{
name: 'value',
type: 'REAL',
values: [33406.5, 33406.5, 33406.5, 33406.5],
values: ['33406.5', '33406.5', '33406.5', '33406.5'],
},
{
name: 'date_opened',
Expand All @@ -48,7 +48,7 @@ export const Main: Story = {
{
name: 'date_closed',
type: 'DATE',
values: [null, null, null, null],
values: ['null', 'null', 'null', 'null'],
},
],
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Meta, StoryObj } from '@storybook/react'
import { DatabaseOnboardingOptions } from '@shared/globalViewState'
import { OnboardingView } from './OnboardingView'

const meta: Meta<typeof OnboardingView> = {
Expand All @@ -22,7 +23,7 @@ export const BigQueryLoading: Story = {
states: {
type: 'listSourcesLoading',
database: {
type: 'bigQuery',
type: DatabaseOnboardingOptions.BigQuery,
token: 'token',
},
},
Expand All @@ -34,7 +35,7 @@ export const SqliteLoading: Story = {
states: {
type: 'listSourcesLoading',
database: {
type: 'sqlite',
type: DatabaseOnboardingOptions.Sqlite,
path: 'db.sqlite',
},
},
Expand All @@ -46,7 +47,7 @@ export const SqliteInMemoryLoading: Story = {
states: {
type: 'listSourcesLoading',
database: {
type: 'sqliteInMemory',
type: DatabaseOnboardingOptions.SQLiteInMemory,
},
},
},
Expand All @@ -70,7 +71,7 @@ export const SqliteError: Story = {
states: {
type: 'listSourcesError',
database: {
type: 'sqlite',
type: DatabaseOnboardingOptions.Sqlite,
path: '/path/to/sqlite.db',
},
error: 'error',
Expand All @@ -83,7 +84,7 @@ export const SqliteInMemoryError: Story = {
states: {
type: 'listSourcesError',
database: {
type: 'sqliteInMemory',
type: DatabaseOnboardingOptions.SQLiteInMemory,
},
error: 'error',
},
Expand All @@ -95,7 +96,7 @@ export const BigQuerySuccess: Story = {
states: {
type: 'listSourcesSuccess',
sourceDetails: {
type: 'bigQuery',
type: DatabaseOnboardingOptions.BigQuery,
sources: [
{
name: 'stg_employees',
Expand Down Expand Up @@ -127,7 +128,7 @@ export const BigQuerySuccessVeryLongList: Story = {
states: {
type: 'listSourcesSuccess',
sourceDetails: {
type: 'bigQuery',
type: DatabaseOnboardingOptions.BigQuery,
sources: [
{
name: 'stg_employees',
Expand Down Expand Up @@ -185,7 +186,7 @@ export const SnowflakeSuccess: Story = {
states: {
type: 'listSourcesSuccess',
sourceDetails: {
type: 'snowflake',
type: DatabaseOnboardingOptions.Snowflake,
sources: [
{
name: 'stg_employees',
Expand Down Expand Up @@ -217,7 +218,7 @@ export const SqliteSuccess: Story = {
states: {
type: 'listSourcesSuccess',
sourceDetails: {
type: 'sqlite',
type: DatabaseOnboardingOptions.Sqlite,
path: '/path/to/sqlite.db',
sources: [
{
Expand Down

0 comments on commit 775512a

Please sign in to comment.