feat: add big fish runtime rules entry
This commit is contained in:
@@ -77,4 +77,23 @@ describe('BigFishRuntimeShell', () => {
|
||||
fireEvent.click(screen.getByRole('button', { name: '退出' }));
|
||||
expect(onBack).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
|
||||
test('opens and closes the runtime rule modal', () => {
|
||||
render(
|
||||
<BigFishRuntimeShell
|
||||
run={createRun('running')}
|
||||
onBack={() => {}}
|
||||
onSubmitInput={() => {}}
|
||||
/>,
|
||||
);
|
||||
|
||||
fireEvent.click(screen.getByRole('button', { name: '查看规则' }));
|
||||
|
||||
expect(screen.getByRole('dialog', { name: '玩法规则' })).toBeTruthy();
|
||||
expect(screen.getByText('低级或同级野生实体会被收编。')).toBeTruthy();
|
||||
|
||||
fireEvent.click(screen.getByRole('button', { name: '关闭' }));
|
||||
|
||||
expect(screen.queryByRole('dialog', { name: '玩法规则' })).toBeNull();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user