Skip to content

Commit

Permalink
work for #6654 update f-test
Browse files Browse the repository at this point in the history
  • Loading branch information
OlgaLarina committed Sep 1, 2023
1 parent 3d21f38 commit a1d96eb
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 15 deletions.
19 changes: 14 additions & 5 deletions packages/survey-angular-ui/example/src/testCafe/countriesMock.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
{
"RestResponse": {
"result": [
{ "alpha2_code": "US", "name": "Unated States" },
{ "alpha2_code": "CU", "name": "Cuba" },
{ "alpha2_code": "RO","name":"Romania" }
]
"result": [
{
"alpha2_code": "US",
"name": "United States"
},
{
"alpha2_code": "CU",
"name": "Cuba"
},
{
"alpha2_code": "RO",
"name": "Romania"
}
]
}
}
19 changes: 14 additions & 5 deletions packages/survey-vue3-ui/example/public/testCafe/countriesMock.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
{
"RestResponse": {
"result": [
{ "alpha2_code": "US", "name": "Unated States" },
{ "alpha2_code": "CU", "name": "Cuba" },
{ "alpha2_code": "RO","name":"Romania" }
]
"result": [
{
"alpha2_code": "US",
"name": "United States"
},
{
"alpha2_code": "CU",
"name": "Cuba"
},
{
"alpha2_code": "RO",
"name": "Romania"
}
]
}
}
15 changes: 12 additions & 3 deletions testCafe/countriesMock.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
{
"RestResponse": {
"result": [
{ "alpha2_code": "US", "name": "Unated States" },
{ "alpha2_code": "CU", "name": "Cuba" },
{ "alpha2_code": "RO","name":"Romania" }
{
"alpha2_code": "US",
"name": "United States"
},
{
"alpha2_code": "CU",
"name": "Cuba"
},
{
"alpha2_code": "RO",
"name": "Romania"
}
]
}
}
9 changes: 7 additions & 2 deletions testCafe/questions/dropdownRestfull.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,15 @@ frameworks.forEach(framework => {
);
test("Carry forward for choicesByUrl", async t => {
const questionDropdownSelect = Selector(".sv_q_dropdown_control");
await setData({ q1: ["United States", "Romania"], q2: "Romania" });
const popupContainer = Selector(".sv-popup__container").filterVisible();

await setData({ q1: ["United States", "Romania"] });
await t
.wait(1000)
.click(questionDropdownSelect)
.expect(popupContainer.visible).notOk()

.click(questionDropdownSelect.nth(1))
.expect(popupContainer.visible).ok()
.expect(getListItemByText("Romania").exists).ok()
.click("input[value=Complete]");

Expand Down

0 comments on commit a1d96eb

Please sign in to comment.