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
Copy file name to clipboardExpand all lines: guides/release/tutorial/part-1/automated-testing.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -125,7 +125,7 @@ If you watch really carefully, you can see our test robot roaming around our app
125
125
126
126
It happens really quickly though—blink and you might miss it! In fact, I had to slow this animation down by a hundred times just so you can see it inaction. I told you the robot has really, really fast hands!
127
127
128
-
As much as I enjoy watching this robot hard at work, the important thing here is that the test we wrote has _passed_, meaning everything is working exactly as we expect and the test UI is all green and happy. If you want, you can go to `index.hbs`, delete the `<LinkTo>` component and see what things look like when we have _a failing test_.
128
+
As much as I enjoy watching this robot hard at work, the important thing here is that the test we wrote has _passed_, meaning everything is working exactly as we expect and the test UI is all green and happy. If you want, you can go to `index.gjs`, delete the `<LinkTo>` component and see what things look like when we have _a failing test_.
The Super Rentals website is a delightful project created to explore Ember.
55
+
By building a property rental site, we can simultaneously imagine traveling
56
+
AND building Ember applications.
57
+
</p>
58
+
</div>
59
+
</template>
58
60
```
59
61
60
62
To see this in action, navigate to `http://localhost:4200/about`.
@@ -86,26 +88,28 @@ Router.map(function () {
86
88
87
89
Here, we added the `contact` route, but explicitly specified a path for the route. This allows us to keep the legacy URL, but use the new, shorter name for the route, as well as the template filename.
88
90
89
-
Speaking of the template, let's create that as well. We'll add a `app/templates/contact.hbs` file:
Ember comes with strong _conventions_ and sensible defaults—if we were starting from scratch, we wouldn't mind the default `/contact` URL. However, if the defaults don't work for us, it is no problem at all to customize Ember for our needs!
@@ -122,52 +126,64 @@ Since Ember offers great support for URLs out-of-the-box, we _could_ just link o
122
126
123
127
With Ember, we can do better than that! Instead of the plain-old `<a>` tag, Ember provides an alternative called `<LinkTo>`. For example, here is how you would use it on the pages we just created:
There is quite a bit going on here, so let's break it down.
169
185
170
-
`<LinkTo>` is an example of a _[component](../../../components/introducing-components/)_ in Ember—you can tell them apart from regular HTML tags because they start with an uppercase letter. Along with regular HTML tags, components are a key building block that we can use to build up an app's user interface.
186
+
`<LinkTo>` is an example of a _[component](../../../components/introducing-components/)_ in Ember. Along with regular HTML tags, components are a key building block that we can use to build up an app's user interface. Unlike regular HTML tags, components need to be imported before they can be used. In this case, `<LinkTo>` is imported from the `@ember/routing` package that is part of Ember.
171
187
172
188
We have a lot more to say about components later, but for now, you can think of them as a way to provide _custom tags_ to supplement the built-in ones that came with the browser.
0 commit comments