mirror of
https://github.com/hensm/fx_cast.git
synced 2026-06-12 10:39:57 +00:00
Execute tests within browser page context
This commit is contained in:
@@ -1,40 +1,17 @@
|
||||
"use strict";
|
||||
|
||||
const { create } = require("../../../driver");
|
||||
|
||||
describe("chrome.cast.DialRequest", () => {
|
||||
let driver;
|
||||
|
||||
beforeAll(async () => {
|
||||
driver = await create();
|
||||
});
|
||||
afterAll(() => {
|
||||
driver.quit();
|
||||
})
|
||||
|
||||
|
||||
it("should have all properties", async () => {
|
||||
const [ typeof_appName
|
||||
, dialRequest ] = await driver.executeScript(() => {
|
||||
const dialRequest = new chrome.cast.DialRequest();
|
||||
|
||||
const dialRequest = new chrome.cast.DialRequest();
|
||||
|
||||
return [
|
||||
typeof dialRequest.appName
|
||||
, dialRequest
|
||||
];
|
||||
});
|
||||
|
||||
expect(typeof_appName).toBe("undefined");
|
||||
expect(typeof dialRequest.appName).toBe("undefined");
|
||||
expect(dialRequest.launchParameter).toBe(null);
|
||||
});
|
||||
|
||||
it("should have expected assigned properties", async () => {
|
||||
const dialRequest = await driver.executeScript(() => {
|
||||
return new chrome.cast.DialRequest(
|
||||
"testAppName"
|
||||
, "testLaunchParameter");
|
||||
});
|
||||
const dialRequest = new chrome.cast.DialRequest(
|
||||
"testAppName"
|
||||
, "testLaunchParameter");
|
||||
|
||||
expect(dialRequest.appName).toBe("testAppName");
|
||||
expect(dialRequest.launchParameter).toBe("testLaunchParameter");
|
||||
|
||||
Reference in New Issue
Block a user