Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Created a Cypress test for Format as currency and Format as Percent i…
…n Desktop Calc

Signed-off-by: Ezinne Nnamani <nnamani.ezinne@collabora.com>
Change-Id: I90ca9051ce71e9f3bc9b774cd0bdb87c076ceb8d
Signed-off-by: Ezinne Nnamani <nnamani.ezinne@collabora.com>
  • Loading branch information
Ezinnem authored and tzolnai committed Nov 13, 2020
1 parent d328f93 commit 4bea793
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion cypress_test/integration_tests/desktop/calc/top_toolbar_spec.js
Expand Up @@ -98,7 +98,7 @@ describe('Top toolbar tests.', function() {
cy.get('#copy-paste-container table td s')
.should('exist');
});

it('Apply highlight color.', function() {
cy.get('#tb_editbar_item_backgroundcolor')
.click();
Expand Down Expand Up @@ -146,6 +146,25 @@ describe('Top toolbar tests.', function() {
.should('have.attr', 'sdnum', '1033;0;0');
});

it('Format as currency.', function() {
cy.get('#tb_editbar_item_numberformatcurrency')
.click();

calcHelper.selectAllMobile();

cy.get('#copy-paste-container table td')
.should('have.attr', 'sdnum', '1033;0;[$$-409]#,##0.00;[RED]-[$$-409]#,##0.00');
});

it('Format as Percent.', function() {
cy.get('#tb_editbar_item_numberformatpercent')
.click();

calcHelper.selectAllMobile();

cy.get('#copy-paste-container table td')
.should('have.attr', 'sdnum', '1033;0;0.00%');
});
it('Apply left/right alignment', function() {
// Set right aligment first
cy.get('#tb_editbar_item_textalign .w2ui-tb-down')
Expand Down

0 comments on commit 4bea793

Please sign in to comment.