diff --git a/superset-frontend/src/logger/LogUtils.ts b/superset-frontend/src/logger/LogUtils.ts index b3e834bc935..9da6f36f49f 100644 --- a/superset-frontend/src/logger/LogUtils.ts +++ b/superset-frontend/src/logger/LogUtils.ts @@ -35,6 +35,15 @@ export const LOG_ACTIONS_EXPLORE_DASHBOARD_CHART = 'explore_dashboard_chart'; export const LOG_ACTIONS_EXPORT_CSV_DASHBOARD_CHART = 'export_csv_dashboard_chart'; export const LOG_ACTIONS_CHANGE_DASHBOARD_FILTER = 'change_dashboard_filter'; +export const LOG_ACTIONS_DATASET_CREATION_EMPTY_CANCELLATION = + 'dataset_creation_empty_cancellation'; +export const LOG_ACTIONS_DATASET_CREATION_DATABASE_CANCELLATION = + 'dataset_creation_database_cancellation'; +export const LOG_ACTIONS_DATASET_CREATION_SCHEMA_CANCELLATION = + 'dataset_creation_schema_cancellation'; +export const LOG_ACTIONS_DATASET_CREATION_TABLE_CANCELLATION = + 'dataset_creation_table_cancellation'; +export const LOG_ACTIONS_DATASET_CREATION_SUCCESS = 'dataset_creation_success'; // Log event types -------------------------------------------------------------- export const LOG_EVENT_TYPE_TIMING = new Set([ @@ -56,6 +65,14 @@ export const LOG_EVENT_TYPE_USER = new Set([ LOG_ACTIONS_MOUNT_EXPLORER, ]); +export const LOG_EVENT_DATASET_TYPE_DATASET_CREATION = [ + LOG_ACTIONS_DATASET_CREATION_EMPTY_CANCELLATION, + LOG_ACTIONS_DATASET_CREATION_DATABASE_CANCELLATION, + LOG_ACTIONS_DATASET_CREATION_SCHEMA_CANCELLATION, + LOG_ACTIONS_DATASET_CREATION_TABLE_CANCELLATION, + LOG_ACTIONS_DATASET_CREATION_SUCCESS, +]; + export const Logger = { timeOriginOffset: 0, diff --git a/superset-frontend/src/views/CRUD/data/dataset/AddDataset/AddDataset.test.tsx b/superset-frontend/src/views/CRUD/data/dataset/AddDataset/AddDataset.test.tsx index 53ece888246..f20c5ae5d1e 100644 --- a/superset-frontend/src/views/CRUD/data/dataset/AddDataset/AddDataset.test.tsx +++ b/superset-frontend/src/views/CRUD/data/dataset/AddDataset/AddDataset.test.tsx @@ -35,7 +35,7 @@ describe('AddDataset', () => { // Left panel expect(blankeStateImgs[0]).toBeVisible(); // Footer - expect(screen.getByText(/footer/i)).toBeVisible(); + expect(screen.getByText(/Cancel/i)).toBeVisible(); expect(blankeStateImgs.length).toBe(1); }); diff --git a/superset-frontend/src/views/CRUD/data/dataset/AddDataset/Footer/Footer.test.tsx b/superset-frontend/src/views/CRUD/data/dataset/AddDataset/Footer/Footer.test.tsx index bbff68c88da..44724ad5978 100644 --- a/superset-frontend/src/views/CRUD/data/dataset/AddDataset/Footer/Footer.test.tsx +++ b/superset-frontend/src/views/CRUD/data/dataset/AddDataset/Footer/Footer.test.tsx @@ -20,10 +20,47 @@ import React from 'react'; import { render, screen } from 'spec/helpers/testing-library'; import Footer from 'src/views/CRUD/data/dataset/AddDataset/Footer'; -describe('Footer', () => { - it('renders a blank state Footer', () => { - render(