test: Fixing Gsheet Tests (#29427)

## Description
- Fixing Gsheet Tests due to the latest changes to the page

#### Type of change
- Cypress
## Testing
- [x] Cypress

#### QA activity:
- [ ] Added `Test Plan Approved` label after Cypress tests were reviewed


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

- **New Features**
- Enhanced the test suite to cover new interactions with the page's left
pane, including expanding/collapsing items and generating new pages.

- **Refactor**
- Simplified the `CreateQueryAfterDSSaved` method by removing the need
for a `datasourceName` parameter, indicating a more streamlined process.

- **Tests**
- Added new end-to-end test cases to validate the functionality of the
left pane in the user interface.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
Saroj 2023-12-08 11:07:23 +05:30 committed by GitHub
parent 8ee2586f75
commit 36db171a17
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -14,6 +14,7 @@ import {
import PageList from "../../support/Pages/PageList";
import EditorNavigation, {
EntityType,
PageLeftPane,
} from "../../support/Pages/EditorNavigation";
const workspaceName = "gsheet apps";
@ -110,6 +111,10 @@ describe("GSheet Miscellaneous Tests", function () {
EditorNavigation.SelectEntityByName(dataSourceName, EntityType.Datasource);
// Select the spreadsheet and sheet name
PageLeftPane.expandCollapseItem(spreadSheetName);
PageLeftPane.assertPresence("Sheet1");
PageLeftPane.expandCollapseItem("Sheet1");
agHelper.ClickButton("Generate new page");
agHelper.GetNClick(dataSources._selectTableDropdown, 0, true);
agHelper.GetNClickByContains(dataSources._dropdownOption, spreadSheetName);
agHelper.Sleep(1000);

View File

@ -1808,7 +1808,7 @@ export class DataSources {
new RegExp("^" + datasourceName + "$"),
);
this.agHelper.WaitUntilEleAppear(this._createQuery);
this.CreateQueryAfterDSSaved(datasourceName);
this.CreateQueryAfterDSSaved();
}
public AssertDataSourceInfo(info: string[]) {