dfa13bfe62
Replace beforeAll in most tests with new helper function Tests that need to close or reopen test files cannot use the new function and will be updated later Signed-off-by: Neil Guertin <neil.guertin@collabora.com> Change-Id: I372280e55993123fc26f83cb2e6e6e78665a6846
42 lines
1.2 KiB
JavaScript
42 lines
1.2 KiB
JavaScript
/* global describe it cy require beforeEach*/
|
|
|
|
var helper = require('../../common/helper');
|
|
var impressHelper = require('../../common/impress_helper');
|
|
var mobileHelper = require('../../common/mobile_helper');
|
|
|
|
describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Slide operations', function() {
|
|
|
|
beforeEach(function() {
|
|
helper.setupAndLoadDocument('impress/slide_operations.odp');
|
|
|
|
mobileHelper.enableEditingMobile();
|
|
});
|
|
|
|
it('Add slides', function() {
|
|
cy.cGet('.leaflet-control-zoom-in').click();
|
|
|
|
impressHelper.assertNumberOfSlidePreviews(2);
|
|
});
|
|
|
|
it('Remove Slides', function() {
|
|
//add slides
|
|
cy.cGet('.leaflet-control-zoom-in').click();
|
|
impressHelper.assertNumberOfSlidePreviews(2);
|
|
//remove slides
|
|
mobileHelper.openHamburgerMenu();
|
|
cy.cGet('.menu-entry-icon.slidemenu').parent().click();
|
|
cy.cGet('.menu-entry-icon.deletepage').parent().click();
|
|
cy.cGet('#deleteslide-modal-response').click();
|
|
impressHelper.assertNumberOfSlidePreviews(1);
|
|
});
|
|
|
|
it('Duplicate Slide', function() {
|
|
mobileHelper.openHamburgerMenu();
|
|
|
|
cy.cGet('.menu-entry-icon.slidemenu').parent().click();
|
|
cy.cGet('.menu-entry-icon.duplicatepage').parent().click();
|
|
|
|
impressHelper.assertNumberOfSlidePreviews(2);
|
|
});
|
|
|
|
});
|