Skip to content

Commit

Permalink
test: updated test for DataIdentifier (#32752)
Browse files Browse the repository at this point in the history
DataIdentifier test fix

app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/DataIdentifier_spec.ts

RCA:
Exeternal API was the main reason for failure
1. external API was used
2. Replaced with TED API

Removed unwanted wait 

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


## Summary by CodeRabbit

- **Bug Fixes**
- Improved the reliability of list loading in automated tests by
removing unnecessary delays.
- Enhanced data processing in lists by modifying the data configuration
format.
- Updated test configuration to use the correct spec file path for
limited tests.
- Added interactions with EditorNavigation and propPane for selecting
entities and properties in the test scenario.
- Added a new declaration `_dropdownControlError` to the `PropertyPane`
class, representing a selector for dropdown control errors.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
  • Loading branch information
NandanAnantharamu committed Apr 22, 2024
1 parent 85bed5b commit 16874f4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,22 +38,23 @@ describe(
() => {
before(() => {
agHelper.AddDsl("Listv2/ListV2WithNullPrimaryKey");
agHelper.Sleep(3000); //for List to load for CI flakyness
});

it("1. Widgets get displayed when PrimaryKey doesn't exist - SSP", () => {
apiPage.CreateAndFillApi(
"https:https://api.punkapi.com/v2/beers?page={{List1.pageNo}}&per_page={{List1.pageSize}}",
"http:https://host.docker.internal:5001/v1/dynamicrecords/getrecordsArray",
"",
);
agHelper.VerifyEvaluatedValue(
"https://api.punkapi.com/v2/beers?page=1&per_page=2",
);
apiPage.RunAPI(false);
EditorNavigation.SelectEntityByName("List1", EntityType.Widget);
propPane.SelectPropertiesDropDown("Data Identifier", "value");
agHelper.AssertElementAbsence(propPane._dropdownControlError);

EditorNavigation.SelectEntityByName("Text2", EntityType.Widget, {}, [
"List1",
"Container1",
]);

propPane.UpdatePropertyFieldValue("Text", "{{currentIndex}}");
agHelper.AssertText(propPane._widgetToVerifyText("Text2"), "text", "0");
table.NavigateToPageUsingButton_List("next", 2);
Expand Down
1 change: 1 addition & 0 deletions app/client/cypress/support/Pages/PropertyPane.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ export class PropertyPane {

_dataIcon = (icon: string) => `[data-icon="${icon}"]`;
_iconDropdown = "[data-test-id='virtuoso-scroller']";
_dropdownControlError = "[data-testid='t---dropdown-control-error']";

public OpenJsonFormFieldSettings(fieldName: string) {
this.agHelper.GetNClick(this._jsonFieldEdit(fieldName));
Expand Down

0 comments on commit 16874f4

Please sign in to comment.