Skip to content

Commit

Permalink
Merge branch 'development' into DES/enhancement/#732-vlc-refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
brenner-company committed Apr 16, 2021
2 parents c3bafc8 + 3a78650 commit 5646045
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
18 changes: 14 additions & 4 deletions cypress/integration/unit/publication.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ context('Publications tests', () => {
cy.visit(publicationOverviewUrl);
cy.get(publicationSelectors.newPublicationButton).click();
cy.get(modalSelectors.auModal.container).as('publicationModal');
cy.route('POST', '/publication-flows').as('createNewPublicationFlow');
cy.get('@publicationModal').within(() => {
// No errors on initial view, just info
cy.get(modalSelectors.publication.alertInfo, {
Expand Down Expand Up @@ -72,6 +73,9 @@ context('Publications tests', () => {
timeout: 5000,
}).should('exist');
});
cy.wait('@createNewPublicationFlow', {
timeout: 20000,
});
});

it('should clear input data when closing and reopening modal to create new publication', () => {
Expand Down Expand Up @@ -128,8 +132,11 @@ context('Publications tests', () => {
cy.visit(publicationOverviewUrl);

cy.route('/publication-flows/**').as('getNewPublicationDetail');
cy.get(publicationSelectors.goToPublication).first()
.click();
cy.contains('200').parents('tr')
.within(() => {
cy.get(publicationSelectors.goToPublication)
.click();
});
cy.wait('@getNewPublicationDetail');
// TODO This test is VERY dependent on existing data from previous test, fixing this for now but this will break at some point
cy.get(publicationSelectors.publicationDetailHeaderShortTitle).should('contain', shortTitle);
Expand All @@ -140,8 +147,11 @@ context('Publications tests', () => {
cy.visit(publicationOverviewUrl);

cy.route('/publication-flows/**').as('getNewPublicationDetail');
cy.get(publicationSelectors.goToPublication).first()
.click();
cy.contains('200').parents('tr')
.within(() => {
cy.get(publicationSelectors.goToPublication)
.click();
});
cy.wait('@getNewPublicationDetail');

cy.get(publicationSelectors.editInscriptionButton).click();
Expand Down
4 changes: 3 additions & 1 deletion cypress/support/commands/agenda-commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,9 @@ function addAgendaitemToAgenda(caseTitle, postponed) {
cy.wait('@getSubcasesFiltered', {
timeout: 12000,
});
cy.get('.auk-loader').should('not.exist');
cy.get('.auk-loader', {
timeout: 12000,
}).should('not.exist');
cy.get('table > tbody > tr').as('rows');
} else {
cy.get('table > tbody > tr').as('rows');
Expand Down

0 comments on commit 5646045

Please sign in to comment.