diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 31a63f08..dee4ce20 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -523,6 +523,144 @@ importers: specifier: ^5.75.0 version: 5.88.2 + test-apps/pods-classic-app: + devDependencies: + '@babel/core': + specifier: ^7.22.20 + version: 7.23.0(supports-color@8.1.1) + '@babel/eslint-parser': + specifier: ^7.22.15 + version: 7.22.15(@babel/core@7.23.0)(eslint@8.50.0) + '@babel/plugin-proposal-decorators': + specifier: ^7.22.15 + version: 7.23.0(@babel/core@7.23.0) + '@ember/optional-features': + specifier: ^2.0.0 + version: 2.0.0 + '@ember/string': + specifier: ^3.1.1 + version: 3.1.1 + '@ember/test-helpers': + specifier: ^3.2.0 + version: 3.2.0(ember-source@5.3.0)(webpack@5.88.2) + '@glimmer/component': + specifier: ^1.1.2 + version: 1.1.2(@babel/core@7.23.0) + '@glimmer/tracking': + specifier: ^1.1.2 + version: 1.1.2 + broccoli-asset-rev: + specifier: ^3.0.0 + version: 3.0.0 + concurrently: + specifier: ^8.2.1 + version: 8.2.1 + ember-auto-import: + specifier: ^2.6.3 + version: 2.6.3(@glint/template@1.2.0)(webpack@5.88.2) + ember-cli: + specifier: ~5.3.0 + version: 5.3.0 + ember-cli-app-version: + specifier: ^6.0.1 + version: 6.0.1(ember-source@5.3.0) + ember-cli-babel: + specifier: ^8.0.0 + version: 8.1.0(@babel/core@7.23.0) + ember-cli-clean-css: + specifier: ^3.0.0 + version: 3.0.0 + ember-cli-dependency-checker: + specifier: ^3.3.2 + version: 3.3.2(ember-cli@5.3.0) + ember-cli-htmlbars: + specifier: ^6.3.0 + version: 6.3.0 + ember-cli-inject-live-reload: + specifier: ^2.1.0 + version: 2.1.0 + ember-cli-sri: + specifier: ^2.1.1 + version: 2.1.1 + ember-cli-terser: + specifier: ^4.0.2 + version: 4.0.2 + ember-data: + specifier: ~5.3.0 + version: 5.3.0(@babel/core@7.23.0)(@ember/string@3.1.1)(@glimmer/tracking@1.1.2)(ember-source@5.3.0) + ember-fetch: + specifier: ^8.1.2 + version: 8.1.2 + ember-load-initializers: + specifier: ^2.1.2 + version: 2.1.2(@babel/core@7.23.0) + ember-modifier: + specifier: ^4.1.0 + version: 4.1.0(ember-source@5.3.0) + ember-page-title: + specifier: ^8.0.0 + version: 8.0.0 + ember-qunit: + specifier: ^8.0.1 + version: 8.0.1(@ember/test-helpers@3.2.0)(ember-source@5.3.0)(qunit@2.20.0) + ember-resolver: + specifier: ^11.0.1 + version: 11.0.1(ember-source@5.3.0) + ember-source: + specifier: ~5.3.0 + version: 5.3.0(@babel/core@7.23.0)(@glimmer/component@1.1.2)(rsvp@4.8.5)(webpack@5.88.2) + ember-template-lint: + specifier: ^5.11.2 + version: 5.11.2 + ember-welcome-page: + specifier: ^7.0.2 + version: 7.0.2 + eslint: + specifier: ^8.49.0 + version: 8.50.0 + eslint-config-prettier: + specifier: ^9.0.0 + version: 9.0.0(eslint@8.50.0) + eslint-plugin-ember: + specifier: ^11.11.1 + version: 11.11.1(eslint@8.50.0) + eslint-plugin-n: + specifier: ^16.1.0 + version: 16.1.0(eslint@8.50.0) + eslint-plugin-prettier: + specifier: ^5.0.0 + version: 5.0.0(eslint-config-prettier@9.0.0)(eslint@8.50.0)(prettier@3.0.3) + eslint-plugin-qunit: + specifier: ^8.0.0 + version: 8.0.0(eslint@8.50.0) + loader.js: + specifier: ^4.7.0 + version: 4.7.0 + prettier: + specifier: ^3.0.3 + version: 3.0.3 + qunit: + specifier: ^2.19.4 + version: 2.20.0 + qunit-dom: + specifier: ^2.0.0 + version: 2.0.0 + stylelint: + specifier: ^15.10.3 + version: 15.10.3 + stylelint-config-standard: + specifier: ^34.0.0 + version: 34.0.0(stylelint@15.10.3) + stylelint-prettier: + specifier: ^4.0.2 + version: 4.0.2(prettier@3.0.3)(stylelint@15.10.3) + tracked-built-ins: + specifier: ^3.2.0 + version: 3.3.0 + webpack: + specifier: ^5.88.2 + version: 5.88.2 + test-apps/pods-embroider-app: devDependencies: '@babel/core': diff --git a/test-apps/pods-classic-app/.editorconfig b/test-apps/pods-classic-app/.editorconfig new file mode 100644 index 00000000..c35a0024 --- /dev/null +++ b/test-apps/pods-classic-app/.editorconfig @@ -0,0 +1,19 @@ +# EditorConfig helps developers define and maintain consistent +# coding styles between different editors and IDEs +# editorconfig.org + +root = true + +[*] +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +indent_style = space +indent_size = 2 + +[*.hbs] +insert_final_newline = false + +[*.{diff,md}] +trim_trailing_whitespace = false diff --git a/test-apps/pods-classic-app/.ember-cli b/test-apps/pods-classic-app/.ember-cli new file mode 100644 index 00000000..8c1812cf --- /dev/null +++ b/test-apps/pods-classic-app/.ember-cli @@ -0,0 +1,15 @@ +{ + /** + 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, + + /** + Setting `isTypeScriptProject` to true will force the blueprint generators to generate TypeScript + rather than JavaScript by default, when a TypeScript version of a given blueprint is available. + */ + "isTypeScriptProject": false +} diff --git a/test-apps/pods-classic-app/.eslintignore b/test-apps/pods-classic-app/.eslintignore new file mode 100644 index 00000000..9385391f --- /dev/null +++ b/test-apps/pods-classic-app/.eslintignore @@ -0,0 +1,13 @@ +# unconventional js +/blueprints/*/files/ + +# compiled output +/dist/ + +# misc +/coverage/ +!.* +.*/ + +# ember-try +/.node_modules.ember-try/ diff --git a/test-apps/pods-classic-app/.eslintrc.js b/test-apps/pods-classic-app/.eslintrc.js new file mode 100644 index 00000000..25ceaab4 --- /dev/null +++ b/test-apps/pods-classic-app/.eslintrc.js @@ -0,0 +1,56 @@ +'use strict'; + +module.exports = { + root: true, + parser: '@babel/eslint-parser', + parserOptions: { + ecmaVersion: 'latest', + sourceType: 'module', + requireConfigFile: false, + babelOptions: { + plugins: [ + ['@babel/plugin-proposal-decorators', { decoratorsBeforeExport: true }], + ], + }, + }, + plugins: ['ember'], + extends: [ + 'eslint:recommended', + 'plugin:ember/recommended', + 'plugin:prettier/recommended', + ], + env: { + browser: true, + }, + rules: {}, + overrides: [ + // node files + { + files: [ + './.eslintrc.js', + './.prettierrc.js', + './.stylelintrc.js', + './.template-lintrc.js', + './ember-cli-build.js', + './testem.js', + './blueprints/*/index.js', + './config/**/*.js', + './lib/*/index.js', + './server/**/*.js', + ], + parserOptions: { + sourceType: 'script', + }, + env: { + browser: false, + node: true, + }, + extends: ['plugin:n/recommended'], + }, + { + // test files + files: ['tests/**/*-test.{js,ts}'], + extends: ['plugin:qunit/recommended'], + }, + ], +}; diff --git a/test-apps/pods-classic-app/.github/workflows/ci.yml b/test-apps/pods-classic-app/.github/workflows/ci.yml new file mode 100644 index 00000000..abe31138 --- /dev/null +++ b/test-apps/pods-classic-app/.github/workflows/ci.yml @@ -0,0 +1,47 @@ +name: CI + +on: + push: + branches: + - main + - master + pull_request: {} + +concurrency: + group: ci-${{ github.head_ref || github.ref }} + cancel-in-progress: true + +jobs: + lint: + name: "Lint" + runs-on: ubuntu-latest + timeout-minutes: 10 + + steps: + - uses: actions/checkout@v3 + - name: Install Node + uses: actions/setup-node@v3 + with: + node-version: 16 + cache: npm + - name: Install Dependencies + run: npm ci + - name: Lint + run: npm run lint + + test: + name: "Test" + runs-on: ubuntu-latest + timeout-minutes: 10 + + steps: + - uses: actions/checkout@v3 + - name: Install Node + uses: actions/setup-node@v3 + with: + node-version: 16 + cache: npm + - name: Install Dependencies + run: npm ci + - name: Run Tests + run: npm test diff --git a/test-apps/pods-classic-app/.gitignore b/test-apps/pods-classic-app/.gitignore new file mode 100644 index 00000000..71ad79d0 --- /dev/null +++ b/test-apps/pods-classic-app/.gitignore @@ -0,0 +1,25 @@ +# compiled output +/dist/ +/declarations/ + +# dependencies +/node_modules/ + +# misc +/.env* +/.pnp* +/.eslintcache +/coverage/ +/npm-debug.log* +/testem.log +/yarn-error.log + +# ember-try +/.node_modules.ember-try/ +/npm-shrinkwrap.json.ember-try +/package.json.ember-try +/package-lock.json.ember-try +/yarn.lock.ember-try + +# broccoli-debug +/DEBUG/ diff --git a/test-apps/pods-classic-app/.prettierignore b/test-apps/pods-classic-app/.prettierignore new file mode 100644 index 00000000..9385391f --- /dev/null +++ b/test-apps/pods-classic-app/.prettierignore @@ -0,0 +1,13 @@ +# unconventional js +/blueprints/*/files/ + +# compiled output +/dist/ + +# misc +/coverage/ +!.* +.*/ + +# ember-try +/.node_modules.ember-try/ diff --git a/test-apps/pods-classic-app/.prettierrc.js b/test-apps/pods-classic-app/.prettierrc.js new file mode 100644 index 00000000..e5f7b6d1 --- /dev/null +++ b/test-apps/pods-classic-app/.prettierrc.js @@ -0,0 +1,12 @@ +'use strict'; + +module.exports = { + overrides: [ + { + files: '*.{js,ts}', + options: { + singleQuote: true, + }, + }, + ], +}; diff --git a/test-apps/pods-classic-app/.stylelintignore b/test-apps/pods-classic-app/.stylelintignore new file mode 100644 index 00000000..a0cf71cb --- /dev/null +++ b/test-apps/pods-classic-app/.stylelintignore @@ -0,0 +1,8 @@ +# unconventional files +/blueprints/*/files/ + +# compiled output +/dist/ + +# addons +/.node_modules.ember-try/ diff --git a/test-apps/pods-classic-app/.stylelintrc.js b/test-apps/pods-classic-app/.stylelintrc.js new file mode 100644 index 00000000..021c539a --- /dev/null +++ b/test-apps/pods-classic-app/.stylelintrc.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = { + extends: ['stylelint-config-standard', 'stylelint-prettier/recommended'], +}; diff --git a/test-apps/pods-classic-app/.template-lintrc.js b/test-apps/pods-classic-app/.template-lintrc.js new file mode 100644 index 00000000..f35f61c7 --- /dev/null +++ b/test-apps/pods-classic-app/.template-lintrc.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = { + extends: 'recommended', +}; diff --git a/test-apps/pods-classic-app/.watchmanconfig b/test-apps/pods-classic-app/.watchmanconfig new file mode 100644 index 00000000..f9c3d8f8 --- /dev/null +++ b/test-apps/pods-classic-app/.watchmanconfig @@ -0,0 +1,3 @@ +{ + "ignore_dirs": ["dist"] +} diff --git a/test-apps/pods-classic-app/README.md b/test-apps/pods-classic-app/README.md new file mode 100644 index 00000000..725d94ee --- /dev/null +++ b/test-apps/pods-classic-app/README.md @@ -0,0 +1,56 @@ +# pods-classic-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://cli.emberjs.com/release/) +* [Google Chrome](https://google.com/chrome/) + +## Installation + +* `git clone ` this repository +* `cd pods-classic-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` +* `npm run lint: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://cli.emberjs.com/release/) +* 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/test-apps/pods-classic-app/app/app.js b/test-apps/pods-classic-app/app/app.js new file mode 100644 index 00000000..948bf818 --- /dev/null +++ b/test-apps/pods-classic-app/app/app.js @@ -0,0 +1,12 @@ +import Application from '@ember/application'; +import Resolver from 'ember-resolver'; +import loadInitializers from 'ember-load-initializers'; +import config from 'pods-classic-app/config/environment'; + +export default class App extends Application { + modulePrefix = config.modulePrefix; + podModulePrefix = config.podModulePrefix; + Resolver = Resolver; +} + +loadInitializers(App, config.modulePrefix); diff --git a/test-apps/pods-classic-app/app/components/.gitkeep b/test-apps/pods-classic-app/app/components/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/test-apps/pods-classic-app/app/controllers/.gitkeep b/test-apps/pods-classic-app/app/controllers/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/test-apps/pods-classic-app/app/helpers/.gitkeep b/test-apps/pods-classic-app/app/helpers/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/test-apps/pods-classic-app/app/index.html b/test-apps/pods-classic-app/app/index.html new file mode 100644 index 00000000..0a34fc2d --- /dev/null +++ b/test-apps/pods-classic-app/app/index.html @@ -0,0 +1,24 @@ + + + + + PodsClassicApp + + + + {{content-for "head"}} + + + + + {{content-for "head-footer"}} + + + {{content-for "body"}} + + + + + {{content-for "body-footer"}} + + diff --git a/test-apps/pods-classic-app/app/models/.gitkeep b/test-apps/pods-classic-app/app/models/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/test-apps/pods-classic-app/app/router.js b/test-apps/pods-classic-app/app/router.js new file mode 100644 index 00000000..09910140 --- /dev/null +++ b/test-apps/pods-classic-app/app/router.js @@ -0,0 +1,9 @@ +import EmberRouter from '@ember/routing/router'; +import config from 'pods-classic-app/config/environment'; + +export default class Router extends EmberRouter { + location = config.locationType; + rootURL = config.rootURL; +} + +Router.map(function () {}); diff --git a/test-apps/pods-classic-app/app/routes/application/styles.css b/test-apps/pods-classic-app/app/routes/application/styles.css new file mode 100644 index 00000000..3600fff3 --- /dev/null +++ b/test-apps/pods-classic-app/app/routes/application/styles.css @@ -0,0 +1,3 @@ +h3 { + color: green; +} diff --git a/test-apps/pods-classic-app/app/routes/application/template.hbs b/test-apps/pods-classic-app/app/routes/application/template.hbs new file mode 100644 index 00000000..f70a611b --- /dev/null +++ b/test-apps/pods-classic-app/app/routes/application/template.hbs @@ -0,0 +1,7 @@ +{{page-title "PodsEmbroiderApp"}} + +

