Skip to content

Commit

Permalink
Created a cypress test for Remove border cell, Right border cell and …
Browse files Browse the repository at this point in the history
…Left border cell in Desktop Calc

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

it('Remove cell border', function() {
cy.get('#tb_editbar_item_setborderstyle')
.click();

//Add left border
cy.get('.w2ui-tb-image.w2ui-icon.frame02')
.click({force: true});

calcHelper.selectAllMobile();

cy.get('#copy-paste-container table td')
.should('have.attr', 'style', 'border-left: 1px solid #000000');

// Then remove it
cy.get('#tb_editbar_item_setborderstyle')
.click();

cy.get('.w2ui-tb-image.w2ui-icon.frame01')
.click({force: true});

calcHelper.selectAllMobile();

cy.get('#copy-paste-container table td')
.should('not.have.attr', 'style');
});

it('Apply right border', function() {
cy.get('#tb_editbar_item_setborderstyle')
.click();

cy.get('.w2ui-tb-image.w2ui-icon.frame03')
.click({force: true});

calcHelper.selectAllMobile();

cy.get('#copy-paste-container table td')
.should('have.attr', 'style', 'border-right: 1px solid #000000');
});

it('Apply left border', function() {
cy.get('#tb_editbar_item_setborderstyle')
.click();

cy.get('.w2ui-tb-image.w2ui-icon.frame02')
.click({force: true});

calcHelper.selectAllMobile();

cy.get('#copy-paste-container table td')
.should('have.attr', 'style', 'border-left: 1px solid #000000');
});

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

0 comments on commit fc851c6

Please sign in to comment.