Close gaps in off-queue DX 49/54/55.
Pass -c through to dotnet run so Release stamp and process match, assert changelog order for more than one commit, and restore the last school tab from sessionStorage when opening from the menu. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -7,6 +7,7 @@ import { getLocale, setLocale } from '../i18n/locale.ts';
|
||||
import { t } from '../i18n/strings.ts';
|
||||
import { GameScreen } from './gameScreen.ts';
|
||||
import type { School } from '../net/api.ts';
|
||||
import { patchChrome } from './viewState.ts';
|
||||
|
||||
vi.mock('../net/api.ts', async (importOriginal) => {
|
||||
const actual = await importOriginal<typeof import('../net/api.ts')>();
|
||||
@@ -272,6 +273,25 @@ describe('GameScreen view restore', () => {
|
||||
expect(screen.element.querySelector('.panel__body--fill')?.hasAttribute('hidden')).toBe(false);
|
||||
});
|
||||
|
||||
it('reopens the last tab from sessionStorage when opening from the menu', () => {
|
||||
history.replaceState(null, '', '/');
|
||||
patchChrome(1, { route: { tab: 'people' } });
|
||||
const screen = new GameScreen({
|
||||
onLeave: () => {},
|
||||
onSetRunning: () => {},
|
||||
onSetSpeed: () => {},
|
||||
onSkip: () => {},
|
||||
});
|
||||
document.body.append(screen.element);
|
||||
screen.show(school());
|
||||
|
||||
const peopleTab = [...screen.element.querySelectorAll('.panel__tab')].find(
|
||||
(button) => button.textContent === t('peopleTitle'),
|
||||
);
|
||||
expect(peopleTab?.classList.contains('panel__tab--active')).toBe(true);
|
||||
expect(location.search).toContain('tab=people');
|
||||
});
|
||||
|
||||
it('keeps a guest on overview even when the URL asks for manage', () => {
|
||||
history.replaceState(null, '', '/?school=3&mode=manage');
|
||||
const screen = new GameScreen({
|
||||
|
||||
Reference in New Issue
Block a user