Files
playlet-piped/integration-tests/play-video.ts
T
2025-01-16 13:41:08 -05:00

25 lines
676 B
TypeScript

// integration test to play a video on the Roku device
// 1. Run dev channel on the Roku device (Playlet (dev))
// 2. npm run restart-app && npm run test:integration
import { ecp, odc } from 'roku-test-automation';
import { setupEnvironment } from './common';
import { Key } from 'roku-test-automation/client/dist/ECP';
setupEnvironment();
(async () => {
await ecp.sendInput({ params: { contentId: "jNQXAC9IVRw" } });
await odc.onFieldChangeOnce({
base: "scene",
keyPath: "#VideoQueue.player.state",
match: "playing",
});
console.log("Video started playing");
await ecp.sendKeypress(Key.Back);
await odc.shutdown();
})();