summaryrefslogtreecommitdiffstats
path: root/cypress_test/integration_tests/desktop
diff options
context:
space:
mode:
authorGökay Şatır <gokaysatir@gmail.com>2023-08-10 15:45:29 +0300
committerGökay ŞATIR <gokaysatir@gmail.com>2023-08-14 14:24:46 +0300
commit7d084e40cbe2722995ded0edfc68d885abd2f87a (patch)
tree363480fff41e218ebab458714033f2e0d741df0b /cypress_test/integration_tests/desktop
parentMove all accessibility definitions from notebookbaraccessibilitydefinitions i... (diff)
downloadonline-7d084e40cbe2722995ded0edfc68d885abd2f87a.tar.gz
online-7d084e40cbe2722995ded0edfc68d885abd2f87a.zip
Update cypress tests.
Signed-off-by: Gökay Şatır <gokaysatir@gmail.com> Change-Id: I1c60f89d6ab68e4a61861d77383010dd7f22480a
Diffstat (limited to 'cypress_test/integration_tests/desktop')
-rw-r--r--cypress_test/integration_tests/desktop/impress/table_operation_spec.js24
-rw-r--r--cypress_test/integration_tests/desktop/writer/annotation_spec.js20
-rw-r--r--cypress_test/integration_tests/desktop/writer/file_properties_spec.js6
-rw-r--r--cypress_test/integration_tests/desktop/writer/top_toolbar_spec.js38
4 files changed, 42 insertions, 46 deletions
diff --git a/cypress_test/integration_tests/desktop/impress/table_operation_spec.js b/cypress_test/integration_tests/desktop/impress/table_operation_spec.js
index 67dafd1c20..db48d78e0a 100644
--- a/cypress_test/integration_tests/desktop/impress/table_operation_spec.js
+++ b/cypress_test/integration_tests/desktop/impress/table_operation_spec.js
@@ -46,7 +46,7 @@ describe(['tagdesktop'], 'Table operations', function() {
it('Insert Row Before', function() {
desktopHelper.switchUIToNotebookbar();
selectFullTable();
- selectOptionNotebookbar('#InsertRowsBefore');
+ selectOptionNotebookbar('[id$=InsertRowsBefore]');
cy.cGet('.leaflet-marker-icon.table-row-resize-marker').should('have.length', 4);
retriggerNewSvgForTableInTheCenter();
cy.cGet('.leaflet-pane.leaflet-overlay-pane g.Page g').should('have.class', 'com.sun.star.drawing.TableShape');
@@ -68,7 +68,7 @@ describe(['tagdesktop'], 'Table operations', function() {
it('Insert Row After', function() {
desktopHelper.switchUIToNotebookbar();
selectFullTable();
- selectOptionNotebookbar('#InsertRowsAfter');
+ selectOptionNotebookbar('[id$=InsertRowsAfter]');
cy.cGet('.leaflet-marker-icon.table-row-resize-marker').should('have.length', 4);
retriggerNewSvgForTableInTheCenter();
@@ -92,7 +92,7 @@ describe(['tagdesktop'], 'Table operations', function() {
it('Insert column before.', function() {
desktopHelper.switchUIToNotebookbar();
selectFullTable();
- selectOptionNotebookbar('#InsertColumnsBefore');
+ selectOptionNotebookbar('[id$=InsertColumnsBefore]');
cy.cGet('.leaflet-marker-icon.table-column-resize-marker')
.should('have.length', 3);
@@ -118,7 +118,7 @@ describe(['tagdesktop'], 'Table operations', function() {
it('Insert column after.', function() {
desktopHelper.switchUIToNotebookbar();
selectFullTable();
- selectOptionNotebookbar('#InsertColumnsAfter');
+ selectOptionNotebookbar('[id$=InsertColumnsAfter]');
cy.cGet('.leaflet-marker-icon.table-column-resize-marker')
.should('have.length', 3);
@@ -144,7 +144,7 @@ describe(['tagdesktop'], 'Table operations', function() {
it('Delete row.', function() {
desktopHelper.switchUIToNotebookbar();
selectFullTable();
- selectOptionNotebookbar('#DeleteRows');
+ selectOptionNotebookbar('[id$=DeleteRows]');
cy.cGet('.leaflet-marker-icon.table-row-resize-marker')
.should('have.length', 2);
@@ -167,12 +167,12 @@ describe(['tagdesktop'], 'Table operations', function() {
it('Delete Column.', function() {
desktopHelper.switchUIToNotebookbar();
selectFullTable();
- selectOptionNotebookbar('#InsertColumnsBefore');
+ selectOptionNotebookbar('[id$=InsertColumnsBefore]');
cy.cGet('.leaflet-marker-icon.table-column-resize-marker')
.should('have.length', 3);
- selectOptionNotebookbar('#DeleteColumns');
+ selectOptionNotebookbar('[id$=DeleteColumns]');
cy.cGet('.leaflet-marker-icon.table-column-resize-marker')
.should('have.length', 2);
@@ -198,7 +198,7 @@ describe(['tagdesktop'], 'Table operations', function() {
it('Delete Table', function() {
desktopHelper.switchUIToNotebookbar();
selectFullTable();
- selectOptionNotebookbar('.cell.notebookbar #DeleteTable');
+ selectOptionNotebookbar('.cell.notebookbar [id$=DeleteTable]');
retriggerNewSvgForTableInTheCenter();
@@ -216,9 +216,9 @@ describe(['tagdesktop'], 'Table operations', function() {
cy.cGet('.leaflet-marker-icon.table-row-resize-marker')
.should('have.length', 3);
- selectOptionNotebookbar('#EntireRow');
+ selectOptionNotebookbar('[id$=EntireRow]');
cy.wait(1000);
- selectOptionNotebookbar('#MergeCells');
+ selectOptionNotebookbar('[id$=MergeCells]');
retriggerNewSvgForTableInTheCenter();
@@ -245,9 +245,9 @@ describe(['tagdesktop'], 'Table operations', function() {
cy.cGet('.leaflet-marker-icon.table-row-resize-marker')
.should('have.length', 3);
- selectOptionNotebookbar('#EntireColumn');
+ selectOptionNotebookbar('[id$=EntireColumn]');
cy.wait(1000);
- selectOptionNotebookbar('#MergeCells');
+ selectOptionNotebookbar('[id$=MergeCells]');
retriggerNewSvgForTableInTheCenter();
diff --git a/cypress_test/integration_tests/desktop/writer/annotation_spec.js b/cypress_test/integration_tests/desktop/writer/annotation_spec.js
index 2bf1124756..3edfc59bd6 100644
--- a/cypress_test/integration_tests/desktop/writer/annotation_spec.js
+++ b/cypress_test/integration_tests/desktop/writer/annotation_spec.js
@@ -12,7 +12,7 @@ describe(['tagdesktop'], 'Annotation Tests', function() {
cy.viewport(1400, 600);
testFileName = helper.beforeAll(origTestFileName, 'writer');
desktopHelper.switchUIToNotebookbar();
- cy.cGet('#optionscontainer div[id^="SidebarDeck.PropertyDeck"]').click(); // Hide sidebar.
+ cy.cGet('#optionscontainer div[id$="SidebarDeck.PropertyDeck"]').click(); // Hide sidebar.
selectZoomLevel('50');
});
@@ -21,14 +21,14 @@ describe(['tagdesktop'], 'Annotation Tests', function() {
});
it('Insert', function() {
- insertMultipleComment('writer', 1, false, '[id=InsertAnnotation1]');
+ insertMultipleComment('writer', 1, false, '[id=insert-insert-annotation]');
cy.cGet('.cool-annotation-content-wrapper').should('exist');
cy.cGet('#annotation-content-area-1').should('contain','some text0');
});
it('Modify', function() {
- insertMultipleComment('writer', 1, false, '[id=InsertAnnotation1]');
+ insertMultipleComment('writer', 1, false, '[id=insert-insert-annotation]');
cy.cGet('.cool-annotation-content-wrapper').should('exist');
cy.cGet('#annotation-content-area-1').should('contain','some text0');
@@ -41,7 +41,7 @@ describe(['tagdesktop'], 'Annotation Tests', function() {
});
it('Reply', function() {
- insertMultipleComment('writer', 1, false, '[id=InsertAnnotation1]');
+ insertMultipleComment('writer', 1, false, '[id=insert-insert-annotation]');
cy.cGet('.cool-annotation-content-wrapper').should('exist');
cy.cGet('#annotation-content-area-1').should('contain','some text');
@@ -53,7 +53,7 @@ describe(['tagdesktop'], 'Annotation Tests', function() {
});
it('Remove', function() {
- insertMultipleComment('writer', 1, false, '[id=InsertAnnotation1]');
+ insertMultipleComment('writer', 1, false, '[id=insert-insert-annotation]');
cy.cGet('.cool-annotation-content-wrapper').should('exist');
cy.cGet('.cool-annotation-content > div').should('contain','some text');
@@ -70,7 +70,7 @@ describe(['tagdesktop'], 'Collapsed Annotation Tests', function() {
beforeEach(function() {
helper.beforeAll(testFileName, 'writer');
desktopHelper.switchUIToNotebookbar();
- cy.cGet('#optionscontainer div[id^="SidebarDeck.PropertyDeck"]').click(); // Hide sidebar.
+ cy.cGet('#optionscontainer div[id$="SidebarDeck.PropertyDeck"]').click(); // Hide sidebar.
});
afterEach(function() {
@@ -78,14 +78,14 @@ describe(['tagdesktop'], 'Collapsed Annotation Tests', function() {
});
it('Insert', function() {
- insertMultipleComment('writer', 1, false, '[id=InsertAnnotation1]');
+ insertMultipleComment('writer', 1, false, '[id=insert-insert-annotation]');
cy.cGet('.cool-annotation-content-wrapper').should('exist');
cy.cGet('#annotation-content-area-1').should('contain','some text0');
});
it('Modify', function() {
- insertMultipleComment('writer', 1, false, '[id=InsertAnnotation1]');
+ insertMultipleComment('writer', 1, false, '[id=insert-insert-annotation]');
cy.cGet('.cool-annotation-content-wrapper').should('exist');
cy.cGet('#annotation-content-area-1').should('contain','some text0');
@@ -99,7 +99,7 @@ describe(['tagdesktop'], 'Collapsed Annotation Tests', function() {
});
it('Reply', function() {
- insertMultipleComment('writer', 1, false, '[id=InsertAnnotation1]');
+ insertMultipleComment('writer', 1, false, '[id=insert-insert-annotation]');
cy.cGet('.cool-annotation-content-wrapper').should('exist');
cy.cGet('#annotation-content-area-1').should('contain','some text');
@@ -112,7 +112,7 @@ describe(['tagdesktop'], 'Collapsed Annotation Tests', function() {
});
it('Remove', function() {
- insertMultipleComment('writer', 1, false, '[id=InsertAnnotation1]');
+ insertMultipleComment('writer', 1, false, '[id=insert-insert-annotation]');
cy.cGet('.cool-annotation-content-wrapper').should('exist');
cy.cGet('.cool-annotation-content > div').should('contain','some text');
diff --git a/cypress_test/integration_tests/desktop/writer/file_properties_spec.js b/cypress_test/integration_tests/desktop/writer/file_properties_spec.js
index 5b743de2a7..32d0666ead 100644
--- a/cypress_test/integration_tests/desktop/writer/file_properties_spec.js
+++ b/cypress_test/integration_tests/desktop/writer/file_properties_spec.js
@@ -10,7 +10,7 @@ describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'File Property Tests', func
beforeEach(function() {
testFileName = helper.beforeAll(origTestFileName, 'writer');
- desktopHelper.switchUIToCompact();
+ desktopHelper.switchUIToNotebookbar();
});
afterEach(function() {
@@ -19,7 +19,7 @@ describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'File Property Tests', func
it('Add File Description.', function() {
writerHelper.openFileProperties();
- cy.cGet('#description-tab-label').click();
+ cy.cGet('#tabcontrol #2').click();
helper.waitUntilIdle('#title.ui-edit');
cy.cGet('#title.ui-edit').type('New Title');
// sometimes it doesn't finish typing
@@ -38,7 +38,7 @@ describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'File Property Tests', func
cy.cGet('#ok.ui-pushbutton').click();
writerHelper.openFileProperties();
- cy.cGet('#description-tab-label').click();
+ cy.cGet('#tabcontrol #2').click();
cy.cGet('#title.ui-edit').should('have.value', 'New Title');
cy.cGet('#comments.ui-textarea').should('have.value', 'New');
diff --git a/cypress_test/integration_tests/desktop/writer/top_toolbar_spec.js b/cypress_test/integration_tests/desktop/writer/top_toolbar_spec.js
index 3f230d5ae2..5f4071c0bf 100644
--- a/cypress_test/integration_tests/desktop/writer/top_toolbar_spec.js
+++ b/cypress_test/integration_tests/desktop/writer/top_toolbar_spec.js
@@ -157,27 +157,27 @@ describe(['tagdesktop'], 'Top toolbar tests.', function() {
});
it('Toggle numbered list.', function() {
- desktopHelper.actionOnSelector('numberedList', (selector) => { cy.cGet(selector).click(); });
+ cy.cGet('#Home-container .unoDefaultNumbering').click();
writerHelper.selectAllTextOfDoc();
cy.cGet('#copy-paste-container ol').should('exist');
});
it('Toggle bulleted list.', function() {
- desktopHelper.actionOnSelector('bulletList', (selector) => { cy.cGet(selector).click(); });
+ cy.cGet('#Home-container .unoDefaultBullet').click();
writerHelper.selectAllTextOfDoc();
cy.cGet('#copy-paste-container ul').should('exist');
});
it('Increase/Decrease Indent.', function() {
//Increase indent
- desktopHelper.actionOnSelector('incrementIndent', (selector) => { cy.cGet(selector).click(); });
+ cy.cGet('#Home-container .unoIncrementIndent').click();
writerHelper.selectAllTextOfDoc();
cy.cGet('#copy-paste-container p')
.should('have.attr', 'style')
.should('contain', 'margin-left: 0.49in');
//Decrease indent
- desktopHelper.actionOnSelector('decrementIndent', (selector) => { cy.cGet(selector).click(); });
+ cy.cGet('#Home-container .unoDecrementIndent').click();
writerHelper.selectAllTextOfDoc();
cy.cGet('#copy-paste-container p')
.should('have.attr', 'style')
@@ -188,7 +188,7 @@ describe(['tagdesktop'], 'Top toolbar tests.', function() {
cy.cGet('#toolbar-up .w2ui-scroll-right').click();
cy.cGet('#toolbar-up .w2ui-scroll-right').click();
cy.wait(500);
- desktopHelper.actionOnSelector('insertTable', (selector) => { cy.cGet(selector).click(); });
+ cy.cGet('#Home-container .unoInsertTable').click();
cy.cGet('.inserttable-grid > .row > .col').eq(3).click();
helper.typeIntoDocument('{ctrl}a');
cy.cGet('#copy-paste-container table').should('exist');
@@ -200,7 +200,7 @@ describe(['tagdesktop'], 'Top toolbar tests.', function() {
it('Insert image.', function() {
cy.cGet('#toolbar-up .w2ui-scroll-right').click();
cy.cGet('#toolbar-up .w2ui-scroll-right').click();
- desktopHelper.actionOnSelector('insertGraphic', (selector) => { cy.cGet(selector).click(); });
+ cy.cGet('#Home-container .unoInsertGraphic').click();
cy.cGet('#insertgraphic[type=file]').attachFile('/desktop/writer/image_to_insert.png');
cy.cGet('.leaflet-pane.leaflet-overlay-pane svg g.Graphic').should('exist');
});
@@ -209,7 +209,7 @@ describe(['tagdesktop'], 'Top toolbar tests.', function() {
helper.expectTextForClipboard('text text1');
cy.cGet('#Insert-tab-label').click();
cy.cGet('#toolbar-up .w2ui-scroll-right').click();
- desktopHelper.actionOnSelector('hyperLink', (selector) => { cy.cGet(selector).click(); });
+ cy.cGet('#Insert-container .hyperlinkdialog').click();
cy.cGet('#hyperlink-link-box').should('exist');
cy.cGet('#hyperlink-text-box').type('link');
cy.cGet('#hyperlink-link-box').type('www.something.com');
@@ -223,7 +223,7 @@ describe(['tagdesktop'], 'Top toolbar tests.', function() {
cy.cGet('#Insert-tab-label').click();
cy.cGet('#toolbar-up .w2ui-scroll-right').click();
- desktopHelper.actionOnSelector('insertShape', (selector) => { cy.cGet(selector).click(); });
+ cy.cGet('#Insert-container .unoBasicShapes').click();
cy.cGet('.col.w2ui-icon.basicshapes_octagon').click();
cy.cGet('.leaflet-pane.leaflet-overlay-pane svg g').should('exist');
@@ -238,7 +238,7 @@ describe(['tagdesktop'], 'Top toolbar tests.', function() {
it('Insert/delete chart.', function() {
cy.cGet('#Insert-tab-label').click();
cy.cGet('#toolbar-up .w2ui-scroll-right').click();
- desktopHelper.actionOnSelector('insertChart', (selector) => { cy.cGet(selector).click(); });
+ cy.cGet('#Insert-container .unoInsertObjectChart').click();
cy.cGet('.leaflet-pane.leaflet-overlay-pane svg g').should('exist');
//delete
@@ -249,7 +249,7 @@ describe(['tagdesktop'], 'Top toolbar tests.', function() {
it('Save.', { defaultCommandTimeout: 60000 }, function() {
cy.cGet('.cell.notebookbar > .unoBold > button').click();
- desktopHelper.actionOnSelector('save', (selector) => { cy.cGet(selector).click(); });
+ cy.cGet('.notebookbar-shortcuts-bar .unoSave').click();
helper.reload(testFileName, 'writer', true);
cy.wait(2000);
writerHelper.selectAllTextOfDoc();
@@ -265,7 +265,7 @@ describe(['tagdesktop'], 'Top toolbar tests.', function() {
});
cy.cGet('#File-tab-label').click();
- desktopHelper.actionOnSelector('print', (selector) => { cy.cGet(selector).click(); });
+ cy.cGet('#File-container .unoPrint').click();
helper.getCoolFrameWindow()
.then(function(win) {
cy.wrap(win).its('open').should('be.called');
@@ -278,17 +278,13 @@ describe(['tagdesktop'], 'Top toolbar tests.', function() {
cy.cGet('#copy-paste-container p i').should('exist');
//Undo
- desktopHelper.actionOnSelector('undo', (selector) => {
- cy.cGet(selector).should('not.have.class', 'disabled').click();
- });
+ cy.cGet('#Home-container .unoUndo').click();
writerHelper.selectAllTextOfDoc();
cy.cGet('#copy-paste-container p i').should('not.exist');
//Redo
- desktopHelper.actionOnSelector('redo', (selector) => {
- cy.cGet(selector).should('not.have.class', 'disabled').click();
- });
+ cy.cGet('#Home-container .unoRedo').click();
writerHelper.selectAllTextOfDoc();
cy.cGet('#copy-paste-container p i').should('exist');
@@ -325,10 +321,10 @@ describe(['tagdesktop'], 'Top toolbar tests.', function() {
cy.cGet('#View-tab-label').click();
cy.cGet('#sidebar-dock-wrapper').should('be.visible');
// Hide.
- cy.cGet('[id="SidebarDeck.PropertyDeck"]').click();
+ cy.cGet('[id$="SidebarDeck.PropertyDeck"]').click();
cy.cGet('#sidebar-dock-wrapper').should('not.be.visible');
// Show.
- cy.cGet('[id="SidebarDeck.PropertyDeck"]').click();
+ cy.cGet('[id$="SidebarDeck.PropertyDeck"]').click();
cy.cGet('#sidebar-dock-wrapper').should('be.visible');
});
@@ -336,7 +332,7 @@ describe(['tagdesktop'], 'Top toolbar tests.', function() {
cy.cGet('#toolbar-up .w2ui-scroll-right').click();
cy.cGet('#toolbar-up .w2ui-scroll-right').click();
cy.wait(500);
- desktopHelper.actionOnSelector('insertSymbol', (selector) => { cy.cGet(selector).click(); });
+ cy.cGet('#Home-container .unospan-CharmapControl').click();
cy.cGet('.jsdialog-container.ui-dialog.ui-widget-content.lokdialog_container').should('be.visible');
cy.cGet('.ui-dialog-title').should('have.text', 'Special Characters');
helper.clickOnIdle('#favchar1');
@@ -433,7 +429,7 @@ describe(['tagdesktop'], 'Top toolbar tests.', function() {
writerHelper.selectAllTextOfDoc();
cy.cGet('#Insert-tab-label').click();
cy.cGet('#toolbar-up .w2ui-scroll-right').click();
- cy.cGet('#FontworkGalleryFloater').click();
+ cy.cGet('#Insert-container .unoFontworkGalleryFloater').click();
cy.cGet('#ok').click();
cy.cGet('.leaflet-control-buttons-disabled path.leaflet-interactive').should('exist');