Skip to content

Commit 5ff3d96

Browse files
committed
test(hosted): satisfy approval panel lint
1 parent ccc688e commit 5ff3d96

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

src/renderer/hosted/HostedProductionOperatorPanel.test.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ const READY: HostedReadinessProjection = Object.freeze({
103103
actions: Object.freeze([]),
104104
});
105105

106-
function controlState(runId: typeof RUN_A | typeof RUN_B) {
106+
function controlState(runId: typeof RUN_A) {
107107
return Object.freeze({
108108
schemaVersion: HOSTED_LIFECYCLE_COMMAND_SCHEMA_VERSION,
109109
kind: 'control_state' as const,
@@ -363,7 +363,9 @@ describe('HostedProductionOperatorPanel approval wiring', () => {
363363
);
364364

365365
await act(async () => {
366-
rendered.host.querySelector<HTMLButtonElement>('[aria-label="Allow: Secure request"]')?.click();
366+
rendered.host
367+
.querySelector<HTMLButtonElement>('[aria-label="Allow: Secure request"]')
368+
?.click();
367369
await flushReact();
368370
});
369371

@@ -392,7 +394,10 @@ describe('HostedProductionOperatorPanel approval wiring', () => {
392394
const rendered = renderPanel(() => CSRF_TOKEN);
393395
roots.push(rendered.root);
394396
await waitFor(() => testState.approvalSlices.length === 1);
395-
const firstSlice = testState.approvalSlices[0]!;
397+
const firstSlice = testState.approvalSlices[0];
398+
if (!firstSlice) {
399+
throw new Error('Expected the approval slice to be mounted');
400+
}
396401
expect(firstSlice.getSnapshot().mounted).toBe(true);
397402

398403
await act(async () => {

0 commit comments

Comments
 (0)