Feat v0.7.3 extension shell migration (#57)
All checks were successful
CI/CD / detect-changes (push) Successful in 4s
CI/CD / test-runners (push) Has been skipped
CI/CD / test-frontend (push) Successful in 5s
CI/CD / test-go-pg (push) Successful in 2m51s
CI/CD / test-sqlite (push) Successful in 3m2s
CI/CD / build-and-deploy (push) Successful in 27s

Co-authored-by: Jeffrey Smith <jasafpro@gmail.com>
Co-committed-by: Jeffrey Smith <jasafpro@gmail.com>
This commit was merged in pull request #57.
This commit is contained in:
2026-04-02 13:07:59 +00:00
committed by xcaliber
parent d6c7b21713
commit 32e4d8725c
19 changed files with 204 additions and 63 deletions

View File

@@ -36,7 +36,8 @@
var modules = [
'notes-crud.js',
'folders.js',
'tags-search.js'
'tags-search.js',
'shell-topbar.js'
];
var loaded = 0;

View File

@@ -0,0 +1,31 @@
/**
* Notes Runner — notes/shell-topbar suite
*
* Validates the Notes surface uses the v0.7.0 shell topbar contract
* and does not render the legacy sw.shell.Topbar component.
*/
(function () {
'use strict';
sw.testing.suite('notes/shell-topbar', async function (s) {
s.test('surface JS does not reference legacy Topbar', async function (t) {
var base = window.__BASE__ || '';
var resp = await fetch(base + '/surfaces/notes/js/main.js');
t.assert.eq(resp.status, 200, 'fetched notes main.js');
var src = await resp.text();
var hasLegacy = src.indexOf('sw.shell.Topbar') !== -1;
t.assert.ok(!hasLegacy, 'no sw.shell.Topbar reference (uses shell topbar API)');
});
s.test('surface JS uses shell topbar API', async function (t) {
var base = window.__BASE__ || '';
var resp = await fetch(base + '/surfaces/notes/js/main.js');
var src = await resp.text();
var usesAPI = src.indexOf('sw.shell.topbar.setTitle') !== -1
|| src.indexOf('sw.shell.topbar.setSlot') !== -1;
t.assert.ok(usesAPI, 'uses sw.shell.topbar.setTitle or setSlot');
});
});
})();