From 93721c87dfb22cc27fa46ed8a623730d1d187ba6 Mon Sep 17 00:00:00 2001 From: Darshit Chanpura Date: Fri, 29 Mar 2024 11:06:53 -0400 Subject: [PATCH] Addresses nits to make tests more robust Signed-off-by: Darshit Chanpura --- public/apps/configuration/utils/display-utils.tsx | 9 ++++++++- .../multi-datasources/multi_datasources_enabled.spec.js | 6 +++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/public/apps/configuration/utils/display-utils.tsx b/public/apps/configuration/utils/display-utils.tsx index d4b33fb62..f11584ab4 100644 --- a/public/apps/configuration/utils/display-utils.tsx +++ b/public/apps/configuration/utils/display-utils.tsx @@ -70,7 +70,14 @@ export function renderCustomization(reserved: boolean, props: UIProps) { - {reserved ? 'Reserved' : 'Custom'} + + {reserved ? 'Reserved' : 'Custom'} + ); diff --git a/test/cypress/e2e/multi-datasources/multi_datasources_enabled.spec.js b/test/cypress/e2e/multi-datasources/multi_datasources_enabled.spec.js index 41006569e..8026c3da7 100644 --- a/test/cypress/e2e/multi-datasources/multi_datasources_enabled.spec.js +++ b/test/cypress/e2e/multi-datasources/multi_datasources_enabled.spec.js @@ -101,7 +101,7 @@ describe('Multi-datasources enabled', () => { // Remote cluster auth cy.get('[data-test-subj="dataSourceSelectableContextMenuHeaderLink"]').click(); cy.get('[title="9202"]').click(); - cy.get('.panel-header-count').first().invoke('text').should('contain', '(2)'); + cy.get('.panel-header-count').first().invoke('text').should('contain', '(6)'); }); it('Checks Users Tab', () => { @@ -157,7 +157,7 @@ describe('Multi-datasources enabled', () => { // Create an action group cy.get('[id="Create action group"]').click(); - cy.contains('div.euiFlexItem > button', 'Create from blank').click(); + cy.get('[id="create-from-blank"]').click(); cy.get('[data-test-subj="name-text"]') .focus() .type('test_permission_ag', { force: true }) @@ -167,7 +167,7 @@ describe('Multi-datasources enabled', () => { // Permission exists on the remote data source cy.get('[data-text="Customization"]').click(); - cy.contains('div.euiFilterSelect__items > button', 'Custom').click(); + cy.get('[data-test-subj="filter-custom-action-groups"]').click(); cy.get('[data-test-subj="checkboxSelectRow-test_permission_ag"]').should('exist'); // Permission doesn't exist on local cluster