Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(internal): convert model and adapter tests to use diagnostic #9007

Merged
merged 3 commits into from
Oct 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ module.exports = {
'tests/ember-data__json-api/**',
'tests/ember-data__graph/**',
'tests/ember-data__request/**',
'tests/ember-data__adapter/**',
'tests/ember-data__model/**',
'tests/builders/**',
],
rules: {
Expand Down
2 changes: 1 addition & 1 deletion packages/diagnostic/server/default-setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export default async function launchDefault(overrides = {}) {
launchers: overrides.launchers ?? {
[BROWSER_TAG]: {
command: browser,
args: recommendedArgs(BROWSER_TAG),
args: recommendedArgs(BROWSER_TAG, overrides),
},
}
});
Expand Down
41 changes: 18 additions & 23 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 0 additions & 9 deletions tests/ember-data__adapter/.ember-cli

This file was deleted.

25 changes: 0 additions & 25 deletions tests/ember-data__adapter/.gitignore

This file was deleted.

5 changes: 0 additions & 5 deletions tests/ember-data__adapter/.template-lintrc.js

This file was deleted.

3 changes: 0 additions & 3 deletions tests/ember-data__adapter/.watchmanconfig

This file was deleted.

Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
3 changes: 3 additions & 0 deletions tests/ember-data__adapter/diagnostic.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import launch from '@warp-drive/diagnostic/server/default-setup.js';

await launch();
2 changes: 2 additions & 0 deletions tests/ember-data__adapter/ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const EmberApp = require('ember-cli/lib/broccoli/ember-app');

module.exports = function (defaults) {
let app = new EmberApp(defaults, {
tests: true,
// Add options here
});

Expand All @@ -21,6 +22,7 @@ module.exports = function (defaults) {
// modules that you would like to import into your application
// please specify an object with the list of modules as keys
// along with the exports of each module as its value.
app.import('node_modules/@warp-drive/diagnostic/dist/styles/dom-reporter.css');

return app.toTree();
};
16 changes: 8 additions & 8 deletions tests/ember-data__adapter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,9 @@
"test": "tests"
},
"scripts": {
"build": "ember build",
"lint:hbs": "ember-template-lint .",
"lint:js": "eslint --config ../../.eslintrc.js --ignore-path ../../.eslintignore .",
"start": "ember serve",
"test": "ember test --test-port=0"
"build": "ember build --output-path=dist-test --suppress-sizes",
"test": "pnpm build && bun ./diagnostic.js",
"test:production": "pnpm build -e production; bun ./diagnostic.js"
},
"dependenciesMeta": {
"@ember-data/debug": {
Expand Down Expand Up @@ -54,6 +52,9 @@
},
"@ember-data/unpublished-test-infra": {
"injected": true
},
"@warp-drive/diagnostic": {
"injected": true
}
},
"dependencies": {
Expand All @@ -70,6 +71,7 @@
"@ember-data/store": "workspace:5.5.0-alpha.11",
"@ember-data/tracking": "workspace:5.5.0-alpha.11",
"@ember-data/unpublished-test-infra": "workspace:5.5.0-alpha.11",
"@warp-drive/diagnostic": "workspace:5.5.0-alpha.11",
"@ember/optional-features": "^2.0.0",
"@ember/string": "3.1.1",
"@ember/test-helpers": "^3.2.0",
Expand All @@ -82,15 +84,13 @@
"ember-cli-dependency-checker": "^3.3.2",
"ember-cli-htmlbars": "^6.3.0",
"ember-cli-inject-live-reload": "^2.1.0",
"ember-cli-test-loader": "^3.1.0",
"ember-inflector": "^4.0.2",
"ember-load-initializers": "^2.1.2",
"ember-maybe-import-regenerator": "^1.0.0",
"ember-qunit": "^8.0.1",
"ember-resolver": "^11.0.1",
"ember-source": "~5.3.0",
"loader.js": "^4.7.0",
"qunit": "^2.20.0",
"qunit-dom": "^3.0.0",
"webpack": "^5.89.0"
},
"engines": {
Expand Down
3 changes: 0 additions & 3 deletions tests/ember-data__adapter/public/robots.txt

This file was deleted.

30 changes: 0 additions & 30 deletions tests/ember-data__adapter/testem.js

This file was deleted.

Empty file.
10 changes: 3 additions & 7 deletions tests/ember-data__adapter/tests/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

<link rel="stylesheet" href="{{ rootURL }}assets/vendor.css" />
<link rel="stylesheet" href="{{ rootURL }}assets/ember-data__adapter.css" />
<link rel="stylesheet" href="{{ rootURL }}assets/test-support.css" />

{{content-for "head-footer"}}
{{content-for "test-head-footer"}}
Expand All @@ -21,14 +20,11 @@
{{content-for "body"}}
{{content-for "test-body"}}

<div id="qunit"></div>
<div id="qunit-fixture">
<div id="ember-testing-container">
<div id="ember-testing"></div>
</div>
<div id="warp-drive__diagnostic"></div>
<div id="warp-drive__diagnostic-fixture">
<div id="ember-testing"></div>
</div>

<script src="/testem.js" integrity=""></script>
<script src="{{ rootURL }}assets/vendor.js"></script>
<script src="{{ rootURL }}assets/test-support.js"></script>
<script src="{{ rootURL }}assets/ember-data__adapter.js"></script>
Expand Down
Empty file.
Loading
Loading