对齐我的界面反馈入口

我的界面反馈与建议改为新页签打开飞书表格

隐藏旧站内反馈页面路由和渲染分支

补充反馈入口外链和旧路由隐藏测试
This commit is contained in:
2026-06-23 22:08:37 +08:00
parent fcd9470dcf
commit d693279d8a
4 changed files with 48 additions and 34 deletions
@@ -198,6 +198,7 @@ import {
AuthUiContext,
type PlatformSettingsSection,
} from '../auth/AuthUiContext';
import { FLOATING_FEEDBACK_FORM_URL } from '../common/floatingFeedbackEntryModel';
import { PLATFORM_DESKTOP_LAYOUT_QUERY } from '../platform-entry/platformEntryResponsive';
import {
getUnifiedCreationSpec,
@@ -9453,6 +9454,44 @@ test('creation home desktop rail hides recommend and discover entries', async ()
).toBeTruthy();
});
test('profile feedback shortcut opens Feishu form in a new tab', async () => {
const user = userEvent.setup();
const openWindow = vi
.spyOn(window, 'open')
.mockImplementation(() => null);
mockDesktopPlatformLayout();
window.history.replaceState(null, '', '/creation');
const { container } = render(<TestWrapper withAuth />);
await screen.findByRole('heading', {
name: '陶泥儿 - 开启全民精品游戏创作',
});
const nav = container.querySelector('.platform-desktop-rail');
expect(nav).toBeTruthy();
await user.click(
within(nav as HTMLElement).getByRole('button', { name: '我的' }),
);
const shortcutRegion = await screen.findByRole('region', {
name: '常用功能',
});
await user.click(
within(shortcutRegion).getByRole('button', { name: /反馈与建议/u }),
);
expect(openWindow).toHaveBeenCalledWith(
FLOATING_FEEDBACK_FORM_URL,
'_blank',
'noopener,noreferrer',
);
expect(screen.queryByText('反馈与投诉')).toBeNull();
expect(window.location.pathname).not.toBe('/profile/feedback');
expect(resolveSelectionStageFromPath(window.location.pathname)).toBe(
'platform',
);
});
test('project page keeps desktop rail with recommend and discover hidden', async () => {
mockDesktopPlatformLayout();
window.history.replaceState(null, '', '/project');