+ describe("#truncate data", () => {
+ fit("should verify that data is correctly truncated when needed", async () => {
+ policyServiceSpy.getPolicyInstancesByType.and.returnValue(
+ of(policyInstances)
+ );
+ policyServiceSpy.getPolicyInstance.and.callFake(function (
+ policyId: string
+ ) {
+ return of(policyIdToInstanceMap[policyId]);
+ });
+ policyServiceSpy.getPolicyStatus.and.callFake(function (
+ policyId: string
+ ) {
+ return of(policyIdToStatusMap[policyId]);
+ });
+ compileAndGetComponents();
+ componentUnderTest.slice = 1;
+ componentUnderTest.ngOnInit();
+
+ const policiesTable = await loader.getHarness(
+ MatTableHarness.with({ selector: "#policiesTable" })
+ );
+ const policyRows = await policiesTable.getRows();
+ expect(policyRows.length).toEqual(1);
+ policyRows[0].getCellTextByColumnName().then((values) => {
+ expect(expectedPolicy1Row).toEqual(jasmine.objectContaining(values));
+ });
+
+ expect(componentUnderTest.truncated).toBeTruthy();
+ });
+ });
+