diff --git a/src/main/webapp/app/shared/subject/subject.component.ts b/src/main/webapp/app/shared/subject/subject.component.ts index bd9cf1671..df68a2a5e 100644 --- a/src/main/webapp/app/shared/subject/subject.component.ts +++ b/src/main/webapp/app/shared/subject/subject.component.ts @@ -313,6 +313,8 @@ export class SubjectComponent implements OnInit, OnDestroy, OnChanges { } else { this.dateOfBirthError = true; } + } else { + this.filterTriggerUpdate$.next(field); } } diff --git a/src/test/javascript/e2e/cypress/integration/entities/subject.spec.ts b/src/test/javascript/e2e/cypress/integration/entities/subject.spec.ts index 88a5fbb81..7e043c334 100644 --- a/src/test/javascript/e2e/cypress/integration/entities/subject.spec.ts +++ b/src/test/javascript/e2e/cypress/integration/entities/subject.spec.ts @@ -11,14 +11,12 @@ describe('Subject e2e test', () => { }); it('should load create Subject dialog', () => { - cy.wait(1000); cy.get('jhi-subjects button.create-subject').click(); cy.get('jhi-subject-dialog h4.modal-title').first().should('have.text', 'Create or edit a Subject'); cy.get('jhi-subject-dialog button.close').click(); }); it('should be able to create new subject', () => { - cy.wait(1000); cy.get('jhi-subjects button.create-subject').click(); cy.get('jhi-subject-dialog input[name=externalLink]').type('https://radar-base-test.org'); cy.get('jhi-subject-dialog input[name=externalId]').type('test-subject-1'); @@ -33,7 +31,6 @@ describe('Subject e2e test', () => { }); it('should be able to edit a subject', () => { - cy.wait(1000); cy.contains('jhi-subjects .subject-row', 'test-subject-1').contains('button', 'Edit').click(); cy.get('jhi-subject-dialog input[name=externalLink]').clear().type('https://radar-base-test-edited.org'); cy.contains('jhi-subject-dialog button.btn-primary', 'Save').click(); @@ -41,7 +38,6 @@ describe('Subject e2e test', () => { }); it('should have load subject row with subject-id, external-id, status, project, sources and attributes columns', () => { - cy.wait(1000); cy.get('jhi-subjects .subject-row').first().find('.subject-row__select-row input') .invoke('attr', 'type') .should('eq', 'checkbox') @@ -80,7 +76,6 @@ describe('Subject e2e test', () => { }) it('should be able to filter subjects by subject id', () => { - cy.wait(1000); cy.get('#field-subject-id').type('b-1'); cy.get('jhi-subjects .subject-row').should('have.length', 11); cy.get('#field-subject-id').clear(); @@ -88,7 +83,6 @@ describe('Subject e2e test', () => { }); it('should be able to filter subjects by subject external id', () => { - cy.wait(1000); cy.get('#field-subject-external-id').type('test-subject-1'); cy.get('jhi-subjects .subject-row').should('have.length', 1); cy.get('#field-subject-external-id').clear(); @@ -96,7 +90,6 @@ describe('Subject e2e test', () => { }); it('should be able to filter subjects by human readable id', () => { - cy.wait(1000); cy.get('#advanced-filter').click(); cy.get('#field-human-readable-id').type('Test'); cy.get('jhi-subjects .subject-row').should('have.length', 1); @@ -106,7 +99,6 @@ describe('Subject e2e test', () => { }); it('should be able to filter subjects by person name', () => { - cy.wait(1000); cy.get('#advanced-filter').click(); cy.get('#field-person-name').type('Test'); cy.get('jhi-subjects .subject-row').should('have.length', 1); @@ -118,7 +110,6 @@ describe('Subject e2e test', () => { // TODO Filter by group it('should be able to filter subjects by date of birth', () => { - cy.wait(1000); cy.get('#advanced-filter').click(); cy.get('#field_date_of_birth').type('1980-01-01'); cy.get('jhi-subjects .subject-row').should('have.length', 1); @@ -130,7 +121,6 @@ describe('Subject e2e test', () => { // TODO Filter by Enrollment Date it('should be able to sort subjects by subject id in asc/desc order', () => { - cy.wait(1000); cy.get('jhi-subjects #field-order-by').click(); cy.get('jhi-subjects #order-by-desc').click(); cy.get('jhi-subjects .subject-row').first().should('contain.text', 'sub-9'); @@ -141,7 +131,6 @@ describe('Subject e2e test', () => { it('should be able to sort subjects by external id in asc/desc order', () => { - cy.wait(1000); cy.get('jhi-subjects #field-sort-by').click(); cy.get('jhi-subjects #sort-by-externalId').click(); cy.get('jhi-subjects .subject-row').first().should('contain.text', 'sub-1'); @@ -151,7 +140,6 @@ describe('Subject e2e test', () => { }); it('should be able to delete a subject without source', () => { - cy.wait(1000); cy.contains('jhi-subjects .subject-row', 'test-subject-1').find('a').first().click(); cy.contains('jhi-subject-detail button', 'Delete').click(); cy.contains('jhi-subject-delete-dialog button', 'Delete').click(); @@ -159,7 +147,6 @@ describe('Subject e2e test', () => { }); it('should be able to delete a group', () => { - cy.wait(1000); cy.contains('jhi-project-detail ul.nav-tabs .nav-item', 'Groups').click(); cy.contains('jhi-groups .group-row', 'Test Group C').contains('button', 'Delete').click(); cy.contains('jhi-group-delete-dialog button', 'Delete').click(); @@ -167,14 +154,12 @@ describe('Subject e2e test', () => { }); it('should show number of loaded subjects and total number of subjects', () => { - cy.wait(1000); cy.contains('jhi-project-detail ul.nav-tabs .nav-item', 'Subjects').click(); cy.get('jhi-subjects a.subject-pagination__load-more').should('have.text', 'Load more (20/25 shown)'); cy.get('jhi-subjects .subject-row').should('have.length', 20); }); it('should be able to load subjects on loadMore click', () => { - cy.wait(1000); cy.get('jhi-subjects a.subject-pagination__load-more').click(); cy.get('jhi-subjects span.subject-pagination__all-loaded').should('have.text', 'All 25 subjects loaded'); cy.get('jhi-subjects .subject-row').should('have.length', 25); diff --git a/src/test/javascript/e2e/cypress/integration/scenarios/generate-qr-code.spec.ts b/src/test/javascript/e2e/cypress/integration/scenarios/generate-qr-code.spec.ts index 0b6c4c372..a744eea01 100644 --- a/src/test/javascript/e2e/cypress/integration/scenarios/generate-qr-code.spec.ts +++ b/src/test/javascript/e2e/cypress/integration/scenarios/generate-qr-code.spec.ts @@ -7,7 +7,6 @@ describe('Project view: Generate QR code', () => { }); it('should open pair app dialog', () => { - cy.wait(1000); cy.contains('button', 'Pair App').first().click(); cy.get('[name=pairForm]').find('h4').first() .should('have.text', 'Pair an application');