VulpesOS/gaia/apps/system/test/marionette/lib/fakeglobaloverlayapp_nopermissions.js
OverSu b38dea0597 Publish Vulpes Preview 15 sources for desktop, Android and Tundra
Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
2026-09-30 23:13:03 +02:00

42 lines
1,004 B
JavaScript
Executable file

/* global module */
'use strict';
function FakeGlobalOverlayAppNoPerms(client, origin) {
this.client = client;
this.origin = origin ||
('app://' + FakeGlobalOverlayAppNoPerms.DEFAULT_ORIGIN);
}
module.exports = FakeGlobalOverlayAppNoPerms;
FakeGlobalOverlayAppNoPerms.DEFAULT_ORIGIN =
'fakeglobaloverlayapp_noperms.gaiamobile.org';
FakeGlobalOverlayAppNoPerms.Selector = Object.freeze({
title : 'h3'
});
FakeGlobalOverlayAppNoPerms.prototype = {
client: null,
get title() {
return this.client.findElement(FakeGlobalOverlayAppNoPerms.Selector.title);
},
launch: function() {
this.client.switchToFrame();
this.client.apps.launch(this.origin);
this.client.apps.switchToApp(this.origin);
},
waitForTitleShown: function(shouldBeShown) {
this.client.waitFor(function() {
var shown = this.title.displayed();
return shown === shouldBeShown;
}.bind(this));
},
close: function() {
this.client.apps.close(this.origin);
}
};