diff --git a/.github/workflows/deprecations-check.yml b/.github/workflows/deprecations-check.yml index 762e85691f..f4386f2509 100644 --- a/.github/workflows/deprecations-check.yml +++ b/.github/workflows/deprecations-check.yml @@ -20,11 +20,6 @@ jobs: CI: true ASSERT_ALL_DEPRECATIONS: true run: pnpm test - - name: Encapsulation tests - env: - CI: true - ASSERT_ALL_DEPRECATIONS: true - run: pnpm test:encapsulation test-all-deprecations-releases: strategy: diff --git a/.github/workflows/encapsulation-tests.yml b/.github/workflows/encapsulation-tests.yml deleted file mode 100644 index a5413bda58..0000000000 --- a/.github/workflows/encapsulation-tests.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Contract - -on: - pull_request: - branches: - - main - -concurrency: - group: encapsulation-${{ github.head_ref || github.ref_name }} - cancel-in-progress: true - -jobs: - test: - timeout-minutes: 5 - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4 - - uses: ./.github/actions/setup - with: - restore-broccoli-cache: true - install: true - - name: Run Tests - run: pnpm test:encapsulation diff --git a/package.json b/package.json index 26cc2347a5..200d398c5e 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,6 @@ "test:production": "pnpm --filter main-test-app --filter ember-data__graph --filter ember-data__json-api run test -e production", "test:try-one": "pnpm --filter main-test-app run test:try-one", "test:docs": "pnpm build:docs && pnpm --filter docs-tests test", - "test:encapsulation": "pnpm --filter '*-encapsulation-test-app' run test", "test:fastboot": "pnpm --filter fastboot-test-app test", "test:embroider": "pnpm --filter embroider-basic-compat test", "test:infra": "pnpm --filter @ember-data/unpublished-test-infra test", diff --git a/tests/debug-encapsulation/.ember-cli b/tests/debug-encapsulation/.ember-cli deleted file mode 100644 index ee64cfed2a..0000000000 --- a/tests/debug-encapsulation/.ember-cli +++ /dev/null @@ -1,9 +0,0 @@ -{ - /** - Ember CLI sends analytics information by default. The data is completely - anonymous, but there are times when you might want to disable this behavior. - - Setting `disableAnalytics` to true will prevent any data from being sent. - */ - "disableAnalytics": false -} diff --git a/tests/debug-encapsulation/.gitignore b/tests/debug-encapsulation/.gitignore deleted file mode 100644 index c40a1b2aba..0000000000 --- a/tests/debug-encapsulation/.gitignore +++ /dev/null @@ -1,25 +0,0 @@ -# See https://help.github.com/ignore-files/ for more about ignoring files. - -# compiled output -/dist/ -/tmp/ - -# dependencies -/bower_components/ -/node_modules/ - -# misc -/.env* -/.pnp* -/.sass-cache -/connect.lock -/coverage/ -/libpeerconnection.log -/npm-debug.log* -/testem.log -/yarn-error.log - -# ember-try -/.node_modules.ember-try/ -/bower.json.ember-try -/package.json.ember-try diff --git a/tests/debug-encapsulation/.template-lintrc.js b/tests/debug-encapsulation/.template-lintrc.js deleted file mode 100644 index f35f61c7b3..0000000000 --- a/tests/debug-encapsulation/.template-lintrc.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict'; - -module.exports = { - extends: 'recommended', -}; diff --git a/tests/debug-encapsulation/.watchmanconfig b/tests/debug-encapsulation/.watchmanconfig deleted file mode 100644 index e7834e3e4f..0000000000 --- a/tests/debug-encapsulation/.watchmanconfig +++ /dev/null @@ -1,3 +0,0 @@ -{ - "ignore_dirs": ["tmp", "dist"] -} diff --git a/tests/debug-encapsulation/README.md b/tests/debug-encapsulation/README.md deleted file mode 100644 index 450c917cc8..0000000000 --- a/tests/debug-encapsulation/README.md +++ /dev/null @@ -1,57 +0,0 @@ -# encapsulation-test-app - -This README outlines the details of collaborating on this Ember application. -A short introduction of this app could easily go here. - -## Prerequisites - -You will need the following things properly installed on your computer. - -* [Git](https://git-scm.com/) -* [Node.js](https://nodejs.org/) (with npm) -* [Ember CLI](https://ember-cli.com/) -* [Google Chrome](https://google.com/chrome/) - -## Installation - -* `git clone ` this repository -* `cd encapsulation-test-app` -* `npm install` - -## Running / Development - -* `ember serve` -* Visit your app at [http://localhost:4200](http://localhost:4200). -* Visit your tests at [http://localhost:4200/tests](http://localhost:4200/tests). - -### Code Generators - -Make use of the many generators for code, try `ember help generate` for more details - -### Running Tests - -* `ember test` -* `ember test --server` - -### Linting - -* `npm run lint:hbs` -* `npm run lint:js` -* `npm run lint:js -- --fix` - -### Building - -* `ember build` (development) -* `ember build --environment production` (production) - -### Deploying - -Specify what it takes to deploy your app. - -## Further Reading / Useful Links - -* [ember.js](https://emberjs.com/) -* [ember-cli](https://ember-cli.com/) -* Development Browser Extensions - * [ember inspector for chrome](https://chrome.google.com/webstore/detail/ember-inspector/bmdblncegkenkacieihfhpjfppoconhi) - * [ember inspector for firefox](https://addons.mozilla.org/en-US/firefox/addon/ember-inspector/) diff --git a/tests/debug-encapsulation/app/app.js b/tests/debug-encapsulation/app/app.js deleted file mode 100644 index b73a4fb067..0000000000 --- a/tests/debug-encapsulation/app/app.js +++ /dev/null @@ -1,16 +0,0 @@ -import Application from '@ember/application'; - -import loadInitializers from 'ember-load-initializers'; - -import config from './config/environment'; -import Resolver from './resolver'; - -const App = Application.extend({ - modulePrefix: config.modulePrefix, - podModulePrefix: config.podModulePrefix, - Resolver, -}); - -loadInitializers(App, config.modulePrefix); - -export default App; diff --git a/tests/debug-encapsulation/app/components/.gitkeep b/tests/debug-encapsulation/app/components/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/debug-encapsulation/app/controllers/.gitkeep b/tests/debug-encapsulation/app/controllers/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/debug-encapsulation/app/helpers/.gitkeep b/tests/debug-encapsulation/app/helpers/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/debug-encapsulation/app/index.html b/tests/debug-encapsulation/app/index.html deleted file mode 100644 index 09d6eeaafd..0000000000 --- a/tests/debug-encapsulation/app/index.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - EncapsulationTestApp - - - - {{content-for "head"}} - - - - - {{content-for "head-footer"}} - - - {{content-for "body"}} - - - - - {{content-for "body-footer"}} - - diff --git a/tests/debug-encapsulation/app/models/.gitkeep b/tests/debug-encapsulation/app/models/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/debug-encapsulation/app/resolver.js b/tests/debug-encapsulation/app/resolver.js deleted file mode 100644 index 2fb563d6c0..0000000000 --- a/tests/debug-encapsulation/app/resolver.js +++ /dev/null @@ -1,3 +0,0 @@ -import Resolver from 'ember-resolver'; - -export default Resolver; diff --git a/tests/debug-encapsulation/app/router.js b/tests/debug-encapsulation/app/router.js deleted file mode 100644 index 7525f056ab..0000000000 --- a/tests/debug-encapsulation/app/router.js +++ /dev/null @@ -1,12 +0,0 @@ -import EmberRouter from '@ember/routing/router'; - -import config from './config/environment'; - -const Router = EmberRouter.extend({ - location: config.locationType, - rootURL: config.rootURL, -}); - -Router.map(function () {}); - -export default Router; diff --git a/tests/debug-encapsulation/app/routes/.gitkeep b/tests/debug-encapsulation/app/routes/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/debug-encapsulation/app/styles/app.css b/tests/debug-encapsulation/app/styles/app.css deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/debug-encapsulation/app/templates/application.hbs b/tests/debug-encapsulation/app/templates/application.hbs deleted file mode 100644 index ebe6a49604..0000000000 --- a/tests/debug-encapsulation/app/templates/application.hbs +++ /dev/null @@ -1,3 +0,0 @@ -
- {{outlet}} -
\ No newline at end of file diff --git a/tests/debug-encapsulation/app/templates/components/.gitkeep b/tests/debug-encapsulation/app/templates/components/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/debug-encapsulation/config/environment.js b/tests/debug-encapsulation/config/environment.js deleted file mode 100644 index 9f18d4f2f0..0000000000 --- a/tests/debug-encapsulation/config/environment.js +++ /dev/null @@ -1,51 +0,0 @@ -'use strict'; - -module.exports = function (environment) { - let ENV = { - modulePrefix: 'debug-encapsulation-test-app', - environment, - rootURL: '/', - locationType: 'history', - EmberENV: { - FEATURES: { - // Here you can enable experimental features on an ember canary build - // e.g. EMBER_NATIVE_DECORATOR_SUPPORT: true - }, - EXTEND_PROTOTYPES: { - // Prevent Ember Data from overriding Date.parse. - Date: false, - }, - }, - - APP: { - // Here you can pass flags/options to your application instance - // when it is created - }, - }; - - if (environment === 'development') { - // ENV.APP.LOG_RESOLVER = true; - // ENV.APP.LOG_ACTIVE_GENERATION = true; - // ENV.APP.LOG_TRANSITIONS = true; - // ENV.APP.LOG_TRANSITIONS_INTERNAL = true; - // ENV.APP.LOG_VIEW_LOOKUPS = true; - } - - if (environment === 'test') { - // Testem prefers this... - ENV.locationType = 'none'; - - // keep test console output quieter - ENV.APP.LOG_ACTIVE_GENERATION = false; - ENV.APP.LOG_VIEW_LOOKUPS = false; - - ENV.APP.rootElement = '#ember-testing'; - ENV.APP.autoboot = false; - } - - if (environment === 'production') { - // here you can enable a production-specific feature - } - - return ENV; -}; diff --git a/tests/debug-encapsulation/config/optional-features.json b/tests/debug-encapsulation/config/optional-features.json deleted file mode 100644 index b26286e2ec..0000000000 --- a/tests/debug-encapsulation/config/optional-features.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "application-template-wrapper": false, - "default-async-observers": true, - "jquery-integration": false, - "template-only-glimmer-components": true -} diff --git a/tests/debug-encapsulation/config/targets.js b/tests/debug-encapsulation/config/targets.js deleted file mode 100644 index b6756da251..0000000000 --- a/tests/debug-encapsulation/config/targets.js +++ /dev/null @@ -1,13 +0,0 @@ -'use strict'; - -let browsers = ['last 1 Chrome versions', 'last 1 Firefox versions', 'last 1 Safari versions']; -const isProd = process.env.EMBER_ENV === 'production'; - -if (isProd) { - browsers = ['last 2 Chrome versions', 'last 2 Firefox versions', 'Safari 12', 'last 2 Edge versions']; -} - -module.exports = { - browsers, - node: 'current', -}; diff --git a/tests/debug-encapsulation/ember-cli-build.js b/tests/debug-encapsulation/ember-cli-build.js deleted file mode 100644 index 8f86cbd8ec..0000000000 --- a/tests/debug-encapsulation/ember-cli-build.js +++ /dev/null @@ -1,26 +0,0 @@ -/* eslint node/no-unpublished-require: 'off' */ - -'use strict'; - -const EmberApp = require('ember-cli/lib/broccoli/ember-app'); - -module.exports = function (defaults) { - let app = new EmberApp(defaults, { - // Add options here - }); - - // Use `app.import` to add additional libraries to the generated - // output files. - // - // If you need to use different assets in different - // environments, specify an object as the first parameter. That - // object's keys should be the environment name and the values - // should be the asset to use in that environment. - // - // If the library that you are including contains AMD or ES6 - // 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. - - return app.toTree(); -}; diff --git a/tests/debug-encapsulation/package.json b/tests/debug-encapsulation/package.json deleted file mode 100644 index e6d9cb6866..0000000000 --- a/tests/debug-encapsulation/package.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "name": "debug-encapsulation-test-app", - "version": "5.5.0-alpha.11", - "private": true, - "description": "Small description for encapsulation-test-app goes here", - "repository": { - "type": "git", - "url": "https://github.com/emberjs/data.git", - "directory": "tests/debug-encapsulation" - }, - "license": "MIT", - "author": "", - "directories": { - "doc": "doc", - "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" - }, - "dependenciesMeta": { - "@ember-data/adapter": { - "injected": true - }, - "@ember-data/model": { - "injected": true - }, - "@ember-data/serializer": { - "injected": true - }, - "@ember-data/store": { - "injected": true - }, - "@ember-data/tracking": { - "injected": true - }, - "@ember-data/unpublished-test-infra": { - "injected": true - } - }, - "devDependencies": { - "@babel/core": "^7.23.0", - "@babel/runtime": "^7.23.1", - "@ember-data/adapter": "workspace:5.5.0-alpha.11", - "@ember-data/legacy-compat": "workspace:5.5.0-alpha.11", - "@ember-data/model": "workspace:5.5.0-alpha.11", - "@ember-data/serializer": "workspace:5.5.0-alpha.11", - "@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", - "@ember/optional-features": "^2.0.0", - "@ember/string": "3.1.1", - "@ember/test-helpers": "^3.2.0", - "@glimmer/component": "^1.1.2", - "@glimmer/tracking": "^1.1.2", - "@types/ember__owner": "^4.0.6", - "ember-auto-import": "^2.6.3", - "ember-cli": "~5.3.0", - "ember-cli-babel": "^8.1.0", - "ember-cli-dependency-checker": "^3.3.2", - "ember-cli-htmlbars": "^6.3.0", - "ember-cli-inject-live-reload": "^2.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": "^2.0.0", - "webpack": "^5.88.2" - }, - "engines": { - "node": ">= 18.*" - }, - "ember": { - "edition": "octane" - }, - "volta": { - "extends": "../../package.json" - }, - "packageManager": "pnpm@8.9.0" -} \ No newline at end of file diff --git a/tests/debug-encapsulation/public/robots.txt b/tests/debug-encapsulation/public/robots.txt deleted file mode 100644 index f5916452e5..0000000000 --- a/tests/debug-encapsulation/public/robots.txt +++ /dev/null @@ -1,3 +0,0 @@ -# http://www.robotstxt.org -User-agent: * -Disallow: diff --git a/tests/debug-encapsulation/testem.js b/tests/debug-encapsulation/testem.js deleted file mode 100644 index e10b064501..0000000000 --- a/tests/debug-encapsulation/testem.js +++ /dev/null @@ -1,30 +0,0 @@ -// eslint-disable-next-line node/no-unpublished-require -const customDotReporter = require('@ember-data/unpublished-test-infra/src/testem/custom-dot-reporter'); - -// eslint-disable-next-line no-console -console.log(`\n\nLaunching with ${process.env.TESTEM_CI_LAUNCHER || 'Chrome'}\n\n`); - -module.exports = { - test_page: 'tests/index.html?hidepassed&nocontainer', - disable_watching: true, - reporter: customDotReporter, - launch_in_ci: [process.env.TESTEM_CI_LAUNCHER || 'Chrome'], - launch_in_dev: ['Chrome'], - browser_start_timeout: 120, - browser_args: { - Chrome: { - ci: [ - '--headless', - '--disable-dev-shm-usage', - '--disable-software-rasterizer', - '--mute-audio', - '--remote-debugging-port=0', - '--window-size=1440,900', - '--no-sandbox', - ], - }, - }, - Firefox: { - ci: ['-headless', '-width 1440', '-height 900'], - }, -}; diff --git a/tests/debug-encapsulation/tests/helpers/.gitkeep b/tests/debug-encapsulation/tests/helpers/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/debug-encapsulation/tests/index.html b/tests/debug-encapsulation/tests/index.html deleted file mode 100644 index 3a7bbd2041..0000000000 --- a/tests/debug-encapsulation/tests/index.html +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - EncapsulationTestApp Tests - - - - {{content-for "head"}} - {{content-for "test-head"}} - - - - - - {{content-for "head-footer"}} - {{content-for "test-head-footer"}} - - - {{content-for "body"}} - {{content-for "test-body"}} - -
-
-
-
-
-
- - - - - - - {{content-for "body-footer"}} - {{content-for "test-body-footer"}} - - diff --git a/tests/debug-encapsulation/tests/integration/.gitkeep b/tests/debug-encapsulation/tests/integration/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/debug-encapsulation/tests/integration/smoke-test.js b/tests/debug-encapsulation/tests/integration/smoke-test.js deleted file mode 100644 index a92c15dc5f..0000000000 --- a/tests/debug-encapsulation/tests/integration/smoke-test.js +++ /dev/null @@ -1,45 +0,0 @@ -/* global require */ -import { module, test } from 'qunit'; - -import { setupTest } from 'ember-qunit'; - -function assertPackageNotPresent(packageName, assert) { - const entries = Object.keys(require.entries); - const entriesFromPackage = entries.filter((m) => m.indexOf(packageName) === 0); - const importedDependencies = {}; - const entriesImportingPackage = entries.filter((m) => { - const deps = require.entries[m].deps; - const moduleDeps = deps.filter((d) => d.indexOf(packageName) === 0); - - if (moduleDeps.length) { - importedDependencies[m] = moduleDeps; - } - return moduleDeps.length > 0; - }); - - assert.ok(entries.length > 0, 'We have modules'); - assert.ok( - entriesFromPackage.length === 0, - `We expect no modules from ${packageName} ${ - entriesFromPackage.length > 0 ? `found: [\n\t"${entriesFromPackage.join('",\n\t"')}"\n]` : '' - }` - ); - assert.ok( - entriesImportingPackage.length === 0, - `We expect no modules with dependencies on ${packageName} ${ - entriesImportingPackage.length > 0 ? `found:\n${JSON.stringify(importedDependencies, null, 2)}` : '' - }` - ); -} - -module('Debug Encapsulation - Smoke Tests', function (hooks) { - setupTest(hooks); - - test('No @ember-data/debug modules are present', function (assert) { - assertPackageNotPresent('@ember-data/debug', assert); - }); - - test('No ember-data modules are present', function (assert) { - assertPackageNotPresent('ember-data', assert); - }); -}); diff --git a/tests/debug-encapsulation/tests/test-helper.js b/tests/debug-encapsulation/tests/test-helper.js deleted file mode 100644 index ddce1ff6aa..0000000000 --- a/tests/debug-encapsulation/tests/test-helper.js +++ /dev/null @@ -1,20 +0,0 @@ -import { setApplication } from '@ember/test-helpers'; - -import * as QUnit from 'qunit'; -import { setup } from 'qunit-dom'; - -import { start } from 'ember-qunit'; - -import configureAsserts from '@ember-data/unpublished-test-infra/test-support/asserts'; - -import Application from '../app'; -import config from '../config/environment'; - -setup(QUnit.assert); - -configureAsserts(QUnit.hooks); - -setApplication(Application.create(config.APP)); - -QUnit.config.testTimeout = 2000; -start({ setupTestIsolationValidation: true }); diff --git a/tests/debug-encapsulation/tests/unit/.gitkeep b/tests/debug-encapsulation/tests/unit/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/debug-encapsulation/vendor/.gitkeep b/tests/debug-encapsulation/vendor/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000