Skip to content

Commit

Permalink
work for the #6164 (markup tests)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitry-kurmanov committed May 17, 2023
1 parent d4b870e commit 134845a
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 1 deletion.
26 changes: 25 additions & 1 deletion tests/markup/etalon_dropdown.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { _setIsTouch } from "survey-core";
import { _setIsTouch, Question } from "survey-core";
import { registerMarkupTests } from "./helper";

registerMarkupTests(
Expand Down Expand Up @@ -311,5 +311,29 @@ registerMarkupTests(
timeout: 300,
snapshot: "dropdown-input-string",
},
{
name: "Test dropdown aria-expanded",
json: {
questions: [
{
"type": "dropdown",
"name": "name",
"title": "Question title",
"choices": [
"item1",
"item2",
"item3"
],
titleLocation: "hidden"
}
]
},
before: () => { Question["questionCounter"] = 100; },
initSurvey: (survey) => {
const dropdown = survey.getQuestionByName("name");
dropdown.popupModel.isVisible = true;
},
snapshot: "dropdown-aria-expanded"
}
]
);
19 changes: 19 additions & 0 deletions tests/markup/snapshots/dropdown-aria-expanded.snap.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<div>
<div class="sv_select_wrapper">
<div aria-controls="testid0i_list" aria-expanded="true" aria-invalid="false" aria-label="Question title" aria-required="false" class="sv_q_dropdown_control" id="testid0i" role="combobox">
<div class="sv_q_dropdown__value">
<input aria-controls="testid0i_list" aria-expanded="true" aria-label="Select..." autocomplete="off" class="sv_q_dropdown__filter-string-input" id="testid0i_0" inputmode="text" placeholder="Select..." role="combobox" type="text">
</div>
<div class="sv_q_dropdown_clean-button" style="display:none;">
<svg aria-label="Clear" class="sv_q_dropdown_clean-button-svg sv-svg-icon" role="img">
<use xlink:href="#icon-clear_16x16" class="">
</use>
<title class="">Clear</title>
</svg>
</div>
</div>
<div>
</div>
</div>
</div>

0 comments on commit 134845a

Please sign in to comment.