Skip to content

Commit

Permalink
Add ACC columns checks
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Liang <[email protected]>
  • Loading branch information
RyanL1997 committed Mar 22, 2024
1 parent 3a43b83 commit 60963a0
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ import {
LOCALIZED_UPDATE_TIMESTAMP_ACC,
REFRESH_BTN_DESC,
CREATE_ACC_BTN_DESC,
ACC_NAME,
ACC_STATUS,
ACC_TYPE,
ACC_DATABASE,
ACC_TABLE,
ACC_REFRESH_TYPE,
ACC_DESTINATION_INDEX,
ACC_ACTIONS_COL,
} from '../../utils/flint-datasources/panel_constants'

Cypress.on('uncaught:exception', (err, runnable) => {
Expand Down Expand Up @@ -67,4 +75,40 @@ describe('Acceleration Table test', () => {
cy.contains('.euiButton--primary', REFRESH_BTN_DESC).should('exist');
cy.contains('.euiButton--primary.euiButton--fill', CREATE_ACC_BTN_DESC).should('exist');
});
});

it('Navigates to Acceleration table and check table columns', () => {
goToAccelerationTable();

cy.get('th[data-test-subj="tableHeaderCell_indexName_0"]')
.contains('span', ACC_NAME)
.should('exist');

cy.get('th[data-test-subj="tableHeaderCell_status_1"]')
.contains('span', ACC_STATUS)
.should('exist');

cy.get('th[data-test-subj="tableHeaderCell_type_2"]')
.contains('span', ACC_TYPE)
.should('exist');

cy.get('th[data-test-subj="tableHeaderCell_database_3"]')
.contains('span', ACC_DATABASE)
.should('exist');

cy.get('th[data-test-subj="tableHeaderCell_table_4"]')
.contains('span', ACC_TABLE)
.should('exist');

cy.get('th[data-test-subj="tableHeaderCell_refreshType_5"]')
.contains('span', ACC_REFRESH_TYPE)
.should('exist');

cy.get('th[data-test-subj="tableHeaderCell_flintIndexName_6"]')
.contains('span', ACC_DESTINATION_INDEX)
.should('exist');

cy.get('th')
.contains('span[title="Actions"]', ACC_ACTIONS_COL)
.should('exist');
});
});
14 changes: 10 additions & 4 deletions .cypress/utils/flint-datasources/panel_constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,15 @@ export const ACC_TABLE_DESC = 'Accelerations optimize query performance by index

export const LOCALIZED_UPDATE_TIMESTAMP_ACC = '3/21/2024, 3:01:22 PM';

// Acceleration Table Columns
export const ACC_NAME_COL = 'Name';
export const ACC_TYPE_COL = 'Type';
// Acceleration Table Columns / Flyout Fields
export const ACC_NAME = 'Name';
export const ACC_STATUS = 'Status';
export const ACC_TYPE = 'Type';
export const ACC_DATABASE = 'Database';
export const ACC_TABLE = 'Table';
export const ACC_REFRESH_TYPE = 'Refresh Type';
export const ACC_DESTINATION_INDEX = 'Destination Index';
export const ACC_ACTIONS_COL = 'Actions';

// Table Actions
export const ACTION_ICON_DIS = 'Discover';
Expand All @@ -49,4 +55,4 @@ export const TABLE_NAME_2 = 'http_logs_1';
export const TABLE_NAME_3 = 'table_no_timestamp';
export const TABLE_NAME_4 = 'table_struct';
export const AO_TYPE_TABLE = 'Table';
export const SKIP_INDEX_NAME = 'skipping_index';
export const SKIP_INDEX_NAME = 'skipping_index';

0 comments on commit 60963a0

Please sign in to comment.