@svadmin/create 0.35.0 → 0.35.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,6 +5,11 @@ function visibleText(page: Page, text: string | RegExp) {
5
5
  return page.getByText(text, { exact: typeof text === 'string' }).filter({ visible: true });
6
6
  }
7
7
 
8
+ test.beforeEach(async ({ page }) => {
9
+ // 隔离外部字体服务,页面验收仅依赖本地应用和系统备用字体。
10
+ await page.route('https://fonts.bunny.net/**', route => route.abort());
11
+ });
12
+
8
13
  test('keyboard skip link does not cover navigation', async ({ page, isMobile }) => {
9
14
  await page.goto('/#/customers');
10
15
  const skip = page.locator('[data-svadmin-skip-link]');
@@ -117,6 +122,11 @@ test('read-only access allows detail but refuses edits', async ({ page }) => {
117
122
 
118
123
  for (const scenario of ['empty', 'error', 'denied', 'loading', 'partial']) {
119
124
  test(`provider state: ${scenario}`, async ({ page }, testInfo) => {
125
+ if (scenario === 'loading') {
126
+ // 在导航前暂停演示延迟,避免慢速加载错过骨架屏。
127
+ await page.clock.install({ time: new Date('2026-09-25T00:00:00Z') });
128
+ await page.clock.pauseAt(new Date('2026-09-25T00:01:00Z'));
129
+ }
120
130
  await page.goto(`/?scenario=${scenario}#${scenario === 'partial' ? '/' : '/customers'}`);
121
131
  if (scenario === 'loading') {
122
132
  await expect(page.locator('[data-slot="skeleton"]').filter({ visible: true }).first()).toBeVisible();
@@ -131,5 +141,10 @@ for (const scenario of ['empty', 'error', 'denied', 'loading', 'partial']) {
131
141
  await expect(page.getByText(/失败|不可用|错误/).first()).toBeVisible();
132
142
  }
133
143
  await page.screenshot({ path: testInfo.outputPath(`${scenario}.png`), fullPage: true, animations: 'disabled' });
144
+ if (scenario === 'loading') {
145
+ await page.clock.runFor(2500);
146
+ await expect(visibleText(page, '澄川科技')).toBeVisible();
147
+ await expect(page.locator('[data-slot="skeleton"]').filter({ visible: true })).toHaveCount(0);
148
+ }
134
149
  });
135
150
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@svadmin/create",
3
- "version": "0.35.0",
3
+ "version": "0.35.2",
4
4
  "description": "Scaffolding tool for svadmin projects",
5
5
  "type": "module",
6
6
  "bin": {
@@ -13,7 +13,7 @@
13
13
  "@svadmin/core": "^0.58.0",
14
14
  "@svadmin/app": "^0.2.1",
15
15
  "@svadmin/ai-elements": "^0.10.3",
16
- "@svadmin/ui": "^0.78.1",
16
+ "@svadmin/ui": "^0.78.2",
17
17
  "@sinclair/typebox": "^0.34.52",
18
18
  "@tanstack/svelte-query": "^6.1.48",
19
19
  "@lucide/svelte": "^1.35.0"