VulpesOS/gaia/apps/system/test/marionette/fullscreen_statusbar_test.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.2 KiB
JavaScript
Executable file

'use strict';
marionette('Fullscreen status bar >', function() {
var titlebar;
var VIDEO_APP = 'app://video.gaiamobile.org';
var assert = require('assert');
var client = marionette.client();
var actions, video, sys;
setup(function() {
actions = client.loader.getActions();
sys = client.loader.getAppClass('system');
video = sys.waitForLaunch(VIDEO_APP);
client.waitFor(function() {
titlebar = client.findElement('.appWindow.active .titlebar');
return titlebar;
});
var statusbarHeight = titlebar.size().height;
client.waitFor(function() {
return (titlebar.location().y <= (-1 * statusbarHeight));
});
});
test('Swiping from the top should open the statusbar', function() {
var top = sys.topPanel;
// When in fullscreen, #top-panel should handle the first swipe.
assert.equal(top.cssProperty('pointer-events'), 'all');
actions.flick(top, 100, 0, 100, 250, 250).perform();
client.waitFor(function() {
return (titlebar.location().y === 0);
});
// After the statusbar is shown, #top-panel should ignore future touches
// so that a second swipe from the top will open the utility tray.
assert.equal(top.cssProperty('pointer-events'), 'none');
});
});