From ec4ea27d7d39bcfea1e4d11c74332949dc955c09 Mon Sep 17 00:00:00 2001 From: Sagar Khalasi Date: Thu, 13 Feb 2025 16:42:14 +0530 Subject: [PATCH] fix: Fix the S3 error case (#39240) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description Fix: Changed to aghelper functions and added check for remove all toast message. Fixes # https://app.zenhub.com/workspaces/qa-63316faf86bb2e170ed2e46b/issues/gh/appsmithorg/appsmith/39239 ## Automation /ok-to-test tags="@tag.Datasource" ### :mag: Cypress test results > [!TIP] > 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 > Workflow run: > Commit: c4ff7376b95da29b1fce2b0fc342badd189aa350 > Cypress dashboard. > Tags: `@tag.Datasource` > Spec: >
Thu, 13 Feb 2025 09:21:50 UTC ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [x] No ## Summary by CodeRabbit - **Tests** - Enhanced automated testing for data page generation and user actions, ensuring smoother and more reliable interactions. - Improved handling of notifications for a more consistent application experience. - **Refactor** - Streamlined internal processes for managing data interactions, enhancing clarity and maintainability in testing routines. --- .../Regression/ServerSide/GenerateCRUD/S3_Spec.js | 13 +++++++------ app/client/cypress/support/Pages/DataSources.ts | 4 ++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/S3_Spec.js b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/S3_Spec.js index 97a620c106..2ec3693535 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/S3_Spec.js +++ b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/S3_Spec.js @@ -6,6 +6,7 @@ const commonlocators = require("../../../../locators/commonlocators.json"); import { agHelper, + assertHelper, dataSources, deployMode, homePage, @@ -45,6 +46,7 @@ describe( //TestData & save datasource dataSources.TestSaveDatasource(); + agHelper.WaitUntilAllToastsDisappear(); // fetch bucket cy.wait("@getDatasourceStructure").should( "have.nested.property", @@ -80,8 +82,7 @@ describe( }); it("2. Generate CRUD page from datasource ACTIVE section", function () { - cy.NavigateToDSGeneratePage(datasourceName); - + dataSources.GeneratePageForDS(datasourceName); // fetch bucket cy.wait("@getDatasourceStructure").should( "have.nested.property", @@ -129,12 +130,12 @@ describe( cy.fillAmazonS3DatasourceForm(); //TestData source - cy.get(".t--test-datasource").click(); - cy.wait("@testDatasource"); + dataSources.TestDatasource(true); + agHelper.WaitUntilAllToastsDisappear(); //Save source - cy.get(".t--save-datasource").click(); - cy.wait("@saveDatasource"); + dataSources.SaveDatasource(); + agHelper.WaitUntilAllToastsDisappear(); //Verify page after save clicked // cy.get("@saveDatasource").then((httpResponse) => { diff --git a/app/client/cypress/support/Pages/DataSources.ts b/app/client/cypress/support/Pages/DataSources.ts index 45f8985feb..8eb08005ea 100644 --- a/app/client/cypress/support/Pages/DataSources.ts +++ b/app/client/cypress/support/Pages/DataSources.ts @@ -85,8 +85,8 @@ export class DataSources { "//div[text()='" + name + "']/parent::div"; public _password = "input[name $= '.datasourceConfiguration.authentication.password']"; - private _testDs = ".t--test-datasource"; - _saveDs = ".t--save-datasource"; + public _testDs = ".t--test-datasource"; + public _saveDs = ".t--save-datasource"; _datasourceCard = ".t--datasource"; _dsMenuoptions = "div.t--datasource-menu-option"; _editButton = ".t--edit-datasource";