Skip to content

Commit

Permalink
fix: Fix the S3 error case (#39240)
Browse files Browse the repository at this point in the history
## 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"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/13303544816>
> Commit: c4ff737
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=13303544816&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Datasource`
> Spec:
> <hr>Thu, 13 Feb 2025 09:21:50 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [x] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## 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.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
  • Loading branch information
sagar-qa007 authored Feb 13, 2025
1 parent 261cf8b commit ec4ea27
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const commonlocators = require("../../../../locators/commonlocators.json");

import {
agHelper,
assertHelper,
dataSources,
deployMode,
homePage,
Expand Down Expand Up @@ -45,6 +46,7 @@ describe(

//TestData & save datasource
dataSources.TestSaveDatasource();
agHelper.WaitUntilAllToastsDisappear();
// fetch bucket
cy.wait("@getDatasourceStructure").should(
"have.nested.property",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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) => {
Expand Down
4 changes: 2 additions & 2 deletions app/client/cypress/support/Pages/DataSources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down

0 comments on commit ec4ea27

Please sign in to comment.