d2/e2etests
Stoica Alex a260068d2c
Add text-transform attribute to the style block
This provides an option to override the functionality provided by the
theme, or apply `text-transform` outside of the theme.

The functionality of the `text-transform` is as below:

- `text-transform: none` - will disable **any** transformation (like the uppercasing by `terminal` theme)
- `text-transform: uppercase` (uppercase not upper as per your message) - will force all characters into uppercase.
- `text-transform: lowercase` - will force all characters into lowercase.
- `text-transform: capitalize` - will uppercase the first letter of every word

In addition, this commit introduces:
- helper methods on the `d2graph.Style` struct to determine the type of
  `text-transform` to be applied.
- `ApplyTextTransform` method on the `d2graph.Attributes` which will
  transform the `Label.Value` to the correct text case.
2023-04-08 18:56:13 +01:00
..
report test paths are already absolute 2023-02-10 13:42:30 -08:00
testdata Add text-transform attribute to the style block 2023-04-08 18:56:13 +01:00
.gitignore oss 2022-11-03 06:54:49 -07:00
e2e_test.go revert 2023-03-29 09:54:38 -07:00
markdowntest.md oss 2022-11-03 06:54:49 -07:00
measured_test.go handle empty markdown for pre-measured 2023-03-09 16:55:34 -08:00
NOTICE.txt oss 2022-11-03 06:54:49 -07:00
patterns_test.go paper pattern 2023-03-20 19:08:56 -07:00
README.md d2ir: Review fixes #714 2023-01-27 23:45:04 -08:00
regression_test.go implement classes 2023-04-07 09:57:51 -07:00
root_test.go implement background styles 2023-02-26 16:23:51 -08:00
stable_test.go fix solo near 2023-04-08 10:07:56 -07:00
themes_test.go Add text-transform attribute to the style block 2023-04-08 18:56:13 +01:00
todo_test.go implement classes 2023-04-07 09:57:51 -07:00
unicode_test.go regenerate tests 2023-02-14 11:41:29 -08:00

e2etests

e2etests test the end-to-end flow of turning D2 scripts into a rendered diagram

Tests fall under 1 of 3 categories:

  1. Stable. Scripts which produce diagrams that never had issues this major release.
  2. Regressions. Scripts which used to have issues but no longer do. Each one should be linked to the PR which fixed it.
  3. Todos. Scripts which have an issue. If the issue prevents compile, skip: true can be set, otherwise the issue is visual. Each one should be linked to a Github Issue which describes it.

Upon a major release, Regressions are carried over to Stable.

If a change results in test diffs, you can run this script to generate a visual HTML report with the old vs new renders.

go run ./e2etests/report/main.go -delta
open ./e2etests/out/e2e_report.html