+ Scoped css on route. +

+ +{{outlet}} \ No newline at end of file diff --git a/test-apps/pods-classic-app/app/styles/app.css b/test-apps/pods-classic-app/app/styles/app.css new file mode 100644 index 00000000..2763afa4 --- /dev/null +++ b/test-apps/pods-classic-app/app/styles/app.css @@ -0,0 +1 @@ +/* Ember supports plain CSS out of the box. More info: https://cli.emberjs.com/release/advanced-use/stylesheets/ */ diff --git a/test-apps/pods-classic-app/config/ember-cli-update.json b/test-apps/pods-classic-app/config/ember-cli-update.json new file mode 100644 index 00000000..bc6cc28e --- /dev/null +++ b/test-apps/pods-classic-app/config/ember-cli-update.json @@ -0,0 +1,20 @@ +{ + "schemaVersion": "1.0.0", + "packages": [ + { + "name": "ember-cli", + "version": "5.3.0", + "blueprints": [ + { + "name": "app", + "outputRepo": "https://github.com/ember-cli/ember-new-output", + "codemodsSource": "ember-app-codemods-manifest@1", + "isBaseBlueprint": true, + "options": [ + "--ci-provider=github" + ] + } + ] + } + ] +} diff --git a/test-apps/pods-classic-app/config/environment.js b/test-apps/pods-classic-app/config/environment.js new file mode 100644 index 00000000..e54e3a0f --- /dev/null +++ b/test-apps/pods-classic-app/config/environment.js @@ -0,0 +1,49 @@ +'use strict'; + +module.exports = function (environment) { + const ENV = { + modulePrefix: 'pods-classic-app', + podModulePrefix: 'pods-classic-app/routes', + environment, + rootURL: '/', + locationType: 'history', + EmberENV: { + EXTEND_PROTOTYPES: false, + FEATURES: { + // Here you can enable experimental features on an ember canary build + // e.g. EMBER_NATIVE_DECORATOR_SUPPORT: true + }, + }, + + 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/test-apps/pods-classic-app/config/optional-features.json b/test-apps/pods-classic-app/config/optional-features.json new file mode 100644 index 00000000..b26286e2 --- /dev/null +++ b/test-apps/pods-classic-app/config/optional-features.json @@ -0,0 +1,6 @@ +{ + "application-template-wrapper": false, + "default-async-observers": true, + "jquery-integration": false, + "template-only-glimmer-components": true +} diff --git a/test-apps/pods-classic-app/config/targets.js b/test-apps/pods-classic-app/config/targets.js new file mode 100644 index 00000000..1e48e059 --- /dev/null +++ b/test-apps/pods-classic-app/config/targets.js @@ -0,0 +1,11 @@ +'use strict'; + +const browsers = [ + 'last 1 Chrome versions', + 'last 1 Firefox versions', + 'last 1 Safari versions', +]; + +module.exports = { + browsers, +}; diff --git a/test-apps/pods-classic-app/ember-cli-build.js b/test-apps/pods-classic-app/ember-cli-build.js new file mode 100644 index 00000000..ed991bd9 --- /dev/null +++ b/test-apps/pods-classic-app/ember-cli-build.js @@ -0,0 +1,11 @@ +'use strict'; + +const EmberApp = require('ember-cli/lib/broccoli/ember-app'); + +module.exports = function (defaults) { + const app = new EmberApp(defaults, { + // Add options here + }); + + return app.toTree(); +}; diff --git a/test-apps/pods-classic-app/package.json b/test-apps/pods-classic-app/package.json new file mode 100644 index 00000000..5cfbf90e --- /dev/null +++ b/test-apps/pods-classic-app/package.json @@ -0,0 +1,80 @@ +{ + "name": "pods-classic-app", + "version": "0.0.0", + "private": true, + "description": "Small description for pods-classic-app goes here", + "repository": "", + "license": "MIT", + "author": "", + "directories": { + "doc": "doc", + "test": "tests" + }, + "scripts": { + "build": "ember build --environment=production", + "lint": "concurrently \"npm:lint:*(!fix)\" --names \"lint:\"", + "lint:css": "stylelint \"**/*.css\"", + "lint:css:fix": "concurrently \"npm:lint:css -- --fix\"", + "lint:fix": "concurrently \"npm:lint:*:fix\" --names \"fix:\"", + "lint:hbs": "ember-template-lint .", + "lint:hbs:fix": "ember-template-lint . --fix", + "lint:js": "eslint . --cache", + "lint:js:fix": "eslint . --fix", + "start": "ember serve", + "test": "concurrently \"npm:lint\" \"npm:test:*\" --names \"lint,test:\"", + "test:ember": "ember test" + }, + "devDependencies": { + "@babel/core": "^7.22.20", + "@babel/eslint-parser": "^7.22.15", + "@babel/plugin-proposal-decorators": "^7.22.15", + "@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", + "broccoli-asset-rev": "^3.0.0", + "concurrently": "^8.2.1", + "ember-auto-import": "^2.6.3", + "ember-cli": "~5.3.0", + "ember-cli-app-version": "^6.0.1", + "ember-cli-babel": "^8.0.0", + "ember-cli-clean-css": "^3.0.0", + "ember-cli-dependency-checker": "^3.3.2", + "ember-cli-htmlbars": "^6.3.0", + "ember-cli-inject-live-reload": "^2.1.0", + "ember-cli-sri": "^2.1.1", + "ember-cli-terser": "^4.0.2", + "ember-data": "~5.3.0", + "ember-fetch": "^8.1.2", + "ember-load-initializers": "^2.1.2", + "ember-modifier": "^4.1.0", + "ember-page-title": "^8.0.0", + "ember-qunit": "^8.0.1", + "ember-resolver": "^11.0.1", + "ember-source": "~5.3.0", + "ember-template-lint": "^5.11.2", + "ember-welcome-page": "^7.0.2", + "eslint": "^8.49.0", + "eslint-config-prettier": "^9.0.0", + "eslint-plugin-ember": "^11.11.1", + "eslint-plugin-n": "^16.1.0", + "eslint-plugin-prettier": "^5.0.0", + "eslint-plugin-qunit": "^8.0.0", + "loader.js": "^4.7.0", + "prettier": "^3.0.3", + "qunit": "^2.19.4", + "qunit-dom": "^2.0.0", + "stylelint": "^15.10.3", + "stylelint-config-standard": "^34.0.0", + "stylelint-prettier": "^4.0.2", + "tracked-built-ins": "^3.2.0", + "webpack": "^5.88.2" + }, + "engines": { + "node": "16.* || >= 18" + }, + "ember": { + "edition": "octane" + } +} diff --git a/test-apps/pods-classic-app/public/robots.txt b/test-apps/pods-classic-app/public/robots.txt new file mode 100644 index 00000000..f5916452 --- /dev/null +++ b/test-apps/pods-classic-app/public/robots.txt @@ -0,0 +1,3 @@ +# http://www.robotstxt.org +User-agent: * +Disallow: diff --git a/test-apps/pods-classic-app/testem.js b/test-apps/pods-classic-app/testem.js new file mode 100644 index 00000000..ed2f3712 --- /dev/null +++ b/test-apps/pods-classic-app/testem.js @@ -0,0 +1,23 @@ +'use strict'; + +module.exports = { + test_page: 'tests/index.html?hidepassed', + disable_watching: true, + launch_in_ci: ['Chrome'], + launch_in_dev: ['Chrome'], + browser_start_timeout: 120, + browser_args: { + Chrome: { + ci: [ + // --no-sandbox is needed when running Chrome inside a container + process.env.CI ? '--no-sandbox' : null, + '--headless', + '--disable-dev-shm-usage', + '--disable-software-rasterizer', + '--mute-audio', + '--remote-debugging-port=0', + '--window-size=1440,900', + ].filter(Boolean), + }, + }, +}; diff --git a/test-apps/pods-classic-app/tests/helpers/index.js b/test-apps/pods-classic-app/tests/helpers/index.js new file mode 100644 index 00000000..d37dd680 --- /dev/null +++ b/test-apps/pods-classic-app/tests/helpers/index.js @@ -0,0 +1,42 @@ +import { + setupApplicationTest as upstreamSetupApplicationTest, + setupRenderingTest as upstreamSetupRenderingTest, + setupTest as upstreamSetupTest, +} from 'ember-qunit'; + +// This file exists to provide wrappers around ember-qunit's +// test setup functions. This way, you can easily extend the setup that is +// needed per test type. + +function setupApplicationTest(hooks, options) { + upstreamSetupApplicationTest(hooks, options); + + // Additional setup for application tests can be done here. + // + // For example, if you need an authenticated session for each + // application test, you could do: + // + // hooks.beforeEach(async function () { + // await authenticateSession(); // ember-simple-auth + // }); + // + // This is also a good place to call test setup functions coming + // from other addons: + // + // setupIntl(hooks); // ember-intl + // setupMirage(hooks); // ember-cli-mirage +} + +function setupRenderingTest(hooks, options) { + upstreamSetupRenderingTest(hooks, options); + + // Additional setup for rendering tests can be done here. +} + +function setupTest(hooks, options) { + upstreamSetupTest(hooks, options); + + // Additional setup for unit tests can be done here. +} + +export { setupApplicationTest, setupRenderingTest, setupTest }; diff --git a/test-apps/pods-classic-app/tests/index.html b/test-apps/pods-classic-app/tests/index.html new file mode 100644 index 00000000..69424f26 --- /dev/null +++ b/test-apps/pods-classic-app/tests/index.html @@ -0,0 +1,39 @@ + + + + + PodsClassicApp 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/test-apps/pods-classic-app/tests/integration/.gitkeep b/test-apps/pods-classic-app/tests/integration/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/test-apps/pods-classic-app/tests/test-helper.js b/test-apps/pods-classic-app/tests/test-helper.js new file mode 100644 index 00000000..0a019993 --- /dev/null +++ b/test-apps/pods-classic-app/tests/test-helper.js @@ -0,0 +1,12 @@ +import Application from 'pods-classic-app/app'; +import config from 'pods-classic-app/config/environment'; +import * as QUnit from 'qunit'; +import { setApplication } from '@ember/test-helpers'; +import { setup } from 'qunit-dom'; +import { start } from 'ember-qunit'; + +setApplication(Application.create(config.APP)); + +setup(QUnit.assert); + +start(); diff --git a/test-apps/pods-classic-app/tests/unit/.gitkeep b/test-apps/pods-classic-app/tests/unit/.gitkeep new file mode 100644 index 00000000..e69de29b