dir-expect-localstorage

Action

Verifies localStorage persistence for testing. Directly queries localStorage to confirm values were persisted correctly.

Syntax

dir-expect-localstorage "keyname" exists

check if key exists in localStorage

dir-expect-localstorage "keyname" not exists

check if key does not exist in localStorage

dir-expect-localstorage "keyname" equals "expected"

check if localStorage value equals text

dir-expect-localstorage "keyname" contains "substring"

check if localStorage value contains substring

dir-expect-localstorage prefix "rh-" count 5

check if number of keys with prefix equals count

dir-expect-localstorage prefix "rh-" count-gte 3

check if at least N keys exist with prefix

dir-expect-localstorage empty

check if localStorage has no keys

dir-expect-localstorage var "$varname" exists

check if app-scoped variable exists in localStorage

dir-expect-localstorage var "$varname" not exists

check if app-scoped variable does not exist in localStorage

dir-expect-localstorage var "$varname" equals "expected"

check if app-scoped variable value equals text

Developer Reference
Set: unittest
Version: 0.0.0-8
Encoding: T_OP_S8
Actcode: 4060053294
Set ID: 112