+
+ it("should not sort when clicking on filtering box", fakeAsync(() => {
+ const expectedJobRow = {
+ jobId: "job1",
+ prodId: "producer2",
+ typeId: "type1",
+ owner: "owner1",
+ targetUri: "http://one",
+ };
+
+ setServiceSpy();
+ component.ngOnInit();
+ tick(0);
+
+ loader
+ .getHarness(MatTableHarness.with({ selector: "#jobsTable" }))
+ .then((loadTable) => {
+ loader
+ .getHarness(MatInputHarness.with({ selector: "#jobIdFilter" }))
+ .then((idFilter) => {
+ tick(10);
+ idFilter.setValue("").then((_) => {
+ loadTable.getRows().then((jobRows) => {
+ expect(jobRows.length).toEqual(4);
+ jobRows[2].getCellTextByColumnName().then((value) => {
+ expect(expectedJobRow).toEqual(
+ jasmine.objectContaining(value)
+ );
+ });
+ });
+ });
+ });
+ loader
+ .getHarness(
+ MatInputHarness.with({ selector: "#jobTypeIdFilter" })
+ )
+ .then((typeIdFilter) => {
+ tick(10);
+ typeIdFilter.setValue("").then((_) => {
+ loadTable.getRows().then((jobRows) => {
+ expect(jobRows.length).toEqual(4);
+ jobRows[2].getCellTextByColumnName().then((value) => {
+ expect(expectedJobRow).toEqual(
+ jasmine.objectContaining(value)
+ );
+ });
+ });
+ });
+ });
+ loader
+ .getHarness(MatInputHarness.with({ selector: "#jobOwnerFilter" }))
+ .then((ownerFilter) => {
+ tick(10);
+ ownerFilter.setValue("").then((_) => {
+ loadTable.getRows().then((jobRows) => {
+ expect(jobRows.length).toEqual(4);
+ jobRows[2].getCellTextByColumnName().then((value) => {
+ expect(expectedJobRow).toEqual(
+ jasmine.objectContaining(value)
+ );
+ });
+ });
+ });
+ });
+ loader
+ .getHarness(
+ MatInputHarness.with({ selector: "#jobTargetUriFilter" })
+ )
+ .then((targetUriFilter) => {
+ tick(10);
+ targetUriFilter.setValue("").then((_) => {
+ loadTable.getRows().then((jobRows) => {
+ expect(jobRows.length).toEqual(4);
+ jobRows[2].getCellTextByColumnName().then((value) => {
+ expect(expectedJobRow).toEqual(
+ jasmine.objectContaining(value)
+ );
+ });
+ });
+ });
+ });
+ });
+ discardPeriodicTasks();
+ }));