Added tests for view/collapse, #3427

* added four tests (collapse.spec.js,collapse_all.spec.js,collapse_left.spec.js,collapse_right.spec.js) to check if the column's label are empty when collapsed
This commit is contained in:
Ritesh Soni 2021-10-04 20:09:47 +05:30 committed by GitHub
parent 5e310a7700
commit e286d9f02f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 63 additions and 0 deletions

View File

@ -0,0 +1,17 @@
describe(__filename, function () {
const fixture = [
['a', 'b', 'c'],
['0a', '0b', '0c'],
['1a', '1b', '1c']
];
it('it collapses all columns', function () {
cy.loadAndVisitProject(fixture);
cy.columnActionClick('All', ['View', 'Collapse all columns']);
cy.get('[title="a"]').should('to.contain', '');
cy.get('[title="b"]').should('to.contain', '');
cy.get('[title="c"]').should('to.contain', '');
});
});

View File

@ -0,0 +1,14 @@
describe(__filename, function () {
const fixture = [
['a', 'b', 'c'],
['0a', '0b', '0c'],
['1a', '1b', '1c']
];
it('it collapses all columns', function () {
cy.loadAndVisitProject(fixture);
cy.columnActionClick('a', ['View', 'Collapse this column']);
cy.get('[title="a"]').should('to.contain', '');
});
});

View File

@ -0,0 +1,16 @@
describe(__filename, function () {
const fixture = [
['a', 'b', 'c'],
['0a', '0b', '0c'],
['1a', '1b', '1c']
];
it('it collapses all columns to left', function () {
cy.loadAndVisitProject(fixture);
cy.columnActionClick('c', ['View', 'Collapse all columns to left']);
cy.get('[title="a"]').should('to.contain', '');
cy.get('[title="b"]').should('to.contain', '');
});
});

View File

@ -0,0 +1,16 @@
describe(__filename, function () {
const fixture = [
['a', 'b', 'c'],
['0a', '0b', '0c'],
['1a', '1b', '1c']
];
it('it collapses all columns to right', function () {
cy.loadAndVisitProject(fixture);
cy.columnActionClick('a', ['View', 'Collapse all columns to right']);
cy.get('[title="b"]').should('to.contain', '');
cy.get('[title="c"]').should('to.contain', '');
});
});