Skip to content

Commit

Permalink
chore(deps): Update to Angular 17 (#609)
Browse files Browse the repository at this point in the history
* ng update @angular/core@15 @angular/cli@15
* ng update @angular/material@15
* npm update [email protected] --force
* ng update @angular/core@16 @angular/cli@16 --force
* npm install [email protected] --force
* npm install [email protected] --force
* ng update @angular/core@17 @angular/cli@17 --force
* ng update @angular/material@16
* ng generate @angular/material:mdc-migration
* ng update @angular/material@17
* Update other dependencies
* Add cypress screenshots to .gitignore
  • Loading branch information
stefan-niedermann authored Jan 16, 2024
1 parent 27b0057 commit 392cd7a
Show file tree
Hide file tree
Showing 13 changed files with 15,557 additions and 11,079 deletions.
19 changes: 0 additions & 19 deletions .browserslistrc

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
/tmp
/out-tsc
/.angular
/cypress/screenshots
/cypress/videos
# Only exists if Bazel was run
/bazel-out
Expand Down
6 changes: 3 additions & 3 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,18 +86,18 @@
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "upcoming-analyzer:build"
"buildTarget": "upcoming-analyzer:build"
},
"configurations": {
"production": {
"browserTarget": "upcoming-analyzer:build:production"
"buildTarget": "upcoming-analyzer:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "upcoming-analyzer:build"
"buildTarget": "upcoming-analyzer:build"
}
},
"test": {
Expand Down
46 changes: 23 additions & 23 deletions cypress/e2e/spec.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,55 +18,55 @@ describe('Analyzer main screen', () => {

it('Should en/disable options dynamically which do not make sense', () => {
cy.visit('/');
cy.get('[formControlName="someoneElseAssigned"] input').should('be.disabled')
cy.get('[formControlName="someoneElseAssigned"] button').should('be.disabled')
cy.get('[formControlName="isSharedBoard"]').click()
cy.get('[formControlName="someoneElseAssigned"] input').should('be.enabled')
cy.get('[formControlName="someoneElseAssigned"] button').should('be.enabled')
cy.get('[formControlName="isSharedBoard"]').click()
cy.get('[formControlName="someoneElseAssigned"] input').should('be.disabled')
cy.get('[formControlName="someoneElseAssigned"] button').should('be.disabled')
})

it('Should clear options which got disabled, no matter what they were set before', () => {
cy.visit('/');

cy.get('[formControlName="someoneElseAssigned"] input').should('be.disabled')
cy.get('[formControlName="someoneElseAssigned"] input').should('not.be.checked')
cy.get('[formControlName="someoneElseAssigned"] button').should('be.disabled')
cy.get('[formControlName="someoneElseAssigned"] button').invoke('attr', 'aria-checked').should('not.eq', 'true')

cy.get('[formControlName="isSharedBoard"]').click()
cy.get('[formControlName="someoneElseAssigned"] input').should('be.enabled')
cy.get('[formControlName="someoneElseAssigned"] input').should('not.be.checked')
cy.get('[formControlName="isSharedBoard"] button').click()
cy.get('[formControlName="someoneElseAssigned"] button').should('be.enabled')
cy.get('[formControlName="someoneElseAssigned"] button').invoke('attr', 'aria-checked').should('not.eq', 'true')

cy.get('[formControlName="isSharedBoard"]').click()
cy.get('[formControlName="someoneElseAssigned"] input').should('be.disabled')
cy.get('[formControlName="someoneElseAssigned"] input').should('not.be.checked')
cy.get('[formControlName="isSharedBoard"] button').click()
cy.get('[formControlName="someoneElseAssigned"] button').should('be.disabled')
cy.get('[formControlName="someoneElseAssigned"] button').invoke('attr', 'aria-checked').should('not.eq', 'true')

cy.get('[formControlName="isSharedBoard"]').click()
cy.get('[formControlName="someoneElseAssigned"]').click()
cy.get('[formControlName="someoneElseAssigned"] input').should('be.enabled')
cy.get('[formControlName="someoneElseAssigned"] input').should('be.checked')
cy.get('[formControlName="isSharedBoard"] button').click()
cy.get('[formControlName="someoneElseAssigned"] button').click()
cy.get('[formControlName="someoneElseAssigned"] button').should('be.enabled')
cy.get('[formControlName="someoneElseAssigned"] button').invoke('attr', 'aria-checked').should('eq', 'true')

cy.get('[formControlName="isSharedBoard"]').click()
cy.get('[formControlName="someoneElseAssigned"] input').should('be.disabled')
cy.get('[formControlName="someoneElseAssigned"] input').should('not.be.checked')
cy.get('[formControlName="isSharedBoard"] button').click()
cy.get('[formControlName="someoneElseAssigned"] button').should('be.disabled')
cy.get('[formControlName="someoneElseAssigned"] button').invoke('attr', 'aria-checked').should('not.eq', 'true')
})

it('Should display appropriate hints for input', () => {
cases.forEach(([description, expected]) => {
cy.visit('/');

if (description.isDone) {
cy.get('[formControlName="isDone"]').click()
cy.get('[formControlName="isDone"] button').click()
}
if (description.isSharedBoard) {
cy.get('[formControlName="isSharedBoard"]').click()
cy.get('[formControlName="isSharedBoard"] button').click()
}
if (description.hasDueDate) {
cy.get('[formControlName="hasDueDate"]').click()
cy.get('[formControlName="hasDueDate"] button').click()
}
if (description.youAssigned) {
cy.get('[formControlName="youAssigned"]').click()
cy.get('[formControlName="youAssigned"] button').click()
}
if (description.someoneElseAssigned) {
cy.get('[formControlName="someoneElseAssigned"]').click()
cy.get('[formControlName="someoneElseAssigned"] button').click({ force: true })
}

cy.contains(expected);
Expand Down
Loading

0 comments on commit 392cd7a

Please sign in to comment.