cypress: remove duplicate selectFirstColumn() helper method.
Now we have it in the general calc helper file. Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com> Change-Id: Id7f12441b9612a630f6b348a9e6db6235f4b6c45
This commit is contained in:
parent
2dc31a7648
commit
6352574018
3 changed files with 7 additions and 24 deletions
|
@ -21,20 +21,4 @@ function selectFirstRow() {
|
||||||
.should('have.prop', 'value', 'A1:AMJ1');
|
.should('have.prop', 'value', 'A1:AMJ1');
|
||||||
}
|
}
|
||||||
|
|
||||||
function selectFirstColumn() {
|
|
||||||
cy.get('.spreadsheet-header-columns')
|
|
||||||
.then(function(items) {
|
|
||||||
expect(items).to.have.lengthOf(1);
|
|
||||||
|
|
||||||
var XPos = items[0].getBoundingClientRect().left + 10;
|
|
||||||
var YPos = (items[0].getBoundingClientRect().top + items[0].getBoundingClientRect().bottom) / 2;
|
|
||||||
cy.get('body')
|
|
||||||
.click(XPos, YPos);
|
|
||||||
});
|
|
||||||
|
|
||||||
cy.get('input#addressInput')
|
|
||||||
.should('have.prop', 'value', 'A1:A1048576');
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports.selectFirstRow = selectFirstRow;
|
module.exports.selectFirstRow = selectFirstRow;
|
||||||
module.exports.selectFirstColumn = selectFirstColumn;
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
var helper = require('../../common/helper');
|
var helper = require('../../common/helper');
|
||||||
var mobileHelper = require('../../common/mobile_helper');
|
var mobileHelper = require('../../common/mobile_helper');
|
||||||
var calcMobileHelper = require('./calc_mobile_helper');
|
var calcHelper = require('../../common/calc_helper');
|
||||||
|
|
||||||
describe('Chart tests.', function() {
|
describe('Chart tests.', function() {
|
||||||
var testFileName = 'chart.ods';
|
var testFileName = 'chart.ods';
|
||||||
|
@ -12,7 +12,7 @@ describe('Chart tests.', function() {
|
||||||
|
|
||||||
mobileHelper.enableEditingMobile();
|
mobileHelper.enableEditingMobile();
|
||||||
|
|
||||||
calcMobileHelper.selectFirstColumn();
|
calcHelper.selectFirstColumn();
|
||||||
|
|
||||||
insertChart();
|
insertChart();
|
||||||
});
|
});
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
var helper = require('../../common/helper');
|
var helper = require('../../common/helper');
|
||||||
var calcHelper = require('../../common/calc_helper');
|
var calcHelper = require('../../common/calc_helper');
|
||||||
var mobileHelper = require('../../common/mobile_helper');
|
var mobileHelper = require('../../common/mobile_helper');
|
||||||
var calcMobileHelper = require('./calc_mobile_helper');
|
|
||||||
|
|
||||||
describe('Trigger hamburger menu options.', function() {
|
describe('Trigger hamburger menu options.', function() {
|
||||||
var testFileName = '';
|
var testFileName = '';
|
||||||
|
@ -467,7 +466,7 @@ describe('Trigger hamburger menu options.', function() {
|
||||||
before('hamburger_menu_sort.ods');
|
before('hamburger_menu_sort.ods');
|
||||||
|
|
||||||
// Sort the first column's data
|
// Sort the first column's data
|
||||||
calcMobileHelper.selectFirstColumn();
|
calcHelper.selectFirstColumn();
|
||||||
|
|
||||||
mobileHelper.selectHamburgerMenuItem(['Data', 'Sort Ascending']);
|
mobileHelper.selectHamburgerMenuItem(['Data', 'Sort Ascending']);
|
||||||
|
|
||||||
|
@ -490,7 +489,7 @@ describe('Trigger hamburger menu options.', function() {
|
||||||
before('hamburger_menu_sort.ods');
|
before('hamburger_menu_sort.ods');
|
||||||
|
|
||||||
// Sort the first column's data
|
// Sort the first column's data
|
||||||
calcMobileHelper.selectFirstColumn();
|
calcHelper.selectFirstColumn();
|
||||||
|
|
||||||
mobileHelper.selectHamburgerMenuItem(['Data', 'Sort Descending']);
|
mobileHelper.selectHamburgerMenuItem(['Data', 'Sort Descending']);
|
||||||
|
|
||||||
|
@ -523,7 +522,7 @@ describe('Trigger hamburger menu options.', function() {
|
||||||
.should('be.greaterThan', 0);
|
.should('be.greaterThan', 0);
|
||||||
|
|
||||||
// Group first
|
// Group first
|
||||||
calcMobileHelper.selectFirstColumn();
|
calcHelper.selectFirstColumn();
|
||||||
|
|
||||||
mobileHelper.selectHamburgerMenuItem(['Data', 'Group and Outline', 'Group...']);
|
mobileHelper.selectHamburgerMenuItem(['Data', 'Group and Outline', 'Group...']);
|
||||||
|
|
||||||
|
@ -561,7 +560,7 @@ describe('Trigger hamburger menu options.', function() {
|
||||||
.should('be.greaterThan', 0);
|
.should('be.greaterThan', 0);
|
||||||
|
|
||||||
// Group first
|
// Group first
|
||||||
calcMobileHelper.selectFirstColumn();
|
calcHelper.selectFirstColumn();
|
||||||
|
|
||||||
mobileHelper.selectHamburgerMenuItem(['Data', 'Group and Outline', 'Group...']);
|
mobileHelper.selectHamburgerMenuItem(['Data', 'Group and Outline', 'Group...']);
|
||||||
|
|
||||||
|
@ -599,7 +598,7 @@ describe('Trigger hamburger menu options.', function() {
|
||||||
.should('be.greaterThan', 0);
|
.should('be.greaterThan', 0);
|
||||||
|
|
||||||
// Group first
|
// Group first
|
||||||
calcMobileHelper.selectFirstColumn();
|
calcHelper.selectFirstColumn();
|
||||||
|
|
||||||
mobileHelper.selectHamburgerMenuItem(['Data', 'Group and Outline', 'Group...']);
|
mobileHelper.selectHamburgerMenuItem(['Data', 'Group and Outline', 'Group...']);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue