Skip to content

Commit fa18060

Browse files
committed
Fix alerting dashboards tests failing with security enabled
Replace 'Select clusters' with 'Select data' as the page-load wait assertion. 'Select clusters' is only rendered when cross-cluster monitoring is enabled AND the user has remote index permissions. In the with-security test config, the test user lacks these permissions, so the CrossClusterConfiguration component never renders. 'Select data' is the DataSource panel title which is always present regardless of security configuration or cross-cluster settings. Resolves opensearch-project/alerting-dashboards-plugin#1492 Signed-off-by: Vikhyat Khare <kvikhy@amazon.com>
1 parent 04be670 commit fa18060

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

cypress/integration/plugins/alerting-dashboards-plugin/bucket_level_monitor_spec.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ describe('Bucket-Level Monitors', () => {
166166
cy.get('input[name="name"]').type(SAMPLE_EXTRACTION_QUERY_MONITOR);
167167

168168
// Wait for input to load and then type in the index name
169-
cy.contains('Select clusters');
169+
cy.contains('Select data');
170170
cy.get('#index').type('*{enter}', { force: true });
171171

172172
// Input extraction query
@@ -226,7 +226,7 @@ describe('Bucket-Level Monitors', () => {
226226

227227
// Wait for input to load and then type in the index name
228228
// Pressing enter at the end to create combo box entry and trigger change events for time field below
229-
cy.contains('Select clusters');
229+
cy.contains('Select data');
230230
cy.get('#index').type(`${ALERTING_INDEX.SAMPLE_DATA_ECOMMERCE}{enter}`, {
231231
force: true,
232232
});
@@ -346,7 +346,7 @@ describe('Bucket-Level Monitors', () => {
346346
cy.contains('Edit').click({ force: true });
347347

348348
// Wait for page to load
349-
cy.contains('Select clusters');
349+
cy.contains('Select data');
350350

351351
// Click on the Index field and type in multiple index names to replicate the bug
352352
cy.get('#index')

cypress/integration/plugins/alerting-dashboards-plugin/query_level_monitor_spec.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ describe('Query-Level Monitors', () => {
127127
cy.get('input[name="name"]').type(SAMPLE_MONITOR, { force: true });
128128

129129
// Wait for input to load and then type in the index name
130-
cy.contains('Select clusters');
130+
cy.contains('Select data');
131131
cy.get('#index').type('*', { force: true });
132132

133133
// Add a trigger
@@ -220,7 +220,7 @@ describe('Query-Level Monitors', () => {
220220
});
221221

222222
// Wait for page to load
223-
cy.contains('Select clusters');
223+
cy.contains('Select data');
224224

225225
// Click on the Index field and type in multiple index names to replicate the bug
226226
cy.get('#index')
@@ -350,7 +350,7 @@ describe('Query-Level Monitors', () => {
350350
cy.get('[data-test-subj="visualEditorRadioCard"]').click({ force: true });
351351

352352
// Wait for page to load
353-
cy.contains('Select clusters');
353+
cy.contains('Select data');
354354

355355
// Wait for input to load and then type in the index name
356356
cy.get('#index').type(

0 commit comments

Comments
 (0)