blob: 45e4764c32d2c795a3c30ac31a3d236b41cb9c5a (
plain)
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
|
/* global describe it cy require afterEach beforeEach*/
var helper = require('../../common/helper');
var impressHelper = require('../../common/impress_helper');
describe('Slide operations', function() {
var testFileName = 'slide_operations.odp';
beforeEach(function() {
helper.beforeAll(testFileName, 'impress');
});
afterEach(function() {
helper.afterAll(testFileName, this.currentTest.state);
});
it('Add slides', function() {
cy.get('#tb_presentation-toolbar_item_insertpage')
.should('not.have.class', 'disabled')
.click();
impressHelper.assertNumberOfSlidePreviews(2);
});
it('Remove slides', function() {
// Add slides
cy.get('#tb_presentation-toolbar_item_insertpage')
.should('not.have.class', 'disabled')
.click();
impressHelper.assertNumberOfSlidePreviews(2);
// Remove Slides
cy.get('#tb_presentation-toolbar_item_deletepage')
.should('not.have.class', 'disabled')
.click();
cy.get('.vex-dialog-button-primary').click();
cy.get('#tb_presentation-toolbar_item_deletepage')
.should('have.class', 'disabled');
impressHelper.assertNumberOfSlidePreviews(1);
});
it('Duplicate slide', function() {
cy.get('#tb_presentation-toolbar_item_duplicatepage')
.should('not.have.class', 'disabled')
.click();
impressHelper.assertNumberOfSlidePreviews(2);
});
});
|