mirror of
https://github.com/priyanshujain/sanderling.git
synced 2026-10-02 11:07:10 +00:00
docs: stop labelling current behaviour as legacy
Three of the five comments the audit found. always() accepts a predicate or a formula and both are live: the shipped default properties pass a predicate, the six example-spec properties pass a formula. String selectors are documented first-class beside object selectors in spec-language.md. "all" is the --platform flag's default value, not an older calling convention.
This commit is contained in:
1 parent
61bf82e43c
commit
4619eb8bfb
3 files changed
+8
-6
No files matched your search
@@ -24,8 +24,9 @@ type doctorCheck struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// doctorChecksFor returns the host-readiness checks for a target platform.
|
// doctorChecksFor returns the host-readiness checks for a target platform.
|
||||||
// "all" returns the union (deduped by name) so the legacy zero-arg `doctor`
|
// "all" returns the union (deduped by name), which is what `doctor` with no
|
||||||
// behaviour keeps surfacing every platform's prerequisites.
|
// platform does: it is the default, so it has to surface every platform's
|
||||||
|
// prerequisites.
|
||||||
func doctorChecksFor(platform string) []doctorCheck {
|
func doctorChecksFor(platform string) []doctorCheck {
|
||||||
switch platform {
|
switch platform {
|
||||||
case "web":
|
case "web":
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import (
|
|||||||
// `foo]:has(*),body[x="..."]` that would escape the intended match.
|
// `foo]:has(*),body[x="..."]` that would escape the intended match.
|
||||||
var attrNamePattern = regexp.MustCompile(`^[a-zA-Z][a-zA-Z0-9_-]*$`)
|
var attrNamePattern = regexp.MustCompile(`^[a-zA-Z][a-zA-Z0-9_-]*$`)
|
||||||
|
|
||||||
// TranslateStringSelector converts a legacy string selector ("id:foo",
|
// TranslateStringSelector converts a string selector ("id:foo",
|
||||||
// "descPrefix:bar") into a CSS selector or XPath expression usable from the
|
// "descPrefix:bar") into a CSS selector or XPath expression usable from the
|
||||||
// chrome driver's TapSelector fallback path. The boolean return is true when
|
// chrome driver's TapSelector fallback path. The boolean return is true when
|
||||||
// the result is XPath rather than CSS. Unknown prefixes pass through to a CSS
|
// the result is XPath rather than CSS. Unknown prefixes pass through to a CSS
|
||||||
|
|||||||
@@ -214,9 +214,10 @@ func (v *Verifier) checkNotExtracting(slot string) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// bindAlways accepts either a predicate function (legacy shape) or a formula
|
// bindAlways accepts either a predicate function or a formula handle, both
|
||||||
// handle (new shape). Both produce a formula handle tagged with
|
// current: the shipped default properties pass a predicate, and every property
|
||||||
// __sanderlingFormulaSpec.
|
// in the example specs passes a formula. Both produce a formula handle tagged
|
||||||
|
// with __sanderlingFormulaSpec.
|
||||||
func (v *Verifier) bindAlways(call goja.FunctionCall) goja.Value {
|
func (v *Verifier) bindAlways(call goja.FunctionCall) goja.Value {
|
||||||
if len(call.Arguments) != 1 {
|
if len(call.Arguments) != 1 {
|
||||||
panic(v.runtime.NewTypeError("always requires exactly one argument"))
|
panic(v.runtime.NewTypeError("always requires exactly one argument"))
|
||||||
|
|||||||
Reference in new issue
Block a user