Skip to content

Commit c7e555b

Browse files
committed
tests/acceptance/user-page: Migrate from mirage to @crates-io/msw
1 parent 7f7df71 commit c7e555b

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

tests/acceptance/user-page-test.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { visit } from '@ember/test-helpers';
22
import { module, test } from 'qunit';
33

4+
import { loadFixtures } from '@crates-io/msw/fixtures.js';
45
import percySnapshot from '@percy/ember';
56
import a11yAudit from 'ember-a11y-testing/test-support/audit';
67

@@ -9,10 +10,10 @@ import { setupApplicationTest } from 'crates-io/tests/helpers';
910
import axeConfig from '../axe-config';
1011

1112
module('Acceptance | user page', function (hooks) {
12-
setupApplicationTest(hooks);
13+
setupApplicationTest(hooks, { msw: true });
1314

1415
test('has user display', async function (assert) {
15-
this.server.loadFixtures();
16+
loadFixtures();
1617

1718
await visit('/users/thehydroimpulse');
1819

@@ -23,15 +24,15 @@ module('Acceptance | user page', function (hooks) {
2324
});
2425

2526
test('has link to github in user header', async function (assert) {
26-
this.server.loadFixtures();
27+
loadFixtures();
2728

2829
await visit('/users/thehydroimpulse');
2930

3031
assert.dom('[data-test-heading] [data-test-user-link]').hasAttribute('href', 'https://github.com/thehydroimpulse');
3132
});
3233

3334
test('user details has github profile icon', async function (assert) {
34-
this.server.loadFixtures();
35+
loadFixtures();
3536

3637
await visit('/users/thehydroimpulse');
3738

0 commit comments

Comments
 (0)