front test
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
9b4546edad
commit
f06c7d3d47
|
@ -87,7 +87,7 @@ describe('Component vnTicketIndex', () => {
|
||||||
controller.$.balanceCreateDialog = {show: () => {}};
|
controller.$.balanceCreateDialog = {show: () => {}};
|
||||||
jest.spyOn(controller.$.balanceCreateDialog, 'show').mockReturnThis();
|
jest.spyOn(controller.$.balanceCreateDialog, 'show').mockReturnThis();
|
||||||
|
|
||||||
controller.$.tickets = tickets;
|
controller.$.model = {data: tickets};
|
||||||
controller.$.balanceCreateDialog.amountPaid = 0;
|
controller.$.balanceCreateDialog.amountPaid = 0;
|
||||||
controller.openBalanceDialog();
|
controller.openBalanceDialog();
|
||||||
|
|
||||||
|
@ -101,7 +101,7 @@ describe('Component vnTicketIndex', () => {
|
||||||
|
|
||||||
describe('checked()', () => {
|
describe('checked()', () => {
|
||||||
it('should return an array of checked tickets', () => {
|
it('should return an array of checked tickets', () => {
|
||||||
controller.$.tickets = tickets;
|
controller.$.model = {data: tickets};
|
||||||
const result = controller.checked;
|
const result = controller.checked;
|
||||||
const firstRow = result[0];
|
const firstRow = result[0];
|
||||||
const secondRow = result[1];
|
const secondRow = result[1];
|
||||||
|
@ -114,7 +114,7 @@ describe('Component vnTicketIndex', () => {
|
||||||
|
|
||||||
describe('totalChecked()', () => {
|
describe('totalChecked()', () => {
|
||||||
it('should return the total number of checked tickets', () => {
|
it('should return the total number of checked tickets', () => {
|
||||||
controller.$.tickets = tickets;
|
controller.$.model = {data: tickets};
|
||||||
const result = controller.checked;
|
const result = controller.checked;
|
||||||
|
|
||||||
expect(result.length).toEqual(2);
|
expect(result.length).toEqual(2);
|
||||||
|
|
Loading…
Reference in New Issue