Added test case to validate onSearchTextChange function if configured in table widget
This commit is contained in:
parent
e96fa63f6d
commit
a5dbb5261b
|
|
@ -67,7 +67,11 @@
|
|||
"bottomRow": 10,
|
||||
"parentId": "tyiwk4xuq0",
|
||||
"widgetId": "5up3r2iuvs",
|
||||
"dynamicBindingPathList": []
|
||||
"dynamicTriggerPathList": [{
|
||||
"key": "onSearchTextChanged"
|
||||
}],
|
||||
"onSearchTextChanged": "{{Api1.run()}}",
|
||||
"selectedRow": "{{Table1.tableData[Table1.selectedRowIndex]}}"
|
||||
}
|
||||
],
|
||||
"widgetId": "tyiwk4xuq0",
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ const dsl = require("../../../../fixtures/tableWidgetDsl.json");
|
|||
const pages = require("../../../../locators/Pages.json");
|
||||
const apiPage = require("../../../../locators/ApiEditor.json");
|
||||
const publishPage = require("../../../../locators/publishWidgetspage.json");
|
||||
const widgetsPage = require("../../../../locators/Widgets.json");
|
||||
|
||||
describe("Test Create Api and Bind to Table widget", function() {
|
||||
let apiData;
|
||||
|
|
@ -43,6 +44,18 @@ describe("Test Create Api and Bind to Table widget", function() {
|
|||
cy.readTabledataPublish("0", "1").then((tabData) => {
|
||||
expect(apiData).to.eq(`\"${tabData}\"`);
|
||||
});
|
||||
cy.get(commonlocators.backToEditor).click();
|
||||
});
|
||||
|
||||
it("Validate onSearchTextChanged function is called when configured for search text", function() {
|
||||
cy.SearchEntityandOpen("Table1");
|
||||
cy.get(".t--widget-tablewidget .t--search-input")
|
||||
.first()
|
||||
.type("Currey");
|
||||
cy.wait(5000);
|
||||
cy.readTabledataPublish("0", "1").then((tabData) => {
|
||||
expect(apiData).to.eq(`\"${tabData}\"`);
|
||||
});
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
|
|
|
|||
|
|
@ -38,6 +38,8 @@
|
|||
"textInputval": ".t--draggable-textwidget span.t--widget-name",
|
||||
"textCenterAlign": ".t--property-control-textalign .t--icon-tab-CENTER",
|
||||
"ColumnAction": ".t--property-control-rowbutton button",
|
||||
"SearchTextChangeAction": ".t--property-control-onsearchtextchanged button",
|
||||
"tableSearchTextChangeSelected": ".t--property-control-onsearchtextchanged",
|
||||
"videoWidget": ".t--draggable-videowidget",
|
||||
"autoPlay": ".t--property-control-autoplay > .bp3-control > .bp3-control-indicator",
|
||||
"defaultOption": ".t--property-control-defaultoption .CodeMirror-code",
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ class SearchComponent extends React.Component<
|
|||
render() {
|
||||
return (
|
||||
<SearchInputWrapper
|
||||
className="t--search-input"
|
||||
leftIcon="search"
|
||||
onChange={this.handleSearch}
|
||||
placeholder={this.props.placeholder}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user