chore: 🤖 add refreshRouteOnChange option to resource filters (#1289)

This commit is contained in:
Randall Morey authored and GitHub committed 2022-09-01 13:27:34 -04:00
1 parent 2614b311a1
commit 3ff89279e6
14 files changed
+92 -54

No files matched your search

@@ -1,2 +1,2 @@
<h2 id="title">Welcome to Ember</h2>
<p>{{relative-datetime-live this.now}}</p>
<h2 id='title'>Welcome to Ember</h2>
<p>{{relative-datetime-live this.now}}</p>
@@ -15,14 +15,22 @@ module('Integration | Component | pending-confirmations', function (hooks) {
<div class="pending">Pending</div>
</PendingConfirmations>
`);
assert.strictEqual(findAll('.pending').length, 0, 'No pending confirmations');
assert.strictEqual(
findAll('.pending').length,
0,
'No pending confirmations'
);
service.confirm();
await render(hbs`
<PendingConfirmations as |confirmations|>
<div class="pending">Pending</div>
</PendingConfirmations>
`);
assert.strictEqual(findAll('.pending').length, 1, 'One pending confirmations');
assert.strictEqual(
findAll('.pending').length,
1,
'One pending confirmations'
);
});
test('it exposes a confirm action that confirms the confirmation', async function (assert) {
@@ -11,6 +11,9 @@ module('Integration | Helper | format-date-iso', function (hooks) {
await render(hbs`{{format-date-iso inputValue}}`);
assert.strictEqual(this.element.textContent.trim(), '2020-01-01T00:00:00.999Z');
assert.strictEqual(
this.element.textContent.trim(),
'2020-01-01T00:00:00.999Z'
);
});
});
@@ -32,7 +32,10 @@ module('Unit | Authenticator | password', function (hooks) {
return new Response(200);
});
authenticator.restore(mockData);
assert.strictEqual(applicationAdapter.headers.Authorization, 'Bearer token1234');
assert.strictEqual(
applicationAdapter.headers.Authorization,
'Bearer token1234'
);
});
test('it adds an authorization header to application adapter on authenticate', async function (assert) {
@@ -18,9 +18,17 @@ module('Unit | Service | confirm', function (hooks) {
assert.expect(3);
const service = this.owner.lookup('service:confirm');
service.enabled = true;
assert.strictEqual(service.pending.length, 0, 'No pending confirmations yet');
assert.strictEqual(
service.pending.length,
0,
'No pending confirmations yet'
);
const confirmation = service.confirm();
assert.strictEqual(service.pending.length, 1, 'One pending confirmation created');
assert.strictEqual(
service.pending.length,
1,
'One pending confirmation created'
);
confirmation.confirm();
assert.strictEqual(service.pending.length, 0, 'Confirmation was confirmed');
});