test: hold the show collection's type, an unknown title's 404 and Brave's fullscreen stand-in
This commit is contained in:
@@ -678,6 +678,12 @@ describe("PlayerModal — the docked bar's fullscreen", () => {
|
||||
configurable: true,
|
||||
value: () => Promise.resolve(),
|
||||
});
|
||||
// Brave's stand-in otherwise: a <video>-only requestFullscreen on HTMLElement.prototype.
|
||||
else
|
||||
Object.defineProperty(HTMLElement.prototype, "requestFullscreen", {
|
||||
configurable: true,
|
||||
value: () => true,
|
||||
});
|
||||
vi.spyOn(api, "videoDetail").mockReturnValue(new Promise(() => {}));
|
||||
const A = vid("A", 0);
|
||||
renderModal(
|
||||
@@ -688,6 +694,7 @@ describe("PlayerModal — the docked bar's fullscreen", () => {
|
||||
};
|
||||
afterEach(() => {
|
||||
delete (Element.prototype as { requestFullscreen?: unknown }).requestFullscreen;
|
||||
delete (HTMLElement.prototype as { requestFullscreen?: unknown }).requestFullscreen;
|
||||
});
|
||||
|
||||
it("is offered where the browser can fullscreen an element", () => {
|
||||
|
||||
Reference in New Issue
Block a user