From 2bcb2a546092c97f8b8144a1f37445e5e9c3fc3c Mon Sep 17 00:00:00 2001 From: Rohit Ashiwal Date: Tue, 21 May 2024 20:59:10 +0530 Subject: [PATCH] cypress: modify test to check for inequality (#1017) --- .../plugins/index-management-dashboards-plugin/aliases.js | 2 +- .../index-management-dashboards-plugin/data_streams.js | 2 +- .../index-management-dashboards-plugin/indices_spec.js | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cypress/integration/plugins/index-management-dashboards-plugin/aliases.js b/cypress/integration/plugins/index-management-dashboards-plugin/aliases.js index 6f1ddbf63..f20055bc6 100644 --- a/cypress/integration/plugins/index-management-dashboards-plugin/aliases.js +++ b/cypress/integration/plugins/index-management-dashboards-plugin/aliases.js @@ -167,7 +167,7 @@ describe("Aliases", () => { }).then((response) => { let response_obj = JSON.parse(response["allRequestResponses"][0]["Response Body"]); let num = response_obj["_all"]["total"]["translog"]["uncommitted_operations"]; - expect(num).to.equal(1); + expect(num).not.equal(0); }); // Flush btn should be disabled if no items selected diff --git a/cypress/integration/plugins/index-management-dashboards-plugin/data_streams.js b/cypress/integration/plugins/index-management-dashboards-plugin/data_streams.js index d2d93fc41..c4bd202d7 100644 --- a/cypress/integration/plugins/index-management-dashboards-plugin/data_streams.js +++ b/cypress/integration/plugins/index-management-dashboards-plugin/data_streams.js @@ -99,7 +99,7 @@ describe("Data stream", () => { }).then((response) => { let response_obj = JSON.parse(response["allRequestResponses"][0]["Response Body"]); let num = response_obj["_all"]["total"]["translog"]["uncommitted_operations"]; - expect(num).to.equal(1); + expect(num).not.equal(0); }); cy.get('[data-test-subj="moreAction"]').click(); diff --git a/cypress/integration/plugins/index-management-dashboards-plugin/indices_spec.js b/cypress/integration/plugins/index-management-dashboards-plugin/indices_spec.js index 0989b017a..d490afb42 100644 --- a/cypress/integration/plugins/index-management-dashboards-plugin/indices_spec.js +++ b/cypress/integration/plugins/index-management-dashboards-plugin/indices_spec.js @@ -550,7 +550,7 @@ describe("Indexes", () => { }).then((response) => { let response_obj = JSON.parse(response["allRequestResponses"][0]["Response Body"]); let num = response_obj["_all"]["total"]["translog"]["uncommitted_operations"]; - expect(num).to.equal(1); + expect(num).not.equal(0); }); // Select an index @@ -601,7 +601,7 @@ describe("Indexes", () => { }).then((response) => { let response_obj = JSON.parse(response["allRequestResponses"][0]["Response Body"]); let num = response_obj["_all"]["total"]["translog"]["uncommitted_operations"]; - expect(num).to.equal(1); + expect(num).not.equal(0); }); cy.get('[data-test-subj="moreAction"]').click();