Skip to content

Commit

Permalink
#5415 Dynamic panel (tab view). Menu should be closed by clicking out…
Browse files Browse the repository at this point in the history
…side (#5416)

Fixes #5415
  • Loading branch information
novikov82 committed Apr 18, 2024
1 parent 2eb20be commit 77e25a5
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/survey-creator-core/src/components/simulator.scss
Expand Up @@ -50,6 +50,7 @@

.sv-popup:not(.sv-popup--overlay):not(.sv-popup--modal) {
width: auto;
right: 0;
}
}
}
Expand Down
42 changes: 42 additions & 0 deletions testCafe/preview/survey.ts
@@ -0,0 +1,42 @@
import { url, getTabbedMenuItemByText, setJSON, creatorTabPreviewName } from "../helper";
import { Selector, ClientFunction } from "testcafe";
const title = "Preview tab";

fixture`${title}`.page`${url}`.beforeEach(
async (t) => {
await t.maximizeWindow();
}
);

test("Test popups", async (t) => {
await setJSON({
"pages": [
{
"name": "page1",
"elements": [
{
"type": "paneldynamic",
"name": "question1",
"templateElements": [
{
"type": "text",
"name": "question2"
}
],
"panelCount": 20,
"renderMode": "tab"
}
]
}
]
});

const popup = Selector(".sv-popup__container").filterVisible();
await t
.click(getTabbedMenuItemByText(creatorTabPreviewName))
.expect(popup.visible).notOk()
.click(Selector(".svd-simulator-main .sv-dots__item"))
.expect(popup.visible).ok()
.click(Selector(".sd-question__title").withText("question1"))
.expect(popup.visible).notOk();
});

0 comments on commit 77e25a5

Please sign in to comment.