Skip to content

Commit

Permalink
fix : remove wait callback and add wait to content
Browse files Browse the repository at this point in the history
  • Loading branch information
Salman-Apptware committed Dec 5, 2023
1 parent de5eb0e commit 8d0938c
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions smoke-test/tests/cypress/cypress/e2e/settings/manage_policies.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,8 @@ describe("create and manage platform and metadata policies", () => {
cy.contains('tr', `${platform_policy_name}`).should('be.visible');
cy.contains('tr', `${platform_policy_name}` )
.contains('EDIT')
.click();
cy.wait(() => cy.contains("Edit a Policy").should('be.visible'), {
timeout: 10000, // Adjust the timeout as needed
interval: 1000 // Adjust the interval as needed
});
.click().wait(1000);
cy.contains("Edit a Policy").wait(1000);
cy.clickOptionWithTestId("policy-name");
cy.focused().clear().type(platform_policy_edited);
cy.clickOptionWithTestId("policy-description");
Expand Down Expand Up @@ -113,14 +110,10 @@ describe("create and manage platform and metadata policies", () => {
it("edit metadata policy", () => {
cy.loginWithCredentials();
cy.visit("/settings/permissions/policies");
cy.contains('tr', `${platform_policy_name}`).should('be.visible');
cy.contains('tr', `${platform_policy_name}` )
cy.contains('tr', `${metadata_policy_name}` )
.contains('EDIT')
.click();
cy.wait(() => cy.contains("Edit a Policy").should('be.visible'), {
timeout: 10000, // Adjust the timeout as needed
interval: 1000 // Adjust the interval as needed
});
.click().wait(1000);
cy.contains("Edit a Policy").wait(1000);
cy.clickOptionWithTestId("policy-name")
cy.focused().clear().type(metadata_policy_edited);
cy.clickOptionWithTestId("policy-description");
Expand Down

0 comments on commit 8d0938c

Please sign in to comment.