Skip to content

Commit 73f6db1

Browse files
authored
add suppress observer (#969)
Signed-off-by: Qingyang(Abby) Hu <[email protected]>
1 parent 8cd68dc commit 73f6db1

File tree

2 files changed

+13
-5
lines changed
  • cypress
    • integration/core-opensearch-dashboards/opensearch-dashboards/apps/vis_type_table
    • utils/plugins/observability-dashboards

2 files changed

+13
-5
lines changed

cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/vis_type_table/embed.spec.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,13 @@ describe('table visualization in embedded mode', () => {
4848
'115',
4949
];
5050

51+
const suppressResizeObserverIssue = () => {
52+
// exception is thrown on loading EuiDataGrid in cypress only, ignore for now
53+
cy.on('uncaught:exception', (err) => {
54+
if (err.message.includes('ResizeObserver loop')) return false;
55+
});
56+
};
57+
5158
before(() => {
5259
cy.deleteIndex(TABLE_INDEX_ID);
5360
cy.deleteIndexPattern(TABLE_INDEX_PATTERN);
@@ -153,6 +160,7 @@ describe('table visualization in embedded mode', () => {
153160
expect(data).to.deep.eq(expectedData);
154161
});
155162
cy.tbClickTableCellAction(2, 0, 0, 'expand', 0, true);
163+
suppressResizeObserverIssue();
156164
cy.tbClickFilterFromExpand('filter out');
157165
cy.reload();
158166
cy.tbGetTableDataFromVisualization().then((data) => {

cypress/utils/plugins/observability-dashboards/constants.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export const testIndexDataSet = [
4343
},
4444
];
4545

46-
export const supressResizeObserverIssue = () => {
46+
export const suppressResizeObserverIssue = () => {
4747
// exception is thrown on loading EuiDataGrid in cypress only, ignore for now
4848
cy.on('uncaught:exception', (err) => {
4949
if (err.message.includes('ResizeObserver loop')) return false;
@@ -185,7 +185,7 @@ export const landOnEventVisualizations = () => {
185185
cy.get('button[id="main-content-vis"]', { timeout: TIMEOUT_DELAY })
186186
.contains('Visualizations')
187187
.click();
188-
supressResizeObserverIssue();
188+
suppressResizeObserverIssue();
189189
cy.wait(delayTime);
190190
};
191191

@@ -256,7 +256,7 @@ export const moveToCreatePage = () => {
256256
})
257257
.eq(0)
258258
.click();
259-
supressResizeObserverIssue();
259+
suppressResizeObserverIssue();
260260
cy.wait(delayTime * 2);
261261
cy.get('[data-test-subj="createPageTitle"]', {
262262
timeout: TIMEOUT_DELAY,
@@ -267,7 +267,7 @@ export const moveToApplication = (name) => {
267267
cy.visit(`${BASE_PATH}/app/observability-applications#`, {
268268
waitForGetTenant: true,
269269
});
270-
supressResizeObserverIssue();
270+
suppressResizeObserverIssue();
271271
cy.wait(delayTime * 2);
272272
cy.get(`[data-test-subj="${name}ApplicationLink"]`, {
273273
timeout: TIMEOUT_DELAY,
@@ -286,7 +286,7 @@ export const moveToEditPage = () => {
286286
cy.get('[data-test-subj="editApplicationButton"]', {
287287
timeout: TIMEOUT_DELAY,
288288
}).click();
289-
supressResizeObserverIssue();
289+
suppressResizeObserverIssue();
290290
cy.wait(delayTime);
291291
cy.get('[data-test-subj="createPageTitle"]', {
292292
timeout: TIMEOUT_DELAY,

0 commit comments

Comments
 (0)