Skip to content

Commit ae1e270

Browse files
committed
test: fix checking missing properties
1 parent ab8b431 commit ae1e270

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

apps/meteor/tests/end-to-end/api/livechat/14-units.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -635,8 +635,8 @@ import { IS_EE } from '../../../e2e/config/constants';
635635
expect(updatedUnit).to.have.property('numDepartments', 1);
636636

637637
const fullDepartment = await getDepartmentById(department._id);
638-
expect(fullDepartment).to.have.property('parentId').that.is.null;
639-
expect(fullDepartment).to.have.property('ancestors').that.is.null;
638+
expect(fullDepartment).to.not.have.property('parentId');
639+
expect(fullDepartment).to.not.have.property('ancestors');
640640
});
641641

642642
it('should fail adding a department into an existing unit that a monitor does not supervise', async () => {
@@ -658,8 +658,8 @@ import { IS_EE } from '../../../e2e/config/constants';
658658
expect(updatedUnit).to.have.property('numDepartments', 1);
659659

660660
const fullDepartment = await getDepartmentById(department._id);
661-
expect(fullDepartment).to.have.property('parentId').that.is.null;
662-
expect(fullDepartment).to.have.property('ancestors').that.is.null;
661+
expect(fullDepartment).to.not.have.property('parentId');
662+
expect(fullDepartment).to.not.have.property('ancestors');
663663
});
664664

665665
it('should succesfully add a department into an existing unit that a monitor supervises', async () => {
@@ -732,8 +732,8 @@ import { IS_EE } from '../../../e2e/config/constants';
732732

733733
const fullDepartment = await getDepartmentById(department._id);
734734
expect(fullDepartment).to.have.property('name', updatedName);
735-
expect(fullDepartment).to.have.property('parentId').that.is.null;
736-
expect(fullDepartment).to.have.property('ancestors').that.is.null;
735+
expect(fullDepartment).to.not.have.property('parentId');
736+
expect(fullDepartment).to.not.have.property('ancestors');
737737
});
738738
});
739739

@@ -872,8 +872,8 @@ import { IS_EE } from '../../../e2e/config/constants';
872872
expect(updatedUnit).to.have.property('numDepartments', 1);
873873

874874
const fullDepartment = await getDepartmentById(testDepartmentId);
875-
expect(fullDepartment).to.have.property('parentId').that.is.null;
876-
expect(fullDepartment).to.have.property('ancestors').that.is.null;
875+
expect(fullDepartment).to.not.have.property('parentId');
876+
expect(fullDepartment).to.not.have.property('ancestors');
877877
});
878878

879879
it('should succesfully add an existing department to a unit as an admin', async () => {
@@ -904,8 +904,8 @@ import { IS_EE } from '../../../e2e/config/constants';
904904
expect(updatedUnit).to.have.property('numDepartments', 1);
905905

906906
const fullDepartment = await getDepartmentById(testDepartmentId);
907-
expect(fullDepartment).to.have.property('parentId').that.is.null;
908-
expect(fullDepartment).to.have.property('ancestors').that.is.null;
907+
expect(fullDepartment).to.not.have.property('parentId');
908+
expect(fullDepartment).to.not.have.property('ancestors');
909909
});
910910

911911
it('should succesfully add an existing department to a unit that a monitor supervises', async () => {

0 commit comments

Comments
 (0)