feat: release design system engine, studio and component contracts
This commit is contained in:
1 parent
ff1065fb27
commit
3943b946d6
693 files changed
+175546
-3894
No files matched your search
@@ -13,14 +13,22 @@ function fixture() {
|
||||
return { window, host: host as unknown as HTMLElement };
|
||||
}
|
||||
|
||||
test('hideName hides only the visual title and preserves the file identity',async()=>{
|
||||
const {window,host}=fixture();
|
||||
const dispose=mountViewer(host,{name:'report.txt',blob:new Blob(['hello'])},{hideName:true});
|
||||
await settled();
|
||||
expect(host.querySelector<HTMLElement>('[data-viewer-title]')?.hidden??host.querySelector<HTMLElement>('.wrn-viewer-toolbar span')?.hidden).toBe(true);
|
||||
expect(host.getAttribute('aria-label')).toBe('report.txt');
|
||||
expect(host.querySelector<HTMLAnchorElement>('a[download]')?.download).toBe('report.txt');
|
||||
dispose();window.close();
|
||||
test("hideName hides only the visual title and preserves the file identity", async () => {
|
||||
const { window, host } = fixture();
|
||||
const dispose = mountViewer(
|
||||
host,
|
||||
{ name: "report.txt", blob: new Blob(["hello"]) },
|
||||
{ hideName: true },
|
||||
);
|
||||
await settled();
|
||||
expect(
|
||||
host.querySelector<HTMLElement>("[data-viewer-title]")?.hidden ??
|
||||
host.querySelector<HTMLElement>(".wrn-viewer-toolbar span")?.hidden,
|
||||
).toBe(true);
|
||||
expect(host.getAttribute("aria-label")).toBe("report.txt");
|
||||
expect(host.querySelector<HTMLAnchorElement>("a[download]")?.download).toBe("report.txt");
|
||||
dispose();
|
||||
window.close();
|
||||
});
|
||||
test("image controls, failure fallback, and teardown", async () => {
|
||||
const { window, host } = fixture();
|
||||
|
||||
Reference in new issue
Block a user