GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add Cypress E2E env and first test for local & ci · feidianbo/angular-split@1088e85

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • angular.json
  • cypress.json
  • cypress
    • fixtures
      • example.json
    • integration
      • basic.spec.js
    • plugins
      • index.js
    • support
      • commands.js
      • index.js
  • e2e
    • protractor.conf.js
    • src
      • app.e2e-spec.ts
      • app.po.ts
    • tsconfig.e2e.json
  • package-lock.json
  • package.json
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎angular.json‎

Copy file name to clipboardExpand all lines: angular.json
-28Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -107,34 +107,6 @@
107107
}
108108
}
109109
},
110-
"angular-split-app-e2e": {
111-
"root": "e2e/",
112-
"projectType": "application",
113-
"prefix": "",
114-
"architect": {
115-
"e2e": {
116-
"builder": "@angular-devkit/build-angular:protractor",
117-
"options": {
118-
"protractorConfig": "e2e/protractor.conf.js",
119-
"devServerTarget": "angular-split-app:serve"
120-
},
121-
"configurations": {
122-
"production": {
123-
"devServerTarget": "angular-split-app:serve:production"
124-
}
125-
}
126-
},
127-
"lint": {
128-
"builder": "@angular-devkit/build-angular:tslint",
129-
"options": {
130-
"tsConfig": "e2e/tsconfig.e2e.json",
131-
"exclude": [
132-
"**/node_modules/**"
133-
]
134-
}
135-
}
136-
}
137-
},
138110
"angular-split": {
139111
"root": "projects/angular-split",
140112
"sourceRoot": "projects/angular-split/src",
Collapse file

‎cypress.json‎

Copy file name to clipboard
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}
Collapse file

‎cypress/fixtures/example.json‎

Copy file name to clipboard
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"name": "Using fixtures to represent data",
3+
"email": "[email protected]",
4+
"body": "Fixtures are a great way to mock data for responses to routes"
5+
}
Collapse file

‎cypress/integration/basic.spec.js‎

Copy file name to clipboard
+29Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/// <reference types="Cypress" />
2+
3+
context('Direction change', () => {
4+
beforeEach(() => {
5+
cy.visit('http://localhost:4200/#/examples/simple-split')
6+
})
7+
8+
it('cy.viewport() - set the viewport size and dimension', () => {
9+
cy.viewport(800, 600);
10+
11+
const W = 650;
12+
const H = 300;
13+
const GUTTER = 11;
14+
15+
cy.get('as-split').should('have.css', 'flex-direction', 'row');
16+
cy.get('as-split-area[size="30"]').should('have.css', 'height', `${ H }px`);
17+
cy.get('as-split-area[size="30"]').should('have.css', 'flex', '0 0 calc(-3.3px + 30%)');
18+
cy.get('as-split-area[size="70"]').should('have.css', 'height', `${ H }px`);
19+
cy.get('as-split-area[size="70"]').should('have.css', 'flex', '0 0 calc(-7.7px + 70%)');
20+
21+
cy.get('.btns > .btn').click();
22+
23+
cy.get('as-split').should('have.css', 'flex-direction', 'column');
24+
cy.get('as-split-area[size="30"]').should('have.css', 'width', `${ W }px`);
25+
cy.get('as-split-area[size="30"]').should('have.css', 'flex', '0 0 calc(-3.3px + 30%)');
26+
cy.get('as-split-area[size="70"]').should('have.css', 'width', `${ W }px`);
27+
cy.get('as-split-area[size="70"]').should('have.css', 'flex', '0 0 calc(-7.7px + 70%)');
28+
})
29+
})
Collapse file

‎cypress/plugins/index.js‎

Copy file name to clipboard
+17Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// ***********************************************************
2+
// This example plugins/index.js can be used to load plugins
3+
//
4+
// You can change the location of this file or turn off loading
5+
// the plugins file with the 'pluginsFile' configuration option.
6+
//
7+
// You can read more here:
8+
// https://on.cypress.io/plugins-guide
9+
// ***********************************************************
10+
11+
// This function is called when a project is opened or re-opened (e.g. due to
12+
// the project's config changing)
13+
14+
module.exports = (on, config) => {
15+
// `on` is used to hook into various events Cypress emits
16+
// `config` is the resolved Cypress config
17+
}
Collapse file

‎cypress/support/commands.js‎

Copy file name to clipboard
+25Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// ***********************************************
2+
// This example commands.js shows you how to
3+
// create various custom commands and overwrite
4+
// existing commands.
5+
//
6+
// For more comprehensive examples of custom
7+
// commands please read more here:
8+
// https://on.cypress.io/custom-commands
9+
// ***********************************************
10+
//
11+
//
12+
// -- This is a parent command --
13+
// Cypress.Commands.add("login", (email, password) => { ... })
14+
//
15+
//
16+
// -- This is a child command --
17+
// Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... })
18+
//
19+
//
20+
// -- This is a dual command --
21+
// Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... })
22+
//
23+
//
24+
// -- This is will overwrite an existing command --
25+
// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... })
Collapse file

‎cypress/support/index.js‎

Copy file name to clipboard
+20Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// ***********************************************************
2+
// This example support/index.js is processed and
3+
// loaded automatically before your test files.
4+
//
5+
// This is a great place to put global configuration and
6+
// behavior that modifies Cypress.
7+
//
8+
// You can change the location of this file or turn off
9+
// automatically serving support files with the
10+
// 'supportFile' configuration option.
11+
//
12+
// You can read more here:
13+
// https://on.cypress.io/configuration
14+
// ***********************************************************
15+
16+
// Import commands.js using ES2015 syntax:
17+
import './commands'
18+
19+
// Alternatively you can use CommonJS syntax:
20+
// require('./commands')
Collapse file

‎e2e/protractor.conf.js‎

Copy file name to clipboardExpand all lines: e2e/protractor.conf.js
-28Lines changed: 0 additions & 28 deletions
This file was deleted.
Collapse file

‎e2e/src/app.e2e-spec.ts‎

Copy file name to clipboardExpand all lines: e2e/src/app.e2e-spec.ts
-14Lines changed: 0 additions & 14 deletions
This file was deleted.
Collapse file

‎e2e/src/app.po.ts‎

Copy file name to clipboardExpand all lines: e2e/src/app.po.ts
-11Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.