Skip to content

Commit

Permalink
Merge pull request #2 from Encanto/angular12
Browse files Browse the repository at this point in the history
Angular12
  • Loading branch information
WilliamRClark authored May 7, 2022
2 parents d9cf83e + 9a42c9f commit 6faf8a1
Show file tree
Hide file tree
Showing 20 changed files with 5,786 additions and 5,119 deletions.
17 changes: 15 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
orbs: # declare what orbs we are going to use
node: circleci/node@4.0.0 # the node orb provides common node-related configuration
browser-tools: circleci/browser-tools@1.1.1
node: circleci/node@5.0.2 # the node orb provides common node-related configuration
browser-tools: circleci/browser-tools@1.3.0
cypress: cypress-io/cypress@1

version: 2.1 # using 2.1 provides access to orbs and other features

Expand Down Expand Up @@ -37,6 +38,17 @@ jobs:
- run: cd ./component && npm install
- run: cd ./component && npm run build
- run: cd ./component && npm run test-headless

cypress-test:
executor: cypress/default
working_directory: ~/project
steps:
- browser-tools/install-chrome
- attach_workspace:
at: .
- checkout
- run: cd ./component && npm install
- run: cd ./component && npm run build
- run: cd ./component && npm run e2e

workflows:
Expand All @@ -46,3 +58,4 @@ workflows:
- build-api
- build-app
- build-test
- cypress-test
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,6 @@ testem.log
# System Files
.DS_Store
Thumbs.db

# Cypress output
*.mp4
94 changes: 4 additions & 90 deletions api/package-lock.json

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

37 changes: 31 additions & 6 deletions component/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json",
"aot": true,
"assets": [
"src/favicon.ico",
"src/assets"
Expand All @@ -27,7 +26,13 @@
"node_modules/font-awesome/css/font-awesome.css",
"src/styles.css"
],
"scripts": []
"scripts": [],
"vendorChunk": true,
"extractLicenses": false,
"buildOptimizer": false,
"sourceMap": true,
"optimization": false,
"namedChunks": true
},
"configurations": {
"production": {
Expand Down Expand Up @@ -57,7 +62,8 @@
}
]
}
}
},
"defaultConfiguration": ""
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
Expand Down Expand Up @@ -100,24 +106,43 @@
"tsConfig": [
"tsconfig.app.json",
"tsconfig.spec.json",
"e2e/tsconfig.json"
"cypress/tsconfig.json"
],
"exclude": [
"**/node_modules/**"
]
}
},
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"builder": "@cypress/schematic:cypress",
"options": {
"devServerTarget": "ngx-file-select:serve",
"watch": false,
"headless": true
},
"configurations": {
"production": {
"devServerTarget": "ngx-file-select:serve:production"
}
}
},
"cypress-run": {
"builder": "@cypress/schematic:cypress",
"options": {
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "ngx-file-select:serve"
},
"configurations": {
"production": {
"devServerTarget": "ngx-file-select:serve:production"
}
}
},
"cypress-open": {
"builder": "@cypress/schematic:cypress",
"options": {
"watch": true,
"headless": false
}
}
}
}
Expand Down
9 changes: 9 additions & 0 deletions component/cypress.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"integrationFolder": "cypress/integration",
"supportFile": "cypress/support/index.ts",
"videosFolder": "cypress/videos",
"screenshotsFolder": "cypress/screenshots",
"pluginsFile": "cypress/plugins/index.ts",
"fixturesFolder": "cypress/fixtures",
"baseUrl": "http://localhost:4200"
}
5 changes: 5 additions & 0 deletions component/cypress/fixtures/example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name": "Using fixtures to represent data",
"email": "hello@cypress.io",
"body": "Fixtures are a great way to mock data for responses to routes"
}
6 changes: 6 additions & 0 deletions component/cypress/integration/spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
describe('My First Test', () => {
it('Visits the initial project page', () => {
cy.visit('/')
cy.contains('Please select a file')
})
})
3 changes: 3 additions & 0 deletions component/cypress/plugins/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Plugins enable you to tap into, modify, or extend the internal behavior of Cypress
// For more info, visit https://on.cypress.io/plugins-api
module.exports = (on, config) => {}
43 changes: 43 additions & 0 deletions component/cypress/support/commands.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// ***********************************************
// This example namespace declaration will help
// with Intellisense and code completion in your
// IDE or Text Editor.
// ***********************************************
// declare namespace Cypress {
// interface Chainable<Subject = any> {
// customCommand(param: any): typeof customCommand;
// }
// }
//
// function customCommand(param: any): void {
// console.warn(param);
// }
//
// NOTE: You can use it like so:
// Cypress.Commands.add('customCommand', customCommand);
//
// ***********************************************
// 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
// ***********************************************
//
//
// -- This is a parent command --
// Cypress.Commands.add("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 component/cypress/support/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// ***********************************************************
// This example support/index.js 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
// ***********************************************************

// When a command from ./commands is ready to use, import with `import './commands'` syntax
// import './commands';
8 changes: 8 additions & 0 deletions component/cypress/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "../tsconfig.json",
"include": ["**/*.ts"],
"compilerOptions": {
"sourceMap": false,
"types": ["cypress"]
}
}
Loading

0 comments on commit 6faf8a1

Please sign in to comment.