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
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:
@@ -36,7 +36,8 @@
|
||||
var modules = [
|
||||
'notes-crud.js',
|
||||
'folders.js',
|
||||
'tags-search.js'
|
||||
'tags-search.js',
|
||||
'shell-topbar.js'
|
||||
];
|
||||
|
||||
var loaded = 0;
|
||||
|
||||
31
packages/notes-runner/js/shell-topbar.js
Normal file
31
packages/notes-runner/js/shell-topbar.js
Normal 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');
|
||||
});
|
||||
|
||||
});
|
||||
})();
|
||||
@@ -4,6 +4,6 @@
|
||||
"type": "test-runner",
|
||||
"title": "Notes Runner",
|
||||
"auth": "admin",
|
||||
"version": "0.1.0",
|
||||
"version": "0.2.0",
|
||||
"description": "Integration tests for Notes package — CRUD, folders, tags, backlinks, search."
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user