mirror of
https://github.com/priyanshujain/sanderling.git
synced 2026-10-02 11:07:10 +00:00
test(chrome): resolve the secure selector on both matchers
the fixture covers the password entry, the three shapes of editable field that are not one, and a checkbox that is no field at all.
This commit is contained in:
1 parent
b0895ef179
commit
6aecccd2d6
2 files changed
+31
No files matched your search
@@ -129,6 +129,26 @@ func TestSelectors_ResolveTheSameElementsAsTheWebRuntime(t *testing.T) {
|
|||||||
object: objectSelector("tag", "a"),
|
object: objectSelector("tag", "a"),
|
||||||
want: []string{"todo_link"},
|
want: []string{"todo_link"},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
// secure names no attribute the markup writes: both producers derive
|
||||||
|
// it from the field's type. Matched as a raw attribute it reached
|
||||||
|
// nothing here while resolving fine against the dump, and `secure`
|
||||||
|
// being an accepted key meant no unknown-key error said so.
|
||||||
|
name: "secure",
|
||||||
|
selector: "secure:true",
|
||||||
|
object: objectSelector("secure", "true"),
|
||||||
|
want: []string{"login_password"},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
// false is every editable field that is not a password entry, not
|
||||||
|
// everything that is not one: a control that is no field at all
|
||||||
|
// reports null, the way android reports null for everything, and
|
||||||
|
// answers to neither value.
|
||||||
|
name: "not secure",
|
||||||
|
selector: "secure:false",
|
||||||
|
object: objectSelector("secure", "false"),
|
||||||
|
want: []string{"login_email", "login_note", "login_terms"},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
// The root element answers a selector like any other: the string
|
// The root element answers a selector like any other: the string
|
||||||
// form scans from the root down, and the object form used to start
|
// form scans from the root down, and the object form used to start
|
||||||
|
|||||||
@@ -16,6 +16,17 @@
|
|||||||
<div id="unsent_row"><span id="unsent_badge">3<!-- --> unsent</span></div>
|
<div id="unsent_row"><span id="unsent_badge">3<!-- --> unsent</span></div>
|
||||||
<div id="split_row">Sen<span id="split_tail">t here</span></div>
|
<div id="split_row">Sen<span id="split_tail">t here</span></div>
|
||||||
<div id="nested_row">Sent <span id="nested_badge">Sent</span></div>
|
<div id="nested_row">Sent <span id="nested_badge">Sent</span></div>
|
||||||
|
<!-- secure is derived from the field type, so the fields here have to cover
|
||||||
|
every state it answers with: the password entry, the three shapes of
|
||||||
|
editable field that are not one, and a control that is no field at all
|
||||||
|
and answers to neither value. -->
|
||||||
|
<form id="login_form">
|
||||||
|
<input id="login_email" type="email" aria-label="login_email" />
|
||||||
|
<input id="login_password" type="password" aria-label="login_password" />
|
||||||
|
<textarea id="login_note" aria-label="login_note"></textarea>
|
||||||
|
<div id="login_terms" contenteditable="true">terms</div>
|
||||||
|
<input id="login_remember" type="checkbox" aria-label="login_remember" />
|
||||||
|
</form>
|
||||||
<todo-app id="todo_app">
|
<todo-app id="todo_app">
|
||||||
<todo-list id="todo_list">
|
<todo-list id="todo_list">
|
||||||
<li id="todo_1">Buy milk</li>
|
<li id="todo_1">Buy milk</li>
|
||||||
|
|||||||
Reference in new issue
Block a user