test(js): cover confirm dispatch guard
Cover data-slhx-confirm as a runtime convention boundary: confirmation happens before handler dispatch continues. req: convention/004
This commit is contained in:
@@ -9,6 +9,15 @@ fn runtime_posts_urlencoded_forms_by_default() {
|
|||||||
assert!(source.contains("application/x-www-form-urlencoded;charset=UTF-8"));
|
assert!(source.contains("application/x-www-form-urlencoded;charset=UTF-8"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn runtime_confirms_before_handler_dispatch() {
|
||||||
|
// req: convention/004
|
||||||
|
let source = slhx_js::RUNTIME_JS;
|
||||||
|
|
||||||
|
assert!(source.contains("el.getAttribute(\"data-slhx-confirm\") && !confirm(el.getAttribute(\"data-slhx-confirm\"))"));
|
||||||
|
assert!(source.contains("return;"));
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn runtime_fetches_with_same_origin_credentials() {
|
fn runtime_fetches_with_same_origin_credentials() {
|
||||||
// req: auth/005
|
// req: auth/005
|
||||||
|
|||||||
Reference in New Issue
Block a user