补强静态发布安全边界
This commit is contained in:
@@ -4,7 +4,7 @@ import path from 'node:path';
|
||||
import { closeElectronApp, expect, getStableWindow, test } from './fixtures/electron';
|
||||
|
||||
test.describe('Project-level Superpowers setting', () => {
|
||||
test('starts new projects with Superpowers disabled', async ({ launchElectronApp }) => {
|
||||
test('starts publishable projects with Superpowers disabled and only the one-click release entry', async ({ launchElectronApp }) => {
|
||||
const parentPath = await mkdtemp(path.join(tmpdir(), 'niancode-superpowers-e2e-'));
|
||||
const app = await launchElectronApp({ skipSetup: true });
|
||||
|
||||
@@ -36,7 +36,9 @@ test.describe('Project-level Superpowers setting', () => {
|
||||
await expect(page.getByText('已关闭')).toBeVisible();
|
||||
await page.getByRole('button', { name: '关闭' }).click();
|
||||
await expect(page.getByTestId('resource-card-publish')).toHaveCount(0);
|
||||
await expect(page.getByRole('button', { name: '一键提交审核' })).toBeVisible();
|
||||
await expect(page.getByRole('button', { name: '一键提交审核' })).toHaveCount(1);
|
||||
await expect(page.getByText('自动部署', { exact: false })).toHaveCount(0);
|
||||
await expect(page.getByText('部署发布检查', { exact: false })).toHaveCount(0);
|
||||
} finally {
|
||||
await closeElectronApp(app);
|
||||
await rm(parentPath, { recursive: true, force: true });
|
||||
|
||||
Reference in New Issue
Block a user