diff options
author | Tamás Zolnai <tamas.zolnai@collabora.com> | 2021-02-25 16:11:43 +0100 |
---|---|---|
committer | Tamás Zolnai <zolnaitamas2000@gmail.com> | 2021-03-08 20:07:33 +0100 |
commit | bf2d98446d6a7b138e9a025286ea0e900260dc67 (patch) | |
tree | 0705ecfaf390178f022efd5a5bef38d8ddc97e41 /cypress_test | |
parent | cypress: use new zoom helper methods in form field tests. (diff) | |
download | online-bf2d98446d6a7b138e9a025286ea0e900260dc67.tar.gz online-bf2d98446d6a7b138e9a025286ea0e900260dc67.zip |
cypress: remove some old disabled tests.
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: I275d794bbb74e2fe8e1fd845061c0cb17f939c11
(cherry picked from commit fc574b49ef26a637c4f9be38dd8b92377c9a8d89)
Diffstat (limited to 'cypress_test')
13 files changed, 2 insertions, 540 deletions
diff --git a/cypress_test/integration_tests/common/nextcloud_helper.js b/cypress_test/integration_tests/common/nextcloud_helper.js index d905551544..2e82f88629 100644 --- a/cypress_test/integration_tests/common/nextcloud_helper.js +++ b/cypress_test/integration_tests/common/nextcloud_helper.js @@ -4,71 +4,6 @@ var mobileHelper = require('./mobile_helper'); -function openRevisionHistory() { - mobileHelper.selectHamburgerMenuItem(['File']); - - cy.contains('.menu-entry-with-icon', 'See revision history') - .then(function(item) { - Cypress.env('IFRAME_LEVEL', ''); - cy.wrap(item) - .click(); - }); - - cy.get('#app-sidebar-vue') - .should('be.visible'); - - cy.get('section#tab-versionsTabView') - .should('be.visible'); - -} - -function checkAndCloseRevisionHistory() { - openRevisionHistory(); - - cy.get('.app-sidebar__close.icon-close') - .then(function(item) { - Cypress.env('IFRAME_LEVEL', '1'); - cy.wrap(item) - .click(); - }); - - cy.wait(2000); - - cy.get('#revViewerContainer .icon-close') - .then(function(item) { - Cypress.env('IFRAME_LEVEL', '2'); - cy.wrap(item) - .click(); - }); -} - -function restorePreviousVersion() { - openRevisionHistory(); - - cy.get('#versionsTabView .versions li:nth-of-type(1) .revertVersion') - .click(); - - cy.wait(10000); - - cy.get('.app-sidebar__close.icon-close') - .then(function(item) { - Cypress.env('IFRAME_LEVEL', '1'); - cy.wrap(item) - .click(); - }); - - cy.wait(2000); - - cy.get('#revViewerContainer .icon-close') - .then(function(item) { - Cypress.env('IFRAME_LEVEL', '2'); - cy.wrap(item) - .click(); - }); - - cy.wait(2000); -} - // Open sharing sidebar of NC integration (mobile). // We check whether the NC sidebar is opened and then we // close it. @@ -160,8 +95,6 @@ function saveFileAs(fileName) { }); } -module.exports.checkAndCloseRevisionHistory = checkAndCloseRevisionHistory; module.exports.checkAndCloseSharing = checkAndCloseSharing; module.exports.insertImageFromStorage = insertImageFromStorage; module.exports.saveFileAs = saveFileAs; -module.exports.restorePreviousVersion = restorePreviousVersion; diff --git a/cypress_test/integration_tests/mobile/calc/alignment_options_spec.js b/cypress_test/integration_tests/mobile/calc/alignment_options_spec.js index e46b6c1691..4672495063 100644 --- a/cypress_test/integration_tests/mobile/calc/alignment_options_spec.js +++ b/cypress_test/integration_tests/mobile/calc/alignment_options_spec.js @@ -194,53 +194,6 @@ describe('Change alignment settings.', function() { }); }); - it.skip('Change text indent via input field.', function() { - // TODO: this fails, because the input field always becomes disabled. - helper.initAliasToNegative('originalTextEndPos'); - - getTextEndPosForFirstCell(); - cy.get('@currentTextEndPos') - .as('originalTextEndPos'); - - cy.get('@currentTextEndPos') - .should('be.greaterThan', 0); - - openAlignmentPaneForFirstCell(); - - // TODO: First we need to increase indent to make the input enabled - helper.clickOnIdle('#IncrementIndent'); - - cy.wait(300); - - helper.clickOnIdle('#IncrementIndent'); - - calcHelper.removeTextSelection(); - - openAlignmentPaneForFirstCell(); - - cy.get('#leftindent .spinfield') - .should('not.have.attr', 'disabled'); - - // Increase indent - cy.get('#leftindent .spinfield') - .clear() - .type('20{enter}'); - - // We use the text position as indicator - cy.get('body') - .should(function() { - getTextEndPosForFirstCell(); - - cy.get('@currentTextEndPos') - .then(function(currentTextEndPos) { - cy.get('@originalTextEndPos') - .then(function(originalTextEndPos) { - expect(originalTextEndPos).to.be.lessThan(currentTextEndPos); - }); - }); - }); - }); - it('Enable text wrapping.', function() { helper.initAliasToNegative('originalTextEndPos'); diff --git a/cypress_test/integration_tests/mobile/calc/hamburger_menu_spec.js b/cypress_test/integration_tests/mobile/calc/hamburger_menu_spec.js index fb7cf8749a..e9f7a876fe 100644 --- a/cypress_test/integration_tests/mobile/calc/hamburger_menu_spec.js +++ b/cypress_test/integration_tests/mobile/calc/hamburger_menu_spec.js @@ -595,50 +595,6 @@ describe('Trigger hamburger menu options.', function() { .should('exist'); }); - // FIXME temporarily disabled, does not work with CanvasTileLayer - it.skip('Automatic spell checking.', function() { - before('hamburger_menu.ods'); - - // Make everything white on tile - calcHelper.selectEntireSheet(false); - - mobileHelper.openMobileWizard(); - - helper.clickOnIdle('#ScCellAppearancePropertyPanel'); - - cy.contains('.menu-entry-with-icon', 'Background Color') - .should('be.visible'); - - helper.clickOnIdle('#border-12'); - - helper.clickOnIdle('#FrameLineColor'); - - mobileHelper.selectFromColorPalette(2, 0, 7); - - mobileHelper.closeMobileWizard(); - - mobileHelper.openTextPropertiesPanel(); - - helper.clickOnIdle('#Color'); - - mobileHelper.selectFromColorPalette(0, 0, 7); - - var firstTile = '.leaflet-tile-loaded[style=\'width: 256px; height: 256px; left: 0px; top: 5px;\']'; - var centerTile = '.leaflet-tile-loaded[style=\'width: 256px; height: 256px; left: 256px; top: 5px;\']'; - helper.imageShouldBeFullWhite(centerTile); - helper.imageShouldNotBeFullWhite(firstTile); - - // Disable automatic spell checking - mobileHelper.selectHamburgerMenuItem(['Automatic Spell Checking']); - - helper.imageShouldBeFullWhite(firstTile); - - // Enable automatic spell checking again - mobileHelper.selectHamburgerMenuItem(['Automatic Spell Checking']); - - helper.imageShouldNotBeFullWhite(firstTile); - }); - it('Check version information.', function() { before('hamburger_menu.ods'); diff --git a/cypress_test/integration_tests/mobile/calc/nextcloud_spec.js b/cypress_test/integration_tests/mobile/calc/nextcloud_spec.js index 2d04c040d5..43c938fa1e 100644 --- a/cypress_test/integration_tests/mobile/calc/nextcloud_spec.js +++ b/cypress_test/integration_tests/mobile/calc/nextcloud_spec.js @@ -2,7 +2,6 @@ var helper = require('../../common/helper'); var mobileHelper = require('../../common/mobile_helper'); -var calcHelper = require('../../common/calc_helper'); var nextcloudHelper = require('../../common/nextcloud_helper'); describe('Nextcloud specific tests.', function() { @@ -59,48 +58,5 @@ describe('Nextcloud specific tests.', function() { nextcloudHelper.checkAndCloseSharing(); }); - - it.skip('Revision history.', function() { - helper.beforeAll(testFileName, 'calc'); - - mobileHelper.enableEditingMobile(); - - nextcloudHelper.checkAndCloseRevisionHistory(); - }); - - it.skip('Restore previous revision.', function() { - helper.beforeAll(testFileName, 'calc'); - - mobileHelper.enableEditingMobile(); - - // Initially we have "text" text in the document - calcHelper.selectEntireSheet(); - - cy.get('#copy-paste-container table td') - .should('have.text', 'Text'); - - // Change the document content and save it - calcHelper.clickOnFirstCell(false, true); - - helper.selectAllText(); - - helper.typeIntoDocument('new'); - - calcHelper.selectEntireSheet(); - - cy.get('#copy-paste-container table td') - .should('have.text', 'new'); - - mobileHelper.selectHamburgerMenuItem(['File', 'Save']); - - nextcloudHelper.restorePreviousVersion(); - - mobileHelper.enableEditingMobile(); - - calcHelper.selectEntireSheet(); - - cy.get('#copy-paste-container table td') - .should('have.text', 'Text'); - }); }); diff --git a/cypress_test/integration_tests/mobile/calc/spellchecking_spec.js b/cypress_test/integration_tests/mobile/calc/spellchecking_spec.js index b35a9d64a7..cdde93e707 100644 --- a/cypress_test/integration_tests/mobile/calc/spellchecking_spec.js +++ b/cypress_test/integration_tests/mobile/calc/spellchecking_spec.js @@ -86,50 +86,4 @@ describe('Calc spell checking menu.', function() { cy.contains('.context-menu-link', 'Paste') .should('be.visible'); }); - - it.skip('Apply language for word.', function() { - openContextMenu(); - - cy.contains('.context-menu-link', 'Word is Finnish') - .click(); - - // Click outside of the cell - cy.get('.leaflet-selection-marker-end') - .then(function(items) { - expect(items).to.have.length(1); - var XPos = items[0].getBoundingClientRect().right; - var YPos = items[0].getBoundingClientRect().bottom + 10; - cy.get('body') - .click(XPos, YPos); - }); - - openContextMenu(); - - // We don't get the spell check context menu any more - cy.contains('.context-menu-link', 'Paste') - .should('be.visible'); - }); - - it.skip('Apply language for paragraph.', function() { - openContextMenu(); - - cy.contains('.context-menu-link', 'Paragraph is Finnish') - .click(); - - // Click outside of the cell - cy.get('.leaflet-selection-marker-end') - .then(function(items) { - expect(items).to.have.length(1); - var XPos = items[0].getBoundingClientRect().right; - var YPos = items[0].getBoundingClientRect().bottom + 10; - cy.get('body') - .click(XPos, YPos); - }); - - openContextMenu(); - - // We don't get the spell check context menu any more - cy.contains('.context-menu-link', 'Paste') - .should('be.visible'); - }); }); diff --git a/cypress_test/integration_tests/mobile/impress/annotation_spec.js b/cypress_test/integration_tests/mobile/impress/annotation_spec.js index adae54d477..a8ba80ef25 100644 --- a/cypress_test/integration_tests/mobile/impress/annotation_spec.js +++ b/cypress_test/integration_tests/mobile/impress/annotation_spec.js @@ -81,34 +81,6 @@ describe('Annotation tests.', function() { .should('have.text', 'modified some text'); }); - // TODO: Reply does not work at all - it.skip('Reply to comment.', function() { - insertComment(); - - mobileHelper.selectAnnotationMenuItem('Reply'); - - cy.get('.loleaflet-annotation-table') - .should('exist'); - - cy.get('.vex-dialog-form .loleaflet-annotation-textarea') - .should('have.text', ''); - - cy.get('.vex-dialog-form .loleaflet-annotation-textarea') - .type('reply'); - - cy.get('.vex-dialog-button-primary') - .click(); - - cy.get('.loleaflet-annotation') - .should('exist'); - - cy.get('.loleaflet-annotation:nth-of-type(1) .loleaflet-annotation-content') - .should('have.text', 'some text'); - - cy.get('.loleaflet-annotation:nth-of-type(2) .loleaflet-annotation-content') - .should('have.text', 'reply'); - }); - it('Remove comment.', function() { insertComment(); diff --git a/cypress_test/integration_tests/mobile/impress/hamburger_menu_spec.js b/cypress_test/integration_tests/mobile/impress/hamburger_menu_spec.js index 2bc8656afd..5741aef72c 100644 --- a/cypress_test/integration_tests/mobile/impress/hamburger_menu_spec.js +++ b/cypress_test/integration_tests/mobile/impress/hamburger_menu_spec.js @@ -343,47 +343,6 @@ describe('Trigger hamburger menu options.', function() { cy.wait(500); }); - it.skip('Automatic spell checking.', function() { - before('hamburger_menu.odp'); - - // Add a spelling error to the shape - impressHelper.selectTextShapeInTheCenter(); - - cy.get('.leaflet-pane.leaflet-overlay-pane g.Page .TextPosition tspan') - .should('have.text', 'X'); - - // Type a new character - impressHelper.dblclickOnSelectedShape(); - - helper.typeIntoDocument('qqqqqq'); - - impressHelper.triggerNewSVGForShapeInTheCenter(); - - cy.get('.leaflet-pane.leaflet-overlay-pane g.Page .TextPosition tspan') - .should('have.text', 'Xqqqqqq'); - - // Make everything white on tile - impressHelper.selectTextOfShape(); - - mobileHelper.openTextPropertiesPanel(); - - helper.clickOnIdle('#Color'); - - mobileHelper.selectFromColorPalette(0, 0, 7); - - mobileHelper.closeMobileWizard(); - - impressHelper.removeShapeSelection(); - - var preiew = '.preview-frame:nth-of-type(2) img'; - helper.imageShouldNotBeFullWhite(preiew); - - // Disable automatic spell checking - mobileHelper.selectHamburgerMenuItem(['Automatic Spell Checking']); - - helper.imageShouldBeFullWhite(preiew); - }); - it('Fullscreen presentation.', function() { before('hamburger_menu.odp'); diff --git a/cypress_test/integration_tests/mobile/impress/nextcloud_spec.js b/cypress_test/integration_tests/mobile/impress/nextcloud_spec.js index 3d893a9ee3..6f54c6e12f 100644 --- a/cypress_test/integration_tests/mobile/impress/nextcloud_spec.js +++ b/cypress_test/integration_tests/mobile/impress/nextcloud_spec.js @@ -3,7 +3,7 @@ var helper = require('../../common/helper'); var mobileHelper = require('../../common/mobile_helper'); var nextcloudHelper = require('../../common/nextcloud_helper'); -var impressHelper = require('../../common/impress_helper'); + describe('Nextcloud specific tests.', function() { var testFileName = 'nextcloud.odp'; @@ -57,44 +57,5 @@ describe('Nextcloud specific tests.', function() { nextcloudHelper.checkAndCloseSharing(); }); - - it.skip('Revision history.', function() { - helper.beforeAll(testFileName, 'impress'); - - mobileHelper.enableEditingMobile(); - - nextcloudHelper.checkAndCloseRevisionHistory(); - }); - - it.skip('Restore previous revision.', function() { - helper.beforeAll(testFileName, 'impress'); - - mobileHelper.enableEditingMobile(); - - // Initially we have "text" text in the document - impressHelper.selectTextShapeInTheCenter(); - - impressHelper.selectTextOfShape(); - - helper.expectTextForClipboard('text'); - - helper.typeIntoDocument('new'); - - helper.selectAllText(); - - helper.expectTextForClipboard('new'); - - mobileHelper.selectHamburgerMenuItem(['File', 'Save']); - - nextcloudHelper.restorePreviousVersion(); - - mobileHelper.enableEditingMobile(); - - impressHelper.selectTextShapeInTheCenter(); - - impressHelper.selectTextOfShape(); - - helper.expectTextForClipboard('text'); - }); }); diff --git a/cypress_test/integration_tests/mobile/impress/spellchecking_spec.js b/cypress_test/integration_tests/mobile/impress/spellchecking_spec.js index c3c704ad61..bc9a3dfdee 100644 --- a/cypress_test/integration_tests/mobile/impress/spellchecking_spec.js +++ b/cypress_test/integration_tests/mobile/impress/spellchecking_spec.js @@ -69,30 +69,4 @@ describe('Spell checking menu.', function() { cy.contains('.context-menu-link', 'Paste') .should('be.visible'); }); - - it.skip('Apply language for word.', function() { - openContextMenu(); - - cy.contains('.context-menu-link', 'Word is Finnish') - .click(); - - openContextMenu(); - - // We don't get the spell check context menu any more - cy.contains('.context-menu-link', 'Paste') - .should('be.visible'); - }); - - it.skip('Apply language for paragraph.', function() { - openContextMenu(); - - cy.contains('.context-menu-link', 'Paragraph is Finnish') - .click(); - - openContextMenu(); - - // We don't get the spell check context menu any more - cy.contains('.context-menu-link', 'Paste') - .should('be.visible'); - }); }); diff --git a/cypress_test/integration_tests/mobile/writer/focus_spec.js b/cypress_test/integration_tests/mobile/writer/focus_spec.js index b5c1b35666..affe67cf67 100644 --- a/cypress_test/integration_tests/mobile/writer/focus_spec.js +++ b/cypress_test/integration_tests/mobile/writer/focus_spec.js @@ -31,31 +31,6 @@ describe('Focus tests', function() { .should('be.eq', 'clipboard'); }); - it('Focus with a vex dialog.', function() { - // Click on edit button - mobileHelper.enableEditingMobile(); - - // Open comment insertion dialog - cy.get('#tb_actionbar_item_insertcomment') - .click(); - - cy.get('.loleaflet-annotation-table') - .should('be.visible'); - - // The dialog grabs the focus - cy.document().its('activeElement.className') - .should('be.eq', 'loleaflet-annotation-textarea'); - - // Close the dialog - cy.get('.vex-dialog-button-secondary') - .click(); - cy.get('.loleaflet-annotation-table').should('not.exist'); - - // Body should have the focus again (no focus on document) - cy.document().its('activeElement.tagName') - .should('be.eq', 'BODY'); - }); - it('Focus with opened mobile wizard.', function() { // Click on edit button mobileHelper.enableEditingMobile(); diff --git a/cypress_test/integration_tests/mobile/writer/mobile_wizard_state_spec.js b/cypress_test/integration_tests/mobile/writer/mobile_wizard_state_spec.js index e714cc6089..40db973f2e 100644 --- a/cypress_test/integration_tests/mobile/writer/mobile_wizard_state_spec.js +++ b/cypress_test/integration_tests/mobile/writer/mobile_wizard_state_spec.js @@ -1,4 +1,4 @@ -/* global describe it cy beforeEach require afterEach expect */ +/* global describe it cy beforeEach require afterEach */ var helper = require('../../common/helper'); var mobileHelper = require('../../common/mobile_helper'); @@ -72,45 +72,5 @@ describe('Mobile wizard state tests', function() { //cy.get('#tb_actionbar_item_mobile_wizard table') // .should('have.class', 'checked'); }); - - it.skip('Check level visibility in hamburger menu.', function() { - helper.initAliasToNegative('originalHeight'); - - // Click on edit button - mobileHelper.enableEditingMobile(); - - mobileHelper.openHamburgerMenu(); - - // Get mobile wizard last item vertical pos. - cy.contains('.ui-header.level-0.mobile-wizard', 'About') - .invoke('offset') - .its('top') - .as('originalTop'); - - cy.get('@originalTop') - .should('be.greaterThan', 0); - - // Step in and step out the File submenu. - cy.contains('.menu-entry-with-icon', 'File') - .click(); - - cy.contains('.menu-entry-with-icon', 'Print') - .should('be.visible'); - - cy.get('#mobile-wizard-back') - .click(); - - cy.contains('.menu-entry-with-icon', 'File') - .should('be.visible'); - - cy.get('@originalTop') - .then(function(originalTop) { - cy.contains('.ui-header.level-0.mobile-wizard', 'About') - .should(function(content) { - expect(content.offset().top).to.be.lessThan(originalTop + 0.0001); - expect(content.offset().top).to.be.greaterThan(originalTop - 0.0001); - }); - }); - }); }); diff --git a/cypress_test/integration_tests/mobile/writer/nextcloud_spec.js b/cypress_test/integration_tests/mobile/writer/nextcloud_spec.js index 8237d0a5ee..88206922ae 100644 --- a/cypress_test/integration_tests/mobile/writer/nextcloud_spec.js +++ b/cypress_test/integration_tests/mobile/writer/nextcloud_spec.js @@ -3,7 +3,6 @@ var helper = require('../../common/helper'); var mobileHelper = require('../../common/mobile_helper'); var nextcloudHelper = require('../../common/nextcloud_helper'); -var writerHelper = require('../../common/writer_helper'); describe('Nextcloud specific tests.', function() { var testFileName = 'nextcloud.odt'; @@ -57,41 +56,5 @@ describe('Nextcloud specific tests.', function() { nextcloudHelper.checkAndCloseSharing(); }); - - it.skip('Revision history.', function() { - helper.beforeAll(testFileName, 'writer'); - - mobileHelper.enableEditingMobile(); - - nextcloudHelper.checkAndCloseRevisionHistory(); - }); - - it.skip('Restore previous revision.', function() { - helper.beforeAll(testFileName, 'writer'); - - mobileHelper.enableEditingMobile(); - - // Initially we have "text" text in the document - writerHelper.selectAllTextOfDoc(); - - helper.expectTextForClipboard('text'); - - // Change the document content and save it - helper.typeIntoDocument('new'); - - writerHelper.selectAllTextOfDoc(); - - helper.expectTextForClipboard('new'); - - mobileHelper.selectHamburgerMenuItem(['File', 'Save']); - - nextcloudHelper.restorePreviousVersion(); - - mobileHelper.enableEditingMobile(); - - writerHelper.selectAllTextOfDoc(); - - helper.expectTextForClipboard('text'); - }); }); diff --git a/cypress_test/integration_tests/mobile/writer/spellchecking_spec.js b/cypress_test/integration_tests/mobile/writer/spellchecking_spec.js index be9717b43a..b21c6d4122 100644 --- a/cypress_test/integration_tests/mobile/writer/spellchecking_spec.js +++ b/cypress_test/integration_tests/mobile/writer/spellchecking_spec.js @@ -83,58 +83,4 @@ describe('Spell checking menu.', function() { cy.contains('.context-menu-link', 'Paste') .should('be.visible'); }); - - it.skip('Check language status for selection.', function() { - openContextMenu(); - - cy.contains('.menu-entry-with-icon', 'Set Language for Selection') - .click(); - - // English is selected - cy.contains('.ui-content[title="Set Language for Selection"] .menu-entry-checked', 'English (USA)') - .should('be.visible'); - }); - - it.skip('Set None Language for selection.', function() { - openContextMenu(); - - cy.contains('.menu-entry-with-icon', 'Set Language for Selection') - .click(); - - cy.contains('.ui-content[title="Set Language for Selection"] .menu-entry-with-icon', 'None (Do not check spelling)') - .click(); - - openContextMenu(); - - // We don't get the spell check context menu any more - cy.contains('.context-menu-link', 'Paste') - .should('be.visible'); - }); - - it.skip('Check language status for paragraph.', function() { - openContextMenu(); - - cy.contains('.menu-entry-with-icon', 'Set Language for Paragraph') - .click(); - - // English is selected - cy.contains('.ui-content[title="Set Language for Paragraph"] .menu-entry-checked', 'English (USA)') - .should('be.visible'); - }); - - it.skip('Set None Language for paragraph.', function() { - openContextMenu(); - - cy.contains('.menu-entry-with-icon', 'Set Language for Paragraph') - .click(); - - cy.contains('.ui-content[title="Set Language for Paragraph"] .menu-entry-with-icon', 'None (Do not check spelling)') - .click(); - - openContextMenu(); - - // We don't get the spell check context menu any more - cy.contains('.context-menu-link', 'Paste') - .should('be.visible'); - }); }); |