Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Created a Cypress test for Clear Direct formatting, Apply font style …
…and Apply font size in Desktop Calc

Signed-off-by: Ezinne Nnamani <nnamani.ezinne@collabora.com>
Change-Id: I7f59d8e9d9597137e26e6d2cc0a20bf3d516ce21
Signed-off-by: Ezinne Nnamani <nnamani.ezinne@collabora.com>
  • Loading branch information
Ezinnem authored and tzolnai committed Nov 12, 2020
1 parent ffc114e commit ccf0c54
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions cypress_test/integration_tests/desktop/calc/top_toolbar_spec.js
Expand Up @@ -16,6 +16,49 @@ describe('Top toolbar tests.', function() {
helper.afterAll(testFileName);
});

it('Clear Direct formatting.', function() {
cy.get('#tb_editbar_item_bold')
.click();

calcHelper.selectAllMobile();

cy.get('#copy-paste-container table td b')
.should('exist');

cy.get('#tb_editbar_item_reset')
.click();

calcHelper.selectAllMobile();

cy.get('#copy-paste-container table td b')
.should('not.exist');

});

it('Apply font style.', function() {
cy.get('#tb_editbar_item_fonts')
.click();

cy.contains('.select2-results__option','Alef')
.click({force: true});
calcHelper.selectAllMobile();

cy.get('#copy-paste-container table td font')
.should('have.attr', 'face', 'Alef');
});

it('Apply font size.', function() {
cy.get('#tb_editbar_item_fontsizes')
.click();

cy.contains('.select2-results__option','12')
.click({force: true});
calcHelper.selectAllMobile();

cy.get('#copy-paste-container table td font')
.should('have.attr', 'size', '3');
});

it('Apply bold font.', function() {
cy.get('#tb_editbar_item_bold')
.click();
Expand Down

0 comments on commit ccf0c54

Please sign in to comment.