de74eae245
We copy each test document into the work-dir and now we also give them a random prefix. This is critical to ensure that parallel runs do not re-use the same document. Also, when closing a document, we wait for the document-name to disappear from the admin console. Sharing the same document, or even the name, means we are likely to see random results. Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk> (cherry picked from commit d998f2c1c8a163c3ef870bbe8581a364df3905bb) Change-Id: I2f41566952c49c9c63ee206bcba6a4dd49cdd6d0
62 lines
1.3 KiB
JavaScript
62 lines
1.3 KiB
JavaScript
/* global describe it cy beforeEach require afterEach Cypress */
|
|
|
|
var helper = require('../../common/helper');
|
|
var desktopHelper = require('../../common/desktop_helper');
|
|
|
|
describe('Statubar tests.', function() {
|
|
var origTestFileName = 'statusbar.odp';
|
|
var testFileName;
|
|
|
|
beforeEach(function() {
|
|
testFileName = helper.beforeAll(origTestFileName, 'impress');
|
|
|
|
if (Cypress.env('INTEGRATION') === 'nextcloud') {
|
|
desktopHelper.showStatusBarIfHidden ();
|
|
}
|
|
});
|
|
|
|
afterEach(function() {
|
|
helper.afterAll(testFileName, this.currentTest.state);
|
|
});
|
|
|
|
it('Selected slide.', function() {
|
|
cy.get('#PageStatus')
|
|
.should('have.text', 'Slide 1 of 2');
|
|
|
|
cy.get('#tb_actionbar_item_next')
|
|
.click();
|
|
|
|
cy.get('#PageStatus')
|
|
.should('have.text', 'Slide 2 of 2');
|
|
|
|
cy.get('#tb_actionbar_item_prev')
|
|
.click();
|
|
|
|
cy.get('#PageStatus')
|
|
.should('have.text', 'Slide 1 of 2');
|
|
});
|
|
|
|
it('Change zoom level.', function() {
|
|
desktopHelper.resetZoomLevel();
|
|
|
|
desktopHelper.shouldHaveZoomLevel('100');
|
|
|
|
desktopHelper.zoomIn();
|
|
|
|
desktopHelper.shouldHaveZoomLevel('120');
|
|
|
|
desktopHelper.zoomOut();
|
|
|
|
desktopHelper.shouldHaveZoomLevel('100');
|
|
});
|
|
|
|
it('Select zoom level.', function() {
|
|
desktopHelper.resetZoomLevel();
|
|
|
|
desktopHelper.shouldHaveZoomLevel('100');
|
|
|
|
desktopHelper.selectZoomLevel('280');
|
|
|
|
desktopHelper.shouldHaveZoomLevel('280');
|
|
});
|
|
});
|