diff options
author | Tamás Zolnai <tamas.zolnai@collabora.com> | 2021-02-26 14:04:16 +0100 |
---|---|---|
committer | Tamás Zolnai <zolnaitamas2000@gmail.com> | 2021-03-08 20:07:33 +0100 |
commit | dc5fdb52d0a20c0ef4527dc8b96a4abf700c819a (patch) | |
tree | 828fb68c3a84b1e6f7642c86266ee323323f6e08 /cypress_test | |
parent | cypress: alias -> local variable change in form field tests. (diff) | |
download | online-dc5fdb52d0a20c0ef4527dc8b96a4abf700c819a.tar.gz online-dc5fdb52d0a20c0ef4527dc8b96a4abf700c819a.zip |
cypress: alias -> local variable change in formula bar tests.
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: I2ef937b29673e8f6f4c301989b464ca0a991267a
(cherry picked from commit 953c21b995ac9c86dcac5902f2c8d80b3c127c04)
Diffstat (limited to 'cypress_test')
-rw-r--r-- | cypress_test/integration_tests/mobile/calc/formulabar_spec.js | 31 |
1 files changed, 12 insertions, 19 deletions
diff --git a/cypress_test/integration_tests/mobile/calc/formulabar_spec.js b/cypress_test/integration_tests/mobile/calc/formulabar_spec.js index 309b6f20aa..ae10aa29fe 100644 --- a/cypress_test/integration_tests/mobile/calc/formulabar_spec.js +++ b/cypress_test/integration_tests/mobile/calc/formulabar_spec.js @@ -173,26 +173,22 @@ describe('Formula bar tests.', function() { }); it('Switch oneline-multiline mode of input bar', function() { - helper.initAliasToNegative('inputOriginalHeight'); - + // Get the initial height of the input field. + var inputOriginalHeight = 0; cy.get('#calc-inputbar') - .invoke('height') - .as('inputOriginalHeight'); - - cy.get('@inputOriginalHeight') - .should('be.greaterThan', 0); + .should(function(inputbar) { + inputOriginalHeight = inputbar.height(); + expect(inputOriginalHeight).to.not.equal(0); + }); // Switch to multiline mode. var arrowPos = [250, 10]; cy.get('#calc-inputbar') .click(arrowPos[0], arrowPos[1]); - cy.get('@inputOriginalHeight') - .then(function(inputOriginalHeight) { - cy.get('#calc-inputbar') - .should(function(inputbar) { - expect(inputbar.height()).to.be.greaterThan(inputOriginalHeight); - }); + cy.get('#calc-inputbar') + .should(function(inputbar) { + expect(inputbar.height()).to.be.greaterThan(inputOriginalHeight); }); cy.get('#calc-inputbar') @@ -204,12 +200,9 @@ describe('Formula bar tests.', function() { cy.get('#calc-inputbar') .click(arrowPos[0], arrowPos[1]); - cy.get('@inputOriginalHeight') - .then(function(inputOriginalHeight) { - cy.get('#calc-inputbar') - .should(function(inputbar) { - expect(inputbar.height()).to.be.equal(inputOriginalHeight); - }); + cy.get('#calc-inputbar') + .should(function(inputbar) { + expect(inputbar.height()).to.be.equal(inputOriginalHeight); }); }); |