Lombiq/Helpful-Extensions

Shape Tracing should skip the PageTitle shape (OSOE-589)

sarahelsaig opened this issue · 7 comments

This is the shape that goes into the <title> HTML element. As far as I've seen the inner HTML of the <title> element is treated as plain text in every current browser, so the <!-- .... --> is rendered into the beginning of the window title.

image

The shape tracing should make an exception by skipping PageTitle shape for a better developer experience and easier UI testing setup.

Jira issue

Perhaps rather the shape tracing info needs to be added, but with a different position so it's not part of the title tag.

0liver commented

The following error occurred in OSOE-609:

error: title text cannot be longer than 70 characters (long-title) at f3d51ba8-d411-469e-8361-55c3415501c2.html:11:42:
   9 | IsCached: False
  10 | --&gt;
> 11 | Blog - Lombiq's OSOCE - UI Testing</title>
     |                                          ^
  12 |     <link type="image/x-icon" rel="shortcut icon" href="/favicon.ico">
  13 |
  14 |     <script src="/Lombiq.BaseTheme/vendors/bootstrap/js/bootstrap.bundle.js?v=SIYbLg8Kyb12W8RgxT7zwNAeUMfrfld1XpKbc_0Q1hE"></script>
Details: https://html-validate.org/rules/long-title.html

1 error found.

I don't understand why it doesn't appear for other page tests, but once this is fixed, we need to remove the workaround in test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/BehaviorVueTests.cs, line 69:

&& !error.ContainsOrdinalIgnoreCase("title text cannot be longer than 70 characters")

In any case, Shape Tracing shouldn't be enabled in a UI test that doesn't actually test Shape Tracing itself.

0liver commented

True.

If the title issue is fixed, Shape Tracing not being enabled in Lombiq.OSOCE.Tests.recipe.json (added in issue/OSOE-548) should be evaluated.