Skip to content

Commit

Permalink
Fix js-ui some testcafe tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dk981234 committed Dec 28, 2024
1 parent a0f6e89 commit 0e06b0a
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/survey-core/src/popup-dropdown-view-model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export class PopupDropdownViewModel extends PopupBaseViewModel {
}
private resizeWindowCallback = () => {
if(!this.isOverlay) {
this.updatePosition(true, SurveyModel.platform === "vue" || SurveyModel.platform === "vue3" || SurveyModel.platform == "react");
this.updatePosition(true, SurveyModel.platform === "vue" || SurveyModel.platform === "vue3" || SurveyModel.platform == "react" || SurveyModel.platform == "js-ui");
}
};
private clientY: number = 0;
Expand Down
18 changes: 18 additions & 0 deletions packages/survey-js-ui/testCafe/countriesMock.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"RestResponse": {
"result": [
{
"alpha2_code": "US",
"name": "United States"
},
{
"alpha2_code": "CU",
"name": "Cuba"
},
{
"alpha2_code": "RO",
"name": "Romania"
}
]
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/survey-js-ui/testCafe/resources/stub.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Wombat
5 changes: 5 additions & 0 deletions testCafe/questions/paneldynamic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ const json = {
frameworks.forEach((framework) => {
fixture`${framework} ${title}`.page`${url}${framework}`.beforeEach(
async (t) => {
await t.resizeWindow(1920, 1080);
await initSurvey(framework, json);
}
);
Expand Down Expand Up @@ -234,6 +235,7 @@ frameworks.forEach((framework) => {
frameworks.forEach((framework) => {
fixture`${framework} ${title}`.page`${url}${framework}`.beforeEach(
async (t) => {
await t.resizeWindow(1920, 1080);
await initSurvey(framework, json, undefined, true);
}
);
Expand Down Expand Up @@ -268,6 +270,7 @@ const json2 = {
frameworks.forEach((framework) => {
fixture`${framework} ${title}`.page`${url}${framework}`.beforeEach(
async (t) => {
await t.resizeWindow(1920, 1080);
await initSurvey(framework, json2);
}
);
Expand Down Expand Up @@ -321,6 +324,7 @@ const json3 = {
frameworks.forEach((framework) => {
fixture`${framework} ${title}`.page`${url}${framework}`.beforeEach(
async (t) => {
await t.resizeWindow(1920, 1080);
await initSurvey(framework, json3);
}
);
Expand Down Expand Up @@ -379,6 +383,7 @@ const jsonCheckboxRestFul = {
frameworks.forEach((framework) => {
fixture`${framework} ${title}`.page`${url}${framework}`.beforeEach(
async (t) => {
await t.resizeWindow(1920, 1080);
}
);

Expand Down

0 comments on commit 0e06b0a

Please sign in to comment.