refactor: refs #8581 remove filter tests
This commit is contained in:
parent
9d3c2323fd
commit
561f761b65
|
@ -49,143 +49,4 @@ describe('InvoiceInList', () => {
|
|||
);
|
||||
cy.get('[data-cy="vnLvCompany"]').should('contain.text', 'ORN');
|
||||
});
|
||||
|
||||
describe('right-panel', () => {
|
||||
it('should filter by From param', () => {
|
||||
cy.dataCy('From_inputDate').type('31/12/2000{enter}');
|
||||
cy.waitTableScrollLoad();
|
||||
cy.validateVnTableRows({
|
||||
cols: [
|
||||
{
|
||||
name: 'issued',
|
||||
type: 'date',
|
||||
val: '31/12/2000',
|
||||
operation: 'after',
|
||||
},
|
||||
],
|
||||
});
|
||||
});
|
||||
|
||||
it('should filter by To param', () => {
|
||||
cy.dataCy('To_inputDate').type('31/12/2000{enter}');
|
||||
cy.waitTableScrollLoad();
|
||||
cy.validateVnTableRows({
|
||||
cols: [
|
||||
{
|
||||
name: 'issued',
|
||||
type: 'date',
|
||||
val: '31/12/2000',
|
||||
operation: 'before',
|
||||
},
|
||||
],
|
||||
});
|
||||
});
|
||||
|
||||
it('should filter by daysAgo param', () => {
|
||||
cy.dataCy('Days ago_input').type('4{enter}');
|
||||
cy.waitTableScrollLoad();
|
||||
cy.validateVnTableRows({
|
||||
cols: [
|
||||
{
|
||||
name: 'issued',
|
||||
type: 'date',
|
||||
val: '31/12/2000',
|
||||
operation: 'after',
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
cy.dataCy('vnFilterPanelChip_from').should('contain.text', '12/28/2000');
|
||||
cy.dataCy('vnFilterPanelChip_to').should('contain.text', '01/01/2001');
|
||||
});
|
||||
|
||||
it('should filter by supplierFk param', () => {
|
||||
cy.selectOption('[data-cy="vnSupplierSelect"]', 'farmer king');
|
||||
cy.dataCy('vnSupplierSelect').type('{enter}');
|
||||
cy.waitTableScrollLoad();
|
||||
cy.validateVnTableRows({
|
||||
cols: [{ name: 'supplierFk', val: 'Farmer King' }],
|
||||
});
|
||||
});
|
||||
|
||||
it('should filter by supplierRef param', () => {
|
||||
cy.intercept('GET', /\/api\/InvoiceIns\/\d+\/getTotals$/).as('invoice');
|
||||
cy.dataCy('Supplier ref_input').type('1239{enter}');
|
||||
cy.waitTableScrollLoad();
|
||||
cy.wait('@invoice').then(() => cy.validateDescriptor({ title: '1239' }));
|
||||
});
|
||||
|
||||
it('should filter by FI param', () => {
|
||||
const plantsSlTaxNumber = '06089160W';
|
||||
cy.dataCy('FI_input').type(`${plantsSlTaxNumber}{enter}`);
|
||||
cy.waitTableScrollLoad();
|
||||
cy.validateVnTableRows({ cols: [{ name: 'supplierFk', val: 'plants sl' }] });
|
||||
});
|
||||
|
||||
it('should filter by Serial param', () => {
|
||||
cy.dataCy('Serial_input').type('R');
|
||||
cy.validateVnTableRows({ cols: [{ name: 'serial', val: 'r' }] });
|
||||
});
|
||||
|
||||
it('should filter by account param', () => {
|
||||
const supplierAccount = '4100000001';
|
||||
cy.dataCy('Ledger account_input').type(`${supplierAccount}{enter}`);
|
||||
cy.waitTableScrollLoad();
|
||||
cy.validateVnTableRows({ cols: [{ name: 'supplierFk', val: 'plants sl' }] });
|
||||
});
|
||||
|
||||
it('should filter by AWB param', () => {
|
||||
const awb = '22101929561';
|
||||
cy.dataCy('AWB_input').type(`${awb}{enter}`);
|
||||
cy.intercept('GET', /\/api\/InvoiceIns\/\d+\/getTotals$/).as('invoice');
|
||||
cy.wait('@invoice').then(() => cy.validateDescriptor({ title: '1239' }));
|
||||
});
|
||||
|
||||
it('should filter by amount param', () => {
|
||||
cy.dataCy('Amount_input').type('64.23{enter}');
|
||||
cy.intercept('GET', /\/api\/InvoiceIns\/\d+\/getTotals$/).as('invoice');
|
||||
cy.wait('@invoice').then(() =>
|
||||
cy.validateDescriptor({ listbox: { 2: '64.23' } }),
|
||||
);
|
||||
});
|
||||
|
||||
it('should filter by company param', () => {
|
||||
cy.selectOption('[data-cy="Company_select"]', '442');
|
||||
cy.dataCy('Company_select').type('{enter}');
|
||||
cy.waitTableScrollLoad();
|
||||
cy.validateVnTableRows({
|
||||
cols: [{ name: 'companyFk', val: 'vnl' }],
|
||||
});
|
||||
});
|
||||
|
||||
it('should filter by isBooked param', () => {
|
||||
cy.dataCy('vnCheckboxIs booked').click();
|
||||
cy.waitTableScrollLoad();
|
||||
cy.validateVnTableRows({
|
||||
cols: [{ name: 'isBooked', val: 'check' }],
|
||||
});
|
||||
cy.dataCy('vnCheckboxIs booked').click();
|
||||
cy.waitTableScrollLoad();
|
||||
cy.validateVnTableRows({
|
||||
cols: [{ name: 'isBooked', val: 'close' }],
|
||||
});
|
||||
});
|
||||
|
||||
it('should filter by correctingFk param', () => {
|
||||
cy.dataCy('vnCheckboxRectificative').click();
|
||||
cy.get('[data-cy="vnTable"] .q-virtual-scroll__content')
|
||||
.children()
|
||||
.its('length')
|
||||
.then((firstCount) => {
|
||||
cy.dataCy('vnCheckboxRectificative').click();
|
||||
cy.waitTableScrollLoad();
|
||||
cy.get('[data-cy="vnTable"] .q-virtual-scroll__content')
|
||||
.children()
|
||||
.its('length')
|
||||
.then((secondCount) => {
|
||||
expect(firstCount).to.not.equal(secondCount);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue