Skip to content

Commit

Permalink
Chore deps ng (#99)
Browse files Browse the repository at this point in the history
* eslint

* cypress

* jest

* angular/core

* cdk and material
  • Loading branch information
Hypercubed authored Aug 15, 2022
1 parent 83db6df commit 10104a8
Show file tree
Hide file tree
Showing 80 changed files with 38,945 additions and 16,748 deletions.
24 changes: 24 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
root: true
extends:
- '@swimlane'
- prettier
overrides:
- files:
- '*.ts'
parser: '@typescript-eslint/parser'
parserOptions:
project:
- tsconfig.json
createDefaultProgram: true
extends:
- '@swimlane/eslint-config/typescript'
- plugin:@angular-eslint/recommended
- plugin:@angular-eslint/template/process-inline-templates
- prettier
rules:
'@typescript-eslint/explicit-module-boundary-types': 'off'
'@typescript-eslint/no-explicit-any': 'off'
- files:
- '*.html'
extends:
- plugin:@angular-eslint/template/recommended
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
!.vscode/extensions.json

# misc
/.angular/cache
/.sass-cache
/connect.lock
/coverage
Expand Down
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
legacy-peer-deps = true
51 changes: 21 additions & 30 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,11 @@
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"builder": "@angular-eslint/builder:lint",
"options": {
"tsConfig": [
"tsconfig.app.json",
"tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
"lintFilePatterns": [
"src/**/*.ts",
"src/**/*.html"
]
}
},
Expand Down Expand Up @@ -145,14 +142,11 @@
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"builder": "@angular-eslint/builder:lint",
"options": {
"tsConfig": [
"projects/swimlane/docspa-core/tsconfig.lib.json",
"projects/swimlane/docspa-core/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
"lintFilePatterns": [
"projects/swimlane/docspa-core/**/*.ts",
"projects/swimlane/docspa-core/**/*.html"
]
}
}
Expand Down Expand Up @@ -185,14 +179,11 @@
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"builder": "@angular-eslint/builder:lint",
"options": {
"tsConfig": [
"projects/swimlane/docspa-stackblitz/tsconfig.lib.json",
"projects/swimlane/docspa-stackblitz/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
"lintFilePatterns": [
"projects/swimlane/docspa-stackblitz/**/*.ts",
"projects/swimlane/docspa-stackblitz/**/*.html"
]
}
}
Expand Down Expand Up @@ -225,19 +216,19 @@
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"builder": "@angular-eslint/builder:lint",
"options": {
"tsConfig": [
"projects/swimlane/docspa-search/tsconfig.lib.json",
"projects/swimlane/docspa-search/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
"lintFilePatterns": [
"projects/swimlane/docspa-search/**/*.ts",
"projects/swimlane/docspa-search/**/*.html"
]
}
}
}
}
},
"defaultProject": "docspa"
}
"defaultProject": "docspa",
"cli": {
"defaultCollection": "@angular-eslint/schematics"
}
}
15 changes: 15 additions & 0 deletions cypress.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { defineConfig } from 'cypress'

export default defineConfig({
viewportWidth: 1920,
viewportHeight: 1080,
video: false,
e2e: {
// We've imported your old cypress plugins here.
// You may want to clean this up later by importing these.
setupNodeEvents(on, config) {
return require('./cypress/plugins/index.js')(on, config)
},
baseUrl: 'http://localhost:4200',
},
})
6 changes: 0 additions & 6 deletions cypress.json

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ describe('The Features page', () => {
pageAliases();
});

before(() => cy.visit('/features'));
before(() => {
cy.visit('/features');
cy.waitForNetworkIdle(1000);
});

it('has a title', () => {
cy.title().should('eq', 'DocSPA - Content Features')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ describe('The Home page', () => {
pageAliases();
});

before(() => cy.visit('/'));
before(() => {
cy.visit('/');
cy.waitForNetworkIdle(1000);
});

it('has a title and metadata', () => {
cy.title().should('eq', 'DocSPA');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ describe('Main navigation', () => {
cy.get('app-root').find('nav.app-nav').as('navbar');
});

before(() => cy.visit('/'));
before(() => {
cy.visit('/');
cy.waitForNetworkIdle(1000);
});

it('start on readme', () => {
cy.url().should('eq', 'http://localhost:4200/');
Expand Down
35 changes: 28 additions & 7 deletions cypress/integration/others.ts → cypress/e2e/others.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ describe('Other pages', () => {
});

describe('Page not found', () => {
before(() => cy.visit('/not-found'));
before(() => {
cy.visit('/not-found');
cy.waitForNetworkIdle(1000);
});

it('has a title', () => {
cy.title().should('eq', 'DocSPA - ERROR 404')
Expand All @@ -25,7 +28,10 @@ describe('Other pages', () => {
});

describe('Sub directory readme not found', () => {
before(() => cy.visit('/sub')); // note: this does not match sub/
before(() => {
cy.visit('/sub');
cy.waitForNetworkIdle(1000);
});

it('has a title', () => {
cy.title().should('eq', 'DocSPA - ERROR 404')
Expand All @@ -41,7 +47,10 @@ describe('Other pages', () => {
});

describe('The Sub page', () => {
before(() => cy.visit('/sub/'));
before(() => {
cy.visit('/sub/');
cy.waitForNetworkIdle(1000);
});

it('has a title', () => {
cy.title().should('eq', 'DocSPA - Test Sub Page');
Expand Down Expand Up @@ -92,7 +101,10 @@ describe('Other pages', () => {
});

describe('The Sub-sub A page', () => {
before(() => cy.visit('/sub/sub/a'));
before(() => {
cy.visit('/sub/sub/a');
cy.waitForNetworkIdle(1000);
});

it('has a title', () => {
cy.title().should('eq', 'DocSPA - Sub A')
Expand Down Expand Up @@ -120,7 +132,10 @@ describe('Other pages', () => {
});

describe('Page not found in subdir', () => {
before(() => cy.visit('/sub/here-too'));
before(() => {
cy.visit('/sub/here-too');
cy.waitForNetworkIdle(1000);
});

it('has a title', () => {
cy.title().should('eq', 'DocSPA - ERROR 404')
Expand All @@ -144,7 +159,10 @@ describe('Other pages', () => {
});

describe('Sub navigation', () => {
before(() => cy.visit('/sub/'));
before(() => {
cy.visit('/sub/');
cy.waitForNetworkIdle(1000);
});

afterEach(() => {
cy.get('@sidebar').find('a[href="/sub/"]').click({ force: true });
Expand Down Expand Up @@ -187,7 +205,10 @@ describe('Other pages', () => {
});

describe('Test Page', () => {
before(() => cy.visit('/sub/test'));
before(() => {
cy.visit('/sub/test');
cy.waitForNetworkIdle(1000);
});

it('check links', () => {
cy.get('@content').find('section[id="links"] > h1').contains('Links');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
describe('pagination', () => {
before(() => cy.visit('/'));
before(() => {
cy.visit('/');
cy.waitForNetworkIdle(1000);
});

it('has pagination links', () => {
cy.get('app-root').find('footer').within(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ describe('The quickstart page', () => {
cy.get('app-root').find('section.content').as('content');
});

before(() => cy.visit('/quickstart'));
before(() => {
cy.visit('/quickstart');
cy.waitForNetworkIdle(1000);
});

it('has a title', () => {
cy.title().should('eq', 'DocSPA - Quick start')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { dom } from '@swimlane/cy-dom-diff';
describe('Search', () => {
before(() => {
cy.visit('/');
cy.waitForNetworkIdle(1000);
cy.get('body', { timeout: 10000 }).should('have.class', 'ready');
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ describe('page component is a subpage', () => {
pageAliases();
});

before(() => cy.visit('/docspa/'));
before(() => {
cy.visit('/docspa/');
cy.waitForNetworkIdle(1000);
});

it('has a title and metadata', () => {
cy.title().should('eq', 'DocSPA');
Expand Down
3 changes: 1 addition & 2 deletions cypress/support/index.js → cypress/support/e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
// ***********************************************************

import '@swimlane/cy-dom-diff/commands';

// Import commands.js using ES2015 syntax:
import './commands';
import 'cypress-network-idle';

2 changes: 1 addition & 1 deletion cypress/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"compilerOptions": {
"target": "es5",
"lib": ["es5", "dom"],
"types": ["cypress"]
"types": ["cypress", "cypress-network-idle"]
},
"include": ["**/*.ts"]
}
Loading

0 comments on commit 10104a8

Please sign in to comment.