blob: 56681f8f87b794c62b3db95c10e99026430a4376 (
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
|
/* global describe it cy require afterEach beforeEach */
var helper = require('../../common/helper');
var desktopHelper = require('../../common/desktop_helper');
describe('Delete Objects', function() {
var origTestFileName = 'delete_objects.odp';
var testFileName;
beforeEach(function() {
testFileName = helper.beforeAll(origTestFileName, 'impress');
});
afterEach(function() {
helper.afterAll(testFileName, this.currentTest.state);
});
it('Delete Text', function() {
cy.get('.leaflet-layer')
.dblclick('center');
cy.wait(1000);
cy.get('.leaflet-pane.leaflet-overlay-pane svg g')
.should('exist');
helper.typeIntoDocument('text');
helper.selectAllText();
helper.expectTextForClipboard('text');
helper.typeIntoDocument('{del}');
helper.typeIntoDocument('{ctrl}a');
helper.textSelectionShouldNotExist();
});
it('Delete Shapes', function() {
cy.get('#toolbar-up > .w2ui-scroll-right').click();
//insert
cy.get('#tb_editbar_item_insertshapes')
.click()
.get('.col.w2ui-icon.symbolshapes')
.click();
cy.get('.leaflet-control-buttons-disabled path.leaflet-interactive')
.should('exist');
//delete
helper.typeIntoDocument('{del}');
cy.get('.leaflet-control-buttons-disabled path.leaflet-interactive')
.should('not.exist');
});
it('Delete Chart' , function() {
cy.get('#toolbar-up > .w2ui-scroll-right').click();
//insert
cy.get('#tb_editbar_item_insertobjectchart')
.click();
cy.get('.leaflet-control-buttons-disabled path.leaflet-interactive')
.should('exist');
//delete
helper.typeIntoDocument('{del}');
cy.get('.leaflet-control-buttons-disabled path.leaflet-interactive')
.should('not.exist');
});
it.skip('Delete Table',function() {
desktopHelper.selectZoomLevel('50');
cy.get('#menu-table')
.click()
.contains('Insert Table...')
.click();
cy.get('.lokdialog_canvas').click();
helper.typeIntoDocument('{shift}{enter}');
cy.wait(2000);
// Table is inserted with the markers shown
cy.get('.leaflet-marker-icon.table-column-resize-marker')
.should('exist');
cy.get('path.leaflet-interactive')
.rightclick({force:true});
cy.contains('.context-menu-item','Delete')
.click();
cy.wait(1000);
cy.get('.leaflet-marker-icon.table-column-resize-marker')
.should('not.exist');
});
it('Delete Fontwork', function() {
cy.get('#menu-insert')
.click()
.contains('a','Fontwork...')
.click();
cy.get('#ok')
.click();
cy.get('.leaflet-control-buttons-disabled path.leaflet-interactive')
.should('exist');
//delete
helper.typeIntoDocument('{del}');
cy.get('.leaflet-control-buttons-disabled path.leaflet-interactive')
.should('not.exist');
});
});
|