引导移动端创作主页使用桌面端
移动端直达 /creation 时展示桌面端打开引导 补充移动端创作主页回归测试 同步创作主页与玩法链路文档口径
This commit is contained in:
@@ -9267,13 +9267,22 @@ test('project page header can return to main site', async () => {
|
||||
expect(window.location.pathname).toBe('/');
|
||||
});
|
||||
|
||||
test('direct mobile creation home keeps landing content without mobile nav entry', async () => {
|
||||
test('direct mobile creation home guides users to desktop without mobile nav entry', async () => {
|
||||
const user = userEvent.setup();
|
||||
window.history.replaceState(null, '', '/creation');
|
||||
const { container } = render(<TestWrapper withAuth />);
|
||||
|
||||
expect(
|
||||
await screen.findByRole('main', { name: '陶泥儿创作主页' }),
|
||||
await screen.findByRole('main', { name: '桌面端创作提示' }),
|
||||
).toBeTruthy();
|
||||
expect(screen.getByText('请在桌面端打开创作主页')).toBeTruthy();
|
||||
expect(
|
||||
screen.getByText('图片画布、项目管理和素材库需要更大的操作空间。'),
|
||||
).toBeTruthy();
|
||||
expect(
|
||||
screen.queryByRole('main', { name: '陶泥儿创作主页' }),
|
||||
).toBeNull();
|
||||
|
||||
const bottomNav = container.querySelector('.platform-bottom-nav');
|
||||
expect(bottomNav).toBeTruthy();
|
||||
expect(
|
||||
@@ -9282,6 +9291,15 @@ test('direct mobile creation home keeps landing content without mobile nav entry
|
||||
expect(
|
||||
within(bottomNav as HTMLElement).queryByRole('button', { name: '项目' }),
|
||||
).toBeNull();
|
||||
|
||||
await user.click(screen.getByRole('button', { name: /返回首页/u }));
|
||||
|
||||
await waitFor(() => {
|
||||
expect(window.location.pathname).toBe('/');
|
||||
expect(
|
||||
screen.queryByRole('main', { name: '桌面端创作提示' }),
|
||||
).toBeNull();
|
||||
});
|
||||
});
|
||||
|
||||
test('embedded puzzle form timeout exits busy state and shows a readable error', async () => {
|
||||
|
||||
Reference in New Issue
Block a user