Skip to content

Commit f8d948b

Browse files
gkalpakatscott
authored andcommitted
docs: fix live examples in testing guides (angular#38038)
In angular#37957, parts of the testing guide were broken out into separate guides. As part of that work, the `<live-example>` tags were also copied to the new guides. These `<live-example>` tags did not specify the targeted example project via the `name` attribute, thus they were implicitly targeting the example with the same name as the guide they were in. See the [Docs style guide][1] for more info. However, there is only one example project (`testing/`) and all `<live-example>` tags were supposed to target that. This worked fine on the `testing.md` guide, but it broke on other guides (which tried to target non-existing example projects based on their names). This commit fixes it by explicitly specifying which example is targeted by the `<live-example>` tags. It also removes the `embedded-style` attribute that has no effect. [1]: https://angular.io/guide/docs-style-guide#live-examples Fixes angular#38036 PR Close angular#38038
1 parent 9cf78d5 commit f8d948b

File tree

8 files changed

+15
-15
lines changed

8 files changed

+15
-15
lines changed

aio/content/guide/test-debugging.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ If your tests aren't working as you expect them to, you can inspect and debug th
44

55
<div class="alert is-helpful">
66

7-
For the sample app that the testing guides describe, see the <live-example embedded-style noDownload>sample app</live-example>.
7+
For the sample app that the testing guides describe, see the <live-example name="testing" embedded-style noDownload>sample app</live-example>.
88

9-
For the tests features in the testing guides, see <live-example stackblitz="specs" noDownload>tests</live-example>.
9+
For the tests features in the testing guides, see <live-example name="testing" stackblitz="specs" noDownload>tests</live-example>.
1010

1111
</div>
1212

aio/content/guide/testing-attribute-directives.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ Its name reflects the way the directive is applied: as an attribute on a host el
88

99
<div class="alert is-helpful">
1010

11-
For the sample app that the testing guides describe, see the <live-example embedded-style noDownload>sample app</live-example>.
11+
For the sample app that the testing guides describe, see the <live-example name="testing" embedded-style noDownload>sample app</live-example>.
1212

13-
For the tests features in the testing guides, see <live-example stackblitz="specs" noDownload>tests</live-example>.
13+
For the tests features in the testing guides, see <live-example name="testing" stackblitz="specs" noDownload>tests</live-example>.
1414

1515
</div>
1616

aio/content/guide/testing-code-coverage.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ Code coverage reports show you any parts of your code base that may not be prope
77

88
<div class="alert is-helpful">
99

10-
For the sample app that the testing guides describe, see the <live-example embedded-style noDownload>sample app</live-example>.
10+
For the sample app that the testing guides describe, see the <live-example name="testing" embedded-style noDownload>sample app</live-example>.
1111

12-
For the tests features in the testing guides, see <live-example stackblitz="specs" noDownload>tests</live-example>.
12+
For the tests features in the testing guides, see <live-example name="testing" stackblitz="specs" noDownload>tests</live-example>.
1313

1414
</div>
1515

aio/content/guide/testing-components-basics.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ can validate much of the component's behavior in an easier, more obvious way.
1515

1616
<div class="alert is-helpful">
1717

18-
For the sample app that the testing guides describe, see the <live-example embedded-style noDownload>sample app</live-example>.
18+
For the sample app that the testing guides describe, see the <live-example name="testing" embedded-style noDownload>sample app</live-example>.
1919

20-
For the tests features in the testing guides, see <live-example stackblitz="specs" noDownload>tests</live-example>.
20+
For the tests features in the testing guides, see <live-example name="testing" stackblitz="specs" noDownload>tests</live-example>.
2121

2222
</div>
2323

aio/content/guide/testing-components-scenarios.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ This guide explores common component testing use cases.
44

55
<div class="alert is-helpful">
66

7-
For the sample app that the testing guides describe, see the <live-example embedded-style noDownload>sample app</live-example>.
7+
For the sample app that the testing guides describe, see the <live-example name="testing" embedded-style noDownload>sample app</live-example>.
88

9-
For the tests features in the testing guides, see <live-example stackblitz="specs" noDownload>tests</live-example>.
9+
For the tests features in the testing guides, see <live-example name="testing" stackblitz="specs" noDownload>tests</live-example>.
1010

1111
</div>
1212

aio/content/guide/testing-pipes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ You can test [pipes](guide/pipes) without the Angular testing utilities.
44

55
<div class="alert is-helpful">
66

7-
For the sample app that the testing guides describe, see the <live-example embedded-style noDownload>sample app</live-example>.
7+
For the sample app that the testing guides describe, see the <live-example name="testing" embedded-style noDownload>sample app</live-example>.
88

9-
For the tests features in the testing guides, see <live-example stackblitz="specs" noDownload>tests</live-example>.
9+
For the tests features in the testing guides, see <live-example name="testing" stackblitz="specs" noDownload>tests</live-example>.
1010

1111
</div>
1212

aio/content/guide/testing-services.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ To check that your services are working as you intend, you can write tests speci
55

66
<div class="alert is-helpful">
77

8-
For the sample app that the testing guides describe, see the <live-example embedded-style noDownload>sample app</live-example>.
8+
For the sample app that the testing guides describe, see the <live-example name="testing" embedded-style noDownload>sample app</live-example>.
99

10-
For the tests features in the testing guides, see <live-example stackblitz="specs" noDownload>tests</live-example>.
10+
For the tests features in the testing guides, see <live-example name="testing" stackblitz="specs" noDownload>tests</live-example>.
1111

1212
</div>
1313

aio/content/guide/testing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ This sample application is much like the one in the [_Tour of Heroes_ tutorial](
2121

2222
<div class="alert is-helpful">
2323

24-
For the sample app that the testing guides describe, see the <live-example embedded-style noDownload>sample app</live-example>.
24+
For the sample app that the testing guides describe, see the <live-example noDownload>sample app</live-example>.
2525

2626
For the tests features in the testing guides, see <live-example stackblitz="specs" noDownload>tests</live-example>.
2727

0 commit comments

Comments
 (0)