Skip to content

Commit 236021d

Browse files
github-actions[bot]ember-tomsterMinThaMiechancancode
authored
Tutorial Updates (#1801)
* [CRON] Thursday Mar 31, 2022 --- Commit: ember-learn/super-rentals-tutorial@723f119 Script: https://github.com/ember-learn/super-rentals-tutorial/blob/723f119fe77897630639c14d0fdd79a089a9043b/.github/workflows/build.yml Logs: https://github.com/ember-learn/super-rentals-tutorial/commit/723f119fe77897630639c14d0fdd79a089a9043b/checks * [CRON] Friday Apr 08, 2022 --- Commit: ember-learn/super-rentals-tutorial@723f119 Script: https://github.com/ember-learn/super-rentals-tutorial/blob/723f119fe77897630639c14d0fdd79a089a9043b/.github/workflows/build.yml Logs: https://github.com/ember-learn/super-rentals-tutorial/commit/723f119fe77897630639c14d0fdd79a089a9043b/checks * Fix generated import paths for test setup functions (#211) --- Commit: ember-learn/super-rentals-tutorial@9ced827 Script: https://github.com/ember-learn/super-rentals-tutorial/blob/9ced827dfaeddc8a923f8b579edfd5e97455b784/.github/workflows/build.yml Logs: https://github.com/ember-learn/super-rentals-tutorial/commit/9ced827dfaeddc8a923f8b579edfd5e97455b784/checks * [CRON] Thursday Jul 21, 2022 --- Commit: ember-learn/super-rentals-tutorial@9ced827 Script: https://github.com/ember-learn/super-rentals-tutorial/blob/9ced827dfaeddc8a923f8b579edfd5e97455b784/.github/workflows/build.yml Logs: https://github.com/ember-learn/super-rentals-tutorial/commit/9ced827dfaeddc8a923f8b579edfd5e97455b784/checks * Remove useless image diffs * [CRON] Friday Jul 22, 2022 --- Commit: ember-learn/super-rentals-tutorial@9ced827 Script: https://github.com/ember-learn/super-rentals-tutorial/blob/9ced827dfaeddc8a923f8b579edfd5e97455b784/.github/workflows/build.yml Logs: https://github.com/ember-learn/super-rentals-tutorial/commit/9ced827dfaeddc8a923f8b579edfd5e97455b784/checks * Remove useless image diffs Co-authored-by: Tomster <[email protected]> Co-authored-by: Anne-Greeth van Herwijnen <[email protected]> Co-authored-by: Godfrey Chan <[email protected]>
1 parent b181800 commit 236021d

12 files changed

+27
-31
lines changed

guides/release/tutorial/part-1/automated-testing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Let's open the generated test file and replace the boilerplate test with our own
6363
import { module, test } from 'qunit';
6464
import { visit, currentURL } from '@ember/test-helpers';
6565
import { click, visit, currentURL } from '@ember/test-helpers';
66-
import { setupApplicationTest } from 'ember-qunit';
66+
import { setupApplicationTest } from 'super-rentals/tests/helpers';
6767

6868
module('Acceptance | super rentals', function (hooks) {
6969
setupApplicationTest(hooks);
@@ -136,7 +136,7 @@ Let's practice what we learned by adding tests for the remaining pages:
136136
```js { data-filename="tests/acceptance/super-rentals-test.js" data-diff="+19,+20,+21,+22,+23,+24,+25,+26,+27,+28,+29,+30,+31,+32,+33,+34,+35,+36,+37,+38,+39,+40,+41,+42" }
137137
import { module, test } from 'qunit';
138138
import { click, visit, currentURL } from '@ember/test-helpers';
139-
import { setupApplicationTest } from 'ember-qunit';
139+
import { setupApplicationTest } from 'super-rentals/tests/helpers';
140140
141141
module('Acceptance | super rentals', function (hooks) {
142142
setupApplicationTest(hooks);

guides/release/tutorial/part-1/building-pages.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ With that, our second page is done!
6767

6868
We're on a roll! While we're at it, let's add our third page. This time, things are a little bit different. Everyone at the company calls this the "contact" page. However, the old website we are replacing already has a similar page, which is served at the legacy URL `/getting-in-touch`.
6969

70-
We want to keep the existing URLs for the new website, but we don't want to have to type `getting-in-touch` all over the new codebase! Fortunately, we can have the best of the both worlds:
70+
We want to keep the existing URLs for the new website, but we don't want to have to type `getting-in-touch` all over the new codebase! Fortunately, we can have the best of both worlds:
7171

7272
```js { data-filename="app/router.js" data-diff="+11" }
7373
import EmberRouter from '@ember/routing/router';

guides/release/tutorial/part-1/component-basics.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ Let's replace the boilerplate code that was generated for us with our own test:
143143
144144
```js { data-filename="tests/integration/components/jumbo-test.js" data-diff="-9,-10,-11,+12,+13,-15,-16,-17,-18,-19,-20,-21,-22,-23,-24,-25,-26,+27,+28,+29" }
145145
import { module, test } from 'qunit';
146-
import { setupRenderingTest } from 'ember-qunit';
146+
import { setupRenderingTest } from 'super-rentals/tests/helpers';
147147
import { render } from '@ember/test-helpers';
148148
import { hbs } from 'ember-cli-htmlbars';
149149
@@ -269,7 +269,7 @@ But what kind of test? We _could_ write a component test for the `<NavBar>` by i
269269
```js { data-filename="tests/acceptance/super-rentals-test.js" data-diff="+12,+13,+26,+27,+40,+41,+49,+50,+51,+52,+53,+54,+55,+56,+57,+58,+59,+60,+61,+62,+63,+64,+65,+66" }
270270
import { module, test } from 'qunit';
271271
import { click, visit, currentURL } from '@ember/test-helpers';
272-
import { setupApplicationTest } from 'ember-qunit';
272+
import { setupApplicationTest } from 'super-rentals/tests/helpers';
273273

274274
module('Acceptance | super rentals', function (hooks) {
275275
setupApplicationTest(hooks);

guides/release/tutorial/part-1/interactive-components.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ Finally, let's write a test for this new behavior:
209209

210210
```js { data-filename="tests/integration/components/rental/image-test.js" data-diff="-3,+4,+24,+25,+26,+27,+28,+29,+30,+31,+32,+33,+34,+35,+36,+37,+38,+39,+40,+41,+42,+43,+44,+45,+46,+47" }
211211
import { module, test } from 'qunit';
212-
import { setupRenderingTest } from 'ember-qunit';
212+
import { setupRenderingTest } from 'super-rentals/tests/helpers';
213213
import { render } from '@ember/test-helpers';
214214
import { render, click } from '@ember/test-helpers';
215215
import { hbs } from 'ember-cli-htmlbars';

guides/release/tutorial/part-1/more-about-components.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Then, we will write a test to ensure all of the details are present. We will rep
5454

5555
```js { data-filename="tests/integration/components/rental-test.js" data-diff="-9,-10,-11,-12,+13,-16,-17,-18,-19,-20,-21,-22,-23,-24,-25,+26,+27,+28,+29,+30,+31" }
5656
import { module, test } from 'qunit';
57-
import { setupRenderingTest } from 'ember-qunit';
57+
import { setupRenderingTest } from 'super-rentals/tests/helpers';
5858
import { render } from '@ember/test-helpers';
5959
import { hbs } from 'ember-cli-htmlbars';
6060

@@ -183,7 +183,7 @@ Let's write a test for our new component!
183183

184184
```js { data-filename="tests/integration/components/rental/image-test.js" data-diff="-9,-10,-11,-12,-13,-14,-15,-16,-17,+18,-20,-21,-22,+23,+24,+25,+26,-29,+30,+31,+32,+33,+34" }
185185
import { module, test } from 'qunit';
186-
import { setupRenderingTest } from 'ember-qunit';
186+
import { setupRenderingTest } from 'super-rentals/tests/helpers';
187187
import { render } from '@ember/test-helpers';
188188
import { hbs } from 'ember-cli-htmlbars';
189189
@@ -226,7 +226,7 @@ Finally, we should also update the tests for the `<Rental>` component to confirm
226226

227227
```js { data-filename="tests/integration/components/rental-test.js" data-diff="+18" }
228228
import { module, test } from 'qunit';
229-
import { setupRenderingTest } from 'ember-qunit';
229+
import { setupRenderingTest } from 'super-rentals/tests/helpers';
230230
import { render } from '@ember/test-helpers';
231231
import { hbs } from 'ember-cli-htmlbars';
232232

guides/release/tutorial/part-1/orientation.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ To verify that your installation was successful, run:
2424

2525
```shell
2626
$ ember --version
27-
ember-cli: 4.2.0
27+
ember-cli: 4.5.0
2828
node: 14.19.1
2929
os: linux x64
3030
```
@@ -38,7 +38,7 @@ We can create a new project using Ember CLI's `new` command. It follows the patt
3838
```shell
3939
$ ember new super-rentals --lang en
4040
installing app
41-
Ember CLI v4.2.0
41+
Ember CLI v4.5.0
4242

4343
Creating a new Ember app in /home/runner/work/super-rentals-tutorial/super-rentals-tutorial/dist/code/super-rentals:
4444
create .editorconfig
@@ -70,7 +70,7 @@ Creating a new Ember app in /home/runner/work/super-rentals-tutorial/super-renta
7070
create package.json
7171
create public/robots.txt
7272
create testem.js
73-
create tests/helpers/.gitkeep
73+
create tests/helpers/index.js
7474
create tests/index.html
7575
create tests/integration/.gitkeep
7676
create tests/test-helper.js
@@ -133,7 +133,7 @@ super-rentals
133133
│ └── robots.txt
134134
├── tests
135135
│ ├── helpers
136-
│ │ └── .gitkeep
136+
│ │ └── index.js
137137
│ ├── integration
138138
│ │ └── .gitkeep
139139
│ ├── unit

guides/release/tutorial/part-1/reusable-components.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ If you're curious, you can explore the options available on Mapbox by using the
2424

2525
Once you have signed up for the service, grab your _[default public token](https://account.mapbox.com/access-tokens/)_ and paste it into `config/environment.js`:
2626

27-
```js { data-filename="config/environment.js" data-diff="+51,+52" }
27+
```js { data-filename="config/environment.js" data-diff="+47,+48" }
2828
'use strict';
2929

3030
module.exports = function (environment) {
@@ -39,10 +39,6 @@ module.exports = function (environment) {
3939
// Here you can enable experimental features on an ember canary build
4040
// e.g. EMBER_NATIVE_DECORATOR_SUPPORT: true
4141
},
42-
EXTEND_PROTOTYPES: {
43-
// Prevent Ember Data from overriding Date.parse.
44-
Date: false,
45-
},
4642
},
4743

4844
APP: {
@@ -197,7 +193,7 @@ We just added a lot of behavior into a single component, so let's write some tes
197193

198194
```js { data-filename="tests/integration/components/map-test.js" data-diff="-3,+4,+6,-11,-12,-13,+14,+15,+16,+17,+18,+19,+20,+21,-23,+24,+25,+26,+27,+28,+29,+30,-32,+33,+34,-36,-37,-38,-39,-40,-41,+42,+43,+44,+45,-47,+48,+49,+50,+51,+52,+53,+54,+55,+56,+57,+58,+59,+60,+61,+62,+63,+64,+65,+66,+67,+68,+69,+70,+71,+72,+73,+74,+75,+76,+77,+78,+79,+80,+81,+82,+83,+84,+85,+86,+87,+88,+89,+90,+91,+92,+93" }
199195
import { module, test } from 'qunit';
200-
import { setupRenderingTest } from 'ember-qunit';
196+
import { setupRenderingTest } from 'super-rentals/tests/helpers';
201197
import { render } from '@ember/test-helpers';
202198
import { render, find } from '@ember/test-helpers';
203199
import { hbs } from 'ember-cli-htmlbars';
@@ -355,7 +351,7 @@ For good measure, we will also add an assertion to the `<Rental>` tests to make
355351
356352
```js { data-filename="tests/integration/components/rental-test.js" data-diff="+19" }
357353
import { module, test } from 'qunit';
358-
import { setupRenderingTest } from 'ember-qunit';
354+
import { setupRenderingTest } from 'super-rentals/tests/helpers';
359355
import { render } from '@ember/test-helpers';
360356
import { hbs } from 'ember-cli-htmlbars';
361357
@@ -446,7 +442,7 @@ Just to be sure, we can add a test for this behavior:
446442
447443
```js { data-filename="tests/integration/components/map-test.js" data-diff="+51,+52,+53,+54,+55,+56,+57,+58,+59,+60,+61,+62,+63,+64,+65,+66,+67,+68,+69,+70,+71,+72,+73,+74,+75,+76,+77,+78,+79,+80,+81,+82,+83,+84,+85,+86,+87,+88,+89,+90,+91,+92,+93,+94,+95,+96,+97,+98,+99,+100,+101,+102,+103,+104,+105,+106,+107,+108,+109,+110,+111" }
448444
import { module, test } from 'qunit';
449-
import { setupRenderingTest } from 'ember-qunit';
445+
import { setupRenderingTest } from 'super-rentals/tests/helpers';
450446
import { render, find } from '@ember/test-helpers';
451447
import { hbs } from 'ember-cli-htmlbars';
452448
import ENV from 'super-rentals/config/environment';

guides/release/tutorial/part-1/working-with-data.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ Therefore, in our `<Rental>` component's test, we will have to feed the data int
174174

175175
```js { data-filename="tests/integration/components/rental-test.js" data-diff="-10,+11,+12,+13,+14,+15,+16,+17,+18,+19,+20,+21,+22,+23,+24,+25,+26,+27,+28,+29,+30" }
176176
import { module, test } from 'qunit';
177-
import { setupRenderingTest } from 'ember-qunit';
177+
import { setupRenderingTest } from 'super-rentals/tests/helpers';
178178
import { render } from '@ember/test-helpers';
179179
import { hbs } from 'ember-cli-htmlbars';
180180

guides/release/tutorial/part-2/ember-data.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ The generator created some boilerplate code for us, which serves as a pretty goo
165165

166166
```js { data-filename="tests/unit/models/rental-test.js" data-diff="-7,-8,+9,-11,-12,+13,+14,+15,+16,+17,+18,+19,+20,+21,+22,+23,+24,+25,+26,+27,+28,+29,+30,+31,+32,+33,+34,+35,+36,+37,+38,+39,+40,+41,+42" }
167167
import { module, test } from 'qunit';
168-
import { setupTest } from 'ember-qunit';
168+
import { setupTest } from 'super-rentals/tests/helpers';
169169

170170
module('Unit | Model | rental', function (hooks) {
171171
setupTest(hooks);

guides/release/tutorial/part-2/provider-components.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ Now that we've finished our refactor and tried it out in the UI, let's write a t
107107

108108
```js { data-filename="tests/integration/components/rentals-test.js" }
109109
import { module, test } from 'qunit';
110-
import { setupRenderingTest } from 'ember-qunit';
110+
import { setupRenderingTest } from 'super-rentals/tests/helpers';
111111
import { render } from '@ember/test-helpers';
112112
import { hbs } from 'ember-cli-htmlbars';
113113

@@ -336,7 +336,7 @@ Hooray, it works! Awesome. Now that we've tried this out manually in the UI, let
336336

337337
```js { data-filename="tests/integration/components/rentals-test.js" data-diff="-3,+4,-10,+11,+67,+69,+90,+91,+92,+93,+94,+95,+96,+97,+98,+99,+100,+101,+102,+103,+104,+105,+106,+107,+108" }
338338
import { module, test } from 'qunit';
339-
import { setupRenderingTest } from 'ember-qunit';
339+
import { setupRenderingTest } from 'super-rentals/tests/helpers';
340340
import { render } from '@ember/test-helpers';
341341
import { render, fillIn } from '@ember/test-helpers';
342342
import { hbs } from 'ember-cli-htmlbars';

guides/release/tutorial/part-2/route-params.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ Alright, we have just one more step left here: updating the tests. We can add an
129129

130130
```js { data-filename="tests/integration/components/rental-test.js" data-diff="+12,+34,+35,+36" }
131131
import { module, test } from 'qunit';
132-
import { setupRenderingTest } from 'ember-qunit';
132+
import { setupRenderingTest } from 'super-rentals/tests/helpers';
133133
import { render } from '@ember/test-helpers';
134134
import { hbs } from 'ember-cli-htmlbars';
135135

@@ -291,7 +291,7 @@ Now that we have this template in place, we can add some tests for this new comp
291291

292292
```handlebars { data-filename="tests/integration/components/rental/detailed-test.js" data-diff="-9,-10,-11,+12,+13,+14,+15,+16,+17,+18,+19,+20,+21,+22,+23,+24,+25,+26,+27,+28,+29,+30,+31,+32,-34,+35,+36,-38,+39,+40,+41,+42,+43,+44,+45,-47,-48,-49,-50,-51,-52,+53,+54,-56,+57,+58,+59,+60,+61,+62,+63,+64" }
293293
import { module, test } from 'qunit';
294-
import { setupRenderingTest } from 'ember-qunit';
294+
import { setupRenderingTest } from 'super-rentals/tests/helpers';
295295
import { render } from '@ember/test-helpers';
296296
import { hbs } from 'ember-cli-htmlbars';
297297
@@ -385,7 +385,7 @@ Finally, let's add a `rental` template to actually _invoke_ our `<Rental::Detail
385385
```js { data-filename="tests/acceptance/super-rentals-test.js" data-diff="+22,+23,+24,+25,+26,+27,+28,+29,+30,+31,+32,+33,+34,+35,+36,+37,+38,+39" }
386386
import { module, test } from 'qunit';
387387
import { click, visit, currentURL } from '@ember/test-helpers';
388-
import { setupApplicationTest } from 'ember-qunit';
388+
import { setupApplicationTest } from 'super-rentals/tests/helpers';
389389

390390
module('Acceptance | super rentals', function (hooks) {
391391
setupApplicationTest(hooks);

guides/release/tutorial/part-2/service-injection.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ To be sure, let's add some tests! Let's start with an acceptance test:
194194
import { module, test } from 'qunit';
195195
import { click, visit, currentURL } from '@ember/test-helpers';
196196
import { click, find, visit, currentURL } from '@ember/test-helpers';
197-
import { setupApplicationTest } from 'ember-qunit';
197+
import { setupApplicationTest } from 'super-rentals/tests/helpers';
198198

199199
module('Acceptance | super rentals', function (hooks) {
200200
setupApplicationTest(hooks);
@@ -384,7 +384,7 @@ We will take advantage of this capability in our component test:
384384

385385
```js { data-filename="tests/integration/components/share-button-test.js" data-diff="+3,-7,-8,+9,+10,+11,+12,-14,-15,-16,+17,+18,+19,+20,+21,-23,+24,+25,-27,+28,+29,+30,-32,-33,-34,-35,-36,-37,+38,+39,-41,+42,+43,+44,+45,+46,+47,+48,+49,+50,+51,+52" }
386386
import { module, test } from 'qunit';
387-
import { setupRenderingTest } from 'ember-qunit';
387+
import { setupRenderingTest } from 'super-rentals/tests/helpers';
388388
import Service from '@ember/service';
389389
import { render } from '@ember/test-helpers';
390390
import { hbs } from 'ember-cli-htmlbars';
@@ -449,7 +449,7 @@ While we are here, let's add some more tests for the various functionalities of
449449
450450
```js { data-filename="tests/integration/components/share-button-test.js" data-diff="-4,+5,+24,+25,+26,+27,+28,+29,-39,-40,-41,-42,+43,+47,+48,+49,+50,+51,+52,+53,+54,+55,+56,+57,+58,+59,+60,+61,+62,+63,+64,+65,+66,+67,+68,+69,+70,+71,+72,+73,+74,+75,+76,+77,+78,+79,+80,+81,+82,+83,+84,+85,+86,+87,+88,+89,+90,+91,+92,+93,+94" }
451451
import { module, test } from 'qunit';
452-
import { setupRenderingTest } from 'ember-qunit';
452+
import { setupRenderingTest } from 'super-rentals/tests/helpers';
453453
import Service from '@ember/service';
454454
import { render } from '@ember/test-helpers';
455455
import { find, render } from '@ember/test-helpers';

0 commit comments

Comments
 (0)