1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
/* global describe it cy require afterEach Cypress */
var helper = require('../../common/helper');
var mobileHelper = require('../../common/mobile_helper');
var nextcloudHelper = require('../../common/nextcloud_helper');
describe('Nextcloud specific tests.', function() {
var testFileName = 'nextcloud.odt';
afterEach(function() {
helper.afterAll(testFileName);
});
it('Insert image from storage.', function() {
helper.loadFileToNextCloud('image_to_insert.png', 'writer');
helper.beforeAll(testFileName, 'writer', undefined, true);
mobileHelper.enableEditingMobile();
nextcloudHelper.insertImageFromStorage('image_to_insert.png');
cy.get('.leaflet-pane.leaflet-overlay-pane svg g.Graphic')
.should('exist');
});
it('Save as.', function() {
helper.beforeAll(testFileName, 'writer');
mobileHelper.enableEditingMobile();
nextcloudHelper.saveFileAs('1' + testFileName);
// Close the document
cy.get('#mobile-edit-button')
.should('be.visible');
cy.get('#tb_actionbar_item_closemobile')
.then(function(item) {
cy.wrap(item)
.click();
Cypress.env('IFRAME_LEVEL', '');
});
cy.get('tr[data-file=\'1' + testFileName + '\']')
.should('be.visible');
cy.get('tr[data-file=\'' + testFileName + '\']')
.should('be.visible');
});
it('Share.', function() {
helper.beforeAll(testFileName, 'writer');
mobileHelper.enableEditingMobile();
nextcloudHelper.checkAndCloseSharing();
});
it('Revision history.', function() {
helper.beforeAll(testFileName, 'writer');
mobileHelper.enableEditingMobile();
nextcloudHelper.checkAndCloseRevisionHistory();
});
});
|