VulpesOS/gaia/apps/gallery/test/marionette/empty_image_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

45 lines
1.2 KiB
JavaScript
Executable file

'use strict';
var Gallery = require('./lib/gallery.js'),
assert = require('assert');
marionette('run gallery without any files', function() {
var app, client;
client = marionette.client({
profile: {
prefs: {
'device.storage.enabled': true,
'device.storage.testing': true,
'device.storage.prompt.testing': true,
}
}
});
setup(function() {
// Remove all files in temp device storage.
client.fileManager.removeAllFiles();
app = new Gallery(client);
app.launch(true);
});
test('should display empty media message', function() {
// Wait for the overlay with 'Use the Camera app to get started' message.
var overlayView = app.overlayView;
var overlayTitle = app.overlayTitle;
var overlayText = app.overlayText;
var cameraButton = app.cameraButton;
client.helper.waitForElement(overlayView);
assert.ok(overlayView.displayed());
assert.ok(overlayTitle.displayed());
assert.ok(overlayTitle.text() == 'No photos or videos');
assert.ok(overlayText.displayed());
assert.ok(overlayText.text() == 'Use the Camera app to get started.');
assert.ok(cameraButton.displayed());
assert.ok(cameraButton.text() == 'Go to Camera');
});
});