Skip to content

Commit

Permalink
Remove obsolete ember-cli-mirage setup
Browse files Browse the repository at this point in the history
  • Loading branch information
Turbo87 committed Jan 28, 2025
1 parent 1f1a7bc commit f89f950
Show file tree
Hide file tree
Showing 112 changed files with 13 additions and 6,438 deletions.
9 changes: 0 additions & 9 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,15 +107,6 @@ module.exports = {
},
},

// mirage files
{
files: ['mirage/**/*.js'],
rules: {
// disabled because of different `.find()` meaning
'unicorn/no-array-callback-reference': 'off',
},
},

// node files
{
files: [
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
files_ignore: |
app/**
e2e/**
mirage/**
packages/**
public/**
tests/**
.eslintrc
Expand Down
36 changes: 0 additions & 36 deletions app/initializers/ember-cli-mirage.js

This file was deleted.

2 changes: 0 additions & 2 deletions config/environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ module.exports = function (environment) {

if (environment === 'production') {
// here you can enable a production-specific feature
delete ENV['ember-cli-mirage'];

ENV.sentry = {
dsn: process.env.SENTRY_DSN_WEB,
};
Expand Down
2 changes: 1 addition & 1 deletion docs/ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ These files have to do with the frontend:
- `.ember-cli` - Settings for the `ember` command line interface
- `ember-cli-build.js` - Contains the build specification for Broccoli
- `.eslintrc.js` - Defines Javascript coding style guidelines (enforced during CI???)
- `mirage/` - A mock backend used during development and testing
- `packages/crates-io-msw` - A mock backend used for testing
- `node_modules/` - npm dependencies - (ignored in `.gitignore`)
- `package.json` - Defines the npm package and its dependencies
- `package-lock.json` - Locks dependencies to specific versions providing consistency across
Expand Down
18 changes: 6 additions & 12 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,18 +134,12 @@ To build and serve the frontend assets, use the command `pnpm start`. There
are variations on this command that change which backend your frontend tries to
talk to:

| Command | Backend | Use case |
| ----------------------------------------- | --------------------------------------------- | ------------------------------------------------------- |
| `pnpm start:live` | <https://crates.io> | Testing UI changes with the full live site's data |
| `pnpm start:staging` | <https://staging-crates-io.herokuapp.com> | Testing UI changes with a smaller set of realistic data |
| `pnpm start` | Static fixture test data in `mirage/fixtures` | Setting up particular situations, see note |
| `pnpm start:local` | Backend server running locally | See the Working on the backend section for setup |
| `pnpm start -- --proxy https://crates.io` | Whatever is specified in `--proxy` arg | If your use case is not covered here |

> Note: If you want to set up a particular situation, you can edit the fixture
> data used for tests in `mirage/fixtures`. The fixture data does not currently
> contain JSON needed to support every page, so some pages might not load
> correctly.
| Command | Backend | Use case |
| ----------------------------------------- | ----------------------------------------- | ------------------------------------------------------- |
| `pnpm start:live` | <https://crates.io> | Testing UI changes with the full live site's data |
| `pnpm start:staging` | <https://staging-crates-io.herokuapp.com> | Testing UI changes with a smaller set of realistic data |
| `pnpm start:local` | Backend server running locally | See the Working on the backend section for setup |
| `pnpm start -- --proxy https://crates.io` | Whatever is specified in `--proxy` arg | If your use case is not covered here |

#### Running the frontend tests

Expand Down
175 changes: 0 additions & 175 deletions e2e/fixtures/mirage.ts

This file was deleted.

10 changes: 0 additions & 10 deletions e2e/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { db, handlers } from '@crates-io/msw';

import * as pwFakeTimers from '@sinonjs/fake-timers';
import { FakeTimers, FakeTimersOptions } from './fixtures/fake-timers';
import { MiragePage } from './fixtures/mirage';
import { PercyPage } from './fixtures/percy';
import { A11yPage } from './fixtures/a11y';
import { EmberPage, EmberPageOptions } from './fixtures/ember';
Expand All @@ -17,7 +16,6 @@ export type AppOptions = {
};
export interface AppFixtures {
clock: FakeTimers;
mirage: MiragePage;
msw: {
worker: MockServiceWorker;
db: typeof db;
Expand Down Expand Up @@ -53,14 +51,6 @@ export const test = base.extend<AppOptions & AppFixtures>({
},
{ auto: true, scope: 'test' },
],
mirage: [
async ({ page }, use) => {
let mirage = new MiragePage(page);
await mirage.setup();
await use(mirage);
},
{ scope: 'test' },
],
// MockServiceWorker integration via `playwright-msw`.
//
// We are explicitly not using the `createWorkerFixture()`function, because
Expand Down
59 changes: 0 additions & 59 deletions mirage/config.js

This file was deleted.

21 changes: 0 additions & 21 deletions mirage/factories/api-token.js

This file was deleted.

Loading

0 comments on commit f89f950

Please sign in to comment.