Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ node_modules/*
# logs
*logs

# Cypress
cypress/videos
cypress/screenshots
cypress/downloads
.cypress

# dist
dist/
31 changes: 28 additions & 3 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@
},
"production": {
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
Expand All @@ -56,7 +61,7 @@
"scripts": true,
"styles": {
"minify": true,
"inlineCritical": false
"inlineCritical": true
},
"fonts": true
},
Expand Down Expand Up @@ -118,10 +123,30 @@
"schematics": {
"@schematics/angular:component": {
"prefix": "app",
"style": "css"
"style": "css",
"type": "component"
},
"@schematics/angular:directive": {
"prefix": "app"
"prefix": "app",
"type": "directive"
},
"@schematics/angular:service": {
"type": "service"
},
"@schematics/angular:guard": {
"typeSeparator": "."
},
"@schematics/angular:interceptor": {
"typeSeparator": "."
},
"@schematics/angular:module": {
"typeSeparator": "."
},
"@schematics/angular:pipe": {
"typeSeparator": "."
},
"@schematics/angular:resolver": {
"typeSeparator": "."
}
},
"cli": {
Expand Down
13 changes: 9 additions & 4 deletions browserslist
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,13 @@
# You can see what browsers were selected by your queries by running:
# npx browserslist

> 0.5%
last 2 versions
Firefox ESR
last 2 Chrome versions
last 2 Firefox versions
last 2 Edge versions
last 2 Safari versions
last 2 iOS versions
not dead
not IE 9-11 # For IE 9-11 support, remove 'not'.
not IE 11
not op_mini all
not kaios > 0
not android < 5
17 changes: 17 additions & 0 deletions cypress.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { defineConfig } from 'cypress';

export default defineConfig({
e2e: {
baseUrl: 'http://localhost:4200',
specPattern: 'cypress/e2e/**/*.cy.ts',
supportFile: 'cypress/support/e2e.ts',
videosFolder: 'cypress/videos',
screenshotsFolder: 'cypress/screenshots',
video: false,
viewportWidth: 1280,
viewportHeight: 720,
setupNodeEvents(on, config) {
// implement node event listeners here
},
},
});
13 changes: 13 additions & 0 deletions cypress/e2e/app.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
describe('HPO App', () => {
beforeEach(() => {
cy.visit('/');
});

it('should display welcome message', () => {
cy.get('.info-section h2').should('contain', 'The Human Phenotype Ontology');
});

it('should load the homepage', () => {
cy.url().should('include', 'localhost:4200');
Copy link

Copilot AI Feb 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This assertion hard-codes localhost:4200, which will be brittle in CI or when running Cypress against a non-localhost baseUrl (e.g. 127.0.0.1, a preview URL, different port). Prefer asserting on cy.location('pathname')/host, or compare against Cypress.config('baseUrl').

Suggested change
cy.url().should('include', 'localhost:4200');
cy.location('pathname').should('eq', '/');

Copilot uses AI. Check for mistakes.
});
});
22 changes: 22 additions & 0 deletions cypress/support/commands.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/// <reference types="cypress" />

// ***********************************************
// This example commands.ts 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
// ***********************************************

declare global {
namespace Cypress {
interface Chainable {
// Add custom commands here
// login(email: string, password: string): Chainable<void>
}
}
}

export {};
20 changes: 20 additions & 0 deletions cypress/support/e2e.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// ***********************************************************
// This example support/e2e.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.js using ES2015 syntax:
import './commands';

// Alternatively you can use CommonJS syntax:
// require('./commands')
10 changes: 10 additions & 0 deletions cypress/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"types": ["cypress", "node"],
"target": "es2021",
"lib": ["es2021", "dom"],
"isolatedModules": false
},
"include": ["**/*.ts"]
}
14 changes: 0 additions & 14 deletions e2e/app.e2e-spec.ts

This file was deleted.

11 changes: 0 additions & 11 deletions e2e/app.po.ts

This file was deleted.

14 changes: 0 additions & 14 deletions e2e/tsconfig.e2e.json

This file was deleted.

Loading