Skip to content

Commit

Permalink
add disney planner
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmojicatech committed Nov 25, 2023
1 parent 4ee5bd9 commit fbc1cc1
Show file tree
Hide file tree
Showing 51 changed files with 2,484 additions and 678 deletions.
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
/dist
/coverage

/.nx/cache
/.nx/cache
.angular
22 changes: 22 additions & 0 deletions apps/disney-planner-e2e/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"extends": ["plugin:cypress/recommended", "../../.eslintrc.json"],
"ignorePatterns": ["!**/*"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {}
},
{
"files": ["*.ts", "*.tsx"],
"rules": {}
},
{
"files": ["*.js", "*.jsx"],
"rules": {}
},
{
"files": ["*.cy.{ts,js,tsx,jsx}", "src/**/*.{ts,js,tsx,jsx}"],
"rules": {}
}
]
}
12 changes: 12 additions & 0 deletions apps/disney-planner-e2e/cypress.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"fileServerFolder": ".",
"fixturesFolder": "./src/fixtures",
"integrationFolder": "./src/integration",
"modifyObstructiveCode": false,
"supportFile": "./src/support/index.ts",
"pluginsFile": false,
"video": true,
"videosFolder": "../../dist/cypress/apps/disney-planner-e2e/videos",
"screenshotsFolder": "../../dist/cypress/apps/disney-planner-e2e/screenshots",
"chromeWebSecurity": false
}
33 changes: 33 additions & 0 deletions apps/disney-planner-e2e/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"name": "disney-planner-e2e",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "application",
"sourceRoot": "apps/disney-planner-e2e/src",
"targets": {
"e2e": {
"executor": "@nx/cypress:cypress",
"options": {
"cypressConfig": "apps/disney-planner-e2e/cypress.json",
"testingType": "e2e",
"devServerTarget": "disney-planner:serve:development"
},
"configurations": {
"production": {
"devServerTarget": "disney-planner:serve:production"
},
"ci": {
"devServerTarget": "disney-planner:serve-static"
}
}
},
"lint": {
"executor": "@nx/eslint:lint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["apps/disney-planner-e2e/**/*.{js,ts}"]
}
}
},
"tags": [],
"implicitDependencies": ["disney-planner"]
}
4 changes: 4 additions & 0 deletions apps/disney-planner-e2e/src/fixtures/example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"name": "Using fixtures to represent data",
"email": "hello@cypress.io"
}
13 changes: 13 additions & 0 deletions apps/disney-planner-e2e/src/integration/app.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { getGreeting } from '../support/app.po';

describe('disney-planner-e2e', () => {
beforeEach(() => cy.visit('/'));

it('should display welcome message', () => {
// Custom command example, see `../support/commands.ts` file
cy.login('my-email@something.com', 'myPassword');

// Function helper example, see `../support/app.po.ts` file
getGreeting().contains(/Welcome/);
});
});
1 change: 1 addition & 0 deletions apps/disney-planner-e2e/src/support/app.po.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const getGreeting = () => cy.get('h1');
33 changes: 33 additions & 0 deletions apps/disney-planner-e2e/src/support/commands.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// ***********************************************
// This example commands.js shows you how to
// create various custom commands and overwrite
// existing commands.
//
// For more comprehensive examples of custom
// commands please read more here:
// https://on.cypress.io/custom-commands
// ***********************************************

// eslint-disable-next-line @typescript-eslint/no-namespace
declare namespace Cypress {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
interface Chainable<Subject> {
login(email: string, password: string): void;
}
}
//
// -- This is a parent command --
Cypress.Commands.add('login', (email, password) => {
console.log('Custom command example: Login', email, password);
});
//
// -- This is a child command --
// Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... })
//
//
// -- This is a dual command --
// Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... })
//
//
// -- This will overwrite an existing command --
// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... })
17 changes: 17 additions & 0 deletions apps/disney-planner-e2e/src/support/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// ***********************************************************
// This example support/index.ts is processed and
// loaded automatically before your test files.
//
// This is a great place to put global configuration and
// behavior that modifies Cypress.
//
// You can change the location of this file or turn off
// automatically serving support files with the
// 'supportFile' configuration option.
//
// You can read more here:
// https://on.cypress.io/configuration
// ***********************************************************

// Import commands.ts using ES2015 syntax:
import './commands';
10 changes: 10 additions & 0 deletions apps/disney-planner-e2e/src/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"sourceMap": false,
"outDir": "../../dist/out-tsc",
"allowJs": true,
"types": ["cypress", "node"]
},
"include": ["src/**/*.ts", "src/**/*.js"]
}
44 changes: 44 additions & 0 deletions apps/disney-planner/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"extends": ["../../.eslintrc.json"],
"ignorePatterns": ["!**/*"],
"overrides": [
{
"files": ["*.ts"],
"extends": [
"plugin:@nx/angular",
"plugin:@angular-eslint/template/process-inline-templates"
],
"rules": {
"@angular-eslint/directive-selector": [
"error",
{
"type": "attribute",
"prefix": "app",
"style": "camelCase"
}
],
"@angular-eslint/component-selector": [
"error",
{
"type": "element",
"prefix": "app",
"style": "kebab-case"
}
],
"@angular-eslint/component-class-suffix": [
"error",
{
"suffixes": ["Page", "Component"]
}
],
"@angular-eslint/no-empty-lifecycle-method": 0,
"@typescript-eslint/no-empty-function": 0
}
},
{
"files": ["*.html"],
"extends": ["plugin:@nx/angular-template"],
"rules": {}
}
]
}
1 change: 1 addition & 0 deletions apps/disney-planner/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/node_modules
13 changes: 13 additions & 0 deletions apps/disney-planner/capacitor.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { CapacitorConfig } from '@capacitor/cli';

const config: CapacitorConfig = {
appId: 'io.ionic.starter',
appName: 'Disney Planner',
webDir: '../../dist/apps/disney-planner',
bundledWebRuntime: false,
server: {
androidScheme: 'https',
},
};

export default config;
7 changes: 7 additions & 0 deletions apps/disney-planner/ionic.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "disney-planner",
"integrations": {
"capacitor": {}
},
"type": "angular"
}
22 changes: 22 additions & 0 deletions apps/disney-planner/jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/* eslint-disable */
export default {
displayName: 'disney-planner',
preset: '../../jest.preset.js',
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
coverageDirectory: '../../coverage/apps/disney-planner',
transform: {
'^.+\\.(ts|mjs|js|html)$': [
'jest-preset-angular',
{
tsconfig: '<rootDir>/tsconfig.spec.json',
stringifyContentPathRegex: '\\.(html|svg)$',
},
],
},
transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'],
snapshotSerializers: [
'jest-preset-angular/build/serializers/no-ng-attributes',
'jest-preset-angular/build/serializers/ng-snapshot',
'jest-preset-angular/build/serializers/html-comment',
],
};
8 changes: 8 additions & 0 deletions apps/disney-planner/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "disney-planner",
"devDependencies": {
"@capacitor/cli": "^5.0.3",
"@capacitor/ios": "../../node_modules/@capacitor/ios",
"@capacitor/android": "../../node_modules/@capacitor/android"
}
}
Loading

0 comments on commit fbc1cc1

Please sign in to comment.