## Description Added specs: 1. AutoHeight_Container_spec.js 2. AutoHeight_Form_spec.js 3. AutoHeight_Modal_spec.js 4. AutoHeight_Tabs_spec.js #### Type of change - Chore (housekeeping or task changes that don't impact user perception) ## Testing #### How Has This Been Tested? > Please describe the tests that you ran to verify your changes. Also list any relevant details for your test configuration. > Delete anything that is not relevant - [ ] Manual - [ ] Jest - [x] Cypress --------- Co-authored-by: rahulramesha <rahul@appsmith.com>
32 lines
1012 B
TypeScript
32 lines
1012 B
TypeScript
import { ObjectsRegistry } from "../Objects/Registry";
|
|
|
|
export class Tabs {
|
|
public agHelper = ObjectsRegistry.AggregateHelper;
|
|
public propPane = ObjectsRegistry.PropertyPane;
|
|
|
|
private _tabSelector = (tabId: string): string => `.t--tabid-${tabId}`;
|
|
private _tabsWidgetNameSelector = (widgetName: string): string =>
|
|
`.t--widget-${widgetName?.toLowerCase()}`;
|
|
private _showTabsProperty = "showtabs";
|
|
|
|
public toggleShowTabHeader(showTabs = true, selector: string) {
|
|
this.agHelper.GetNClick(selector).then(() => {
|
|
this.propPane.TogglePropertyState(
|
|
this._showTabsProperty,
|
|
showTabs ? "On" : "Off",
|
|
);
|
|
this.agHelper.Sleep();
|
|
});
|
|
}
|
|
|
|
public getTabSelectorByWidgetName(widgetName = "Tabs1", tabId = "tab1") {
|
|
return `${this._tabsWidgetNameSelector(widgetName)} ${this._tabSelector(
|
|
tabId,
|
|
)}`;
|
|
}
|
|
|
|
public getWidgetSelectorByNameComponent(widgetName = "Tabs1") {
|
|
return `${this._tabsWidgetNameSelector(widgetName)} .t--widget-name`;
|
|
}
|
|
}
|