fix: video widget not visible in widget pane when explorer is pinned (#17318)

This commit is contained in:
akash-codemonk 2022-10-29 11:31:25 +05:30 committed by GitHub
parent b580c8521a
commit 958a38bd63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 29 additions and 5 deletions

View File

@ -1,4 +1,10 @@
const dsl = require("../../../../fixtures/displayWidgetDsl.json");
import { WIDGET } from "../../../../locators/WidgetLocators";
import { ObjectsRegistry } from "../../../../support/Objects/Registry";
const ee = ObjectsRegistry.EntityExplorer,
agHelper = ObjectsRegistry.AggregateHelper,
locator = ObjectsRegistry.CommonLocators;
describe("Entity explorer tests related to pinning and unpinning", function() {
before(() => {
@ -19,4 +25,14 @@ describe("Entity explorer tests related to pinning and unpinning", function() {
cy.get(".t--pin-entity-explorer").click();
cy.get(".t--entity-explorer").should("be.visible");
});
it("Widgets visibility in widget pane", function() {
ee.NavigateToSwitcher("widgets");
agHelper.ScrollTo(locator._widgetPane, "bottom");
agHelper.AssertElementVisible(ee.locator._widgetPageIcon(WIDGET.VIDEO));
ee.PinUnpinEntityExplorer(true);
agHelper.AssertElementVisible(ee.locator._widgetPageIcon(WIDGET.VIDEO));
ee.PinUnpinEntityExplorer(false);
ee.NavigateToSwitcher("explorer");
});
});

View File

@ -13,7 +13,7 @@ describe("Bug 14666: Api Response Test Functionality ", function() {
apiPage.CreateAndFillApi(testUrl1, "TableTestAPI");
agHelper.AssertAutoSave();
apiPage.RunAPI();
cy.get(apiEditor.tableResponseTab).should('exist');
cy.get(apiEditor.tableResponseTab).should("exist");
cy.DeleteAPI();
});
@ -21,10 +21,13 @@ describe("Bug 14666: Api Response Test Functionality ", function() {
cy.log("Login Successful");
cy.NavigateToAPI_Panel();
cy.log("Navigation to API Panel screen successful");
apiPage.CreateAndFillApi(testdata.baseUrl + testdata.methods, "TableTestAPI");
apiPage.CreateAndFillApi(
testdata.baseUrl + testdata.methods,
"TableTestAPI",
);
agHelper.AssertAutoSave();
apiPage.RunAPI();
cy.get(apiEditor.tableResponseTab).should('not.exist');
cy.get(apiEditor.tableResponseTab).should("not.exist");
cy.DeleteAPI();
});
});

View File

@ -26,6 +26,7 @@ export const WIDGET = {
CAMERA: "camerawidget",
FILEPICKER: "filepickerwidgetv2",
DOCUMENT_VIEWER: "documentviewerwidget",
VIDEO: "videowidget",
CATEGORY_SLIDER: "categorysliderwidget",
NUMBER_SLIDER: "numbersliderwidget",
RANGE_SLIDER: "rangesliderwidget",

View File

@ -149,6 +149,7 @@ export class CommonLocators {
_deployedPage = `.t--page-switch-tab`;
_hints = "ul.CodeMirror-hints li";
_cancelActionExecution = ".t--cancel-action-button";
_widgetPane = "[data-cy='widget-sidebar-scrollable-wrapper']";
_sliderThumb = '[data-cy="slider-thumb"]';
_bottomPaneCollapseIcon = ".t--tabs-collapse-icon";
_dropDownMultiTreeValue = (dropdownOption: string) =>

View File

@ -147,7 +147,7 @@ export const EntityExplorerSidebar = memo((props: Props) => {
return (
<div
className={classNames({
[`js-entity-explorer t--entity-explorer transform transition-all flex h-full duration-400 border-r border-gray-200 ${tailwindLayers.entityExplorer}`]: true,
[`js-entity-explorer t--entity-explorer transform transition-all flex h-[inherit] duration-400 border-r border-gray-200 ${tailwindLayers.entityExplorer}`]: true,
relative: pinned && !isPreviewMode,
"-translate-x-full": (!pinned && !active) || isPreviewMode,
"shadow-xl": !pinned,

View File

@ -77,7 +77,10 @@ function WidgetSidebar({ isActive }: { isActive: boolean }) {
placeholder="Search widgets..."
ref={searchInputRef}
/>
<div className="flex-grow px-3 overflow-y-scroll">
<div
className="flex-grow px-3 overflow-y-scroll"
data-cy="widget-sidebar-scrollable-wrapper"
>
<p className="px-3 py-3 text-sm leading-relaxed text-trueGray-400 t--widget-sidebar">
{createMessage(WIDGET_SIDEBAR_CAPTION)}
</p>