Skip to content

toetsE2E tests for TV apps

Write one test. Run it on web, Android TV / Fire TV and tvOS. Trust that it tests the same thing everywhere.

ts
import { test, expect, Key } from '@toets/test';

test('opens details from the first rail', async ({ app }) => {
  await app.launch();
  const card = app.getByTestId('rail-0-card-2');
  await app.focus.pressUntilFocused(Key.RIGHT, card);
  await expect(card).toBeFocused();
  await app.remote.press(Key.SELECT);
  await expect(app.getByTestId('details-screen')).toBeVisible();
});

Built on Playwright Test. Focus and the remote replace the pointer, matchers mean the same on every platform, and platform gaps are declared as capabilities instead of hidden. Pre-alpha.