diff options
Diffstat (limited to 'viewer/tools/smoke/era-fallback.mjs')
| -rw-r--r-- | viewer/tools/smoke/era-fallback.mjs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/viewer/tools/smoke/era-fallback.mjs b/viewer/tools/smoke/era-fallback.mjs new file mode 100644 index 0000000..443c1c9 --- /dev/null +++ b/viewer/tools/smoke/era-fallback.mjs @@ -0,0 +1,7 @@ +// era-fallback.mjs — run with '#era=nope': an unknown era in the URL falls back to the default with a toast +export const steps = [ + { name: 'unknown era: the default era shows, a toast says so', wait: 3000, + expect: v => v.era === v.def && /unknown era/i.test(v.toast) && !/era=nope/.test(v.hash), + js: `const a = window.mapViewer; a.saveUrl(); + return { era: a.meta.era, def: a.meta.default_era, toast: document.getElementById('toast').textContent, hash: location.hash };` }, +]; |
