You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cover the compiling service and recover the search-results template's coverage #7726
The template is another instance of #7458, and this one is worth documenting because it looks like the opposite. The existing describe uses TestBed.overrideComponent, and it does render and assert on the DOM — it checks texera-list-item counts, .card-entry nodes, and load-more visibility. Yet the template measures 0 of 33 lines, 0 of 6 branches, 0 of 6 functions. Rendering happens; nothing is attributed. A second fingerprint: under the override the whole template function is attributed to the .ts file as one uncovered span.
The remedy is the one merged in #7535, #7627, #7629, #7661 and #7681 — append a describe with its own TestBed, no override, real children, DOM-only assertions, leaving the existing tests and their stubs untouched.
Traps worth knowing before writing anything here:
A one-sided template read pins half a binding.[currentUid]="currentUid" replaced by entry.ownerId survives unless two entries have different owners and the assertion re-points the current user. Same shape for any [x]="y" where the fixture makes x and y coincide.
A TypeScript narrowing error is not a kill. Exchanging the success/failure legs of the compile response fails to compile under strictTemplates; that proves nothing and must be replaced with a semantic mutation. Likewise, dropping a && guard Angular relies on for narrowing needs a companion non-null assertion so the mutant still compiles and the behaviour is what changes.
Two branches here cannot be covered.if (!dynamicSchema) return undefined is dead — DynamicSchemaService.getDynamicSchema() returns a non-nullable OperatorSchema and throws on a miss. And if (schemas.length > 0) sits inside if (linksToThisPort.length > 0) where schemas is that array mapped, so the false leg cannot occur.
Activity
test(frontend): cover the compiling service and the search-results te…