diff --git a/app/pods/publications/index/template.hbs b/app/pods/publications/index/template.hbs index 0cf5d05d05..2b581e96a3 100644 --- a/app/pods/publications/index/template.hbs +++ b/app/pods/publications/index/template.hbs @@ -1,296 +1,292 @@ -{{!-- TODO auk-panel-layout gebruiken, component ? --}} -
- - - - -
-

{{t "publications" }}

-
-
-
- - - - - - - - - {{t "filter-content"}} - - + + + + +
+

{{t "publications" }}

+
+
+
+ + + + + + + + + {{t "filter-content"}} + + - - - {{t "publications-new"}} - - - -
-
-
- {{#if this.isShowPublicationModal}} - - {{/if}} - {{#if this.isShowPublicationFilterModal}} - - {{/if}} - {{outlet}} -
-
-
- - - - - {{#each this.tableColumns as |column|}} - {{#if (get this.tableColumnDisplayOptions column.keyName)}} - {{!-- first cases that need a special treament. The "else" clause treats the default case --}} - {{#if (eq column.keyName "caseName")}} - {{!-- TODO not a clean solution using style inline, need an auk-u class for this --}} - - {{t column.translationKey}} - - {{else}} - {{#if column.sortable}} - + + + {{t "publications-new"}} + + + + + +
+
+ + + + + {{#each this.tableColumns as |column|}} + {{#if (get this.tableColumnDisplayOptions column.keyName)}} + {{!-- first cases that need a special treament. The "else" clause treats the default case --}} + {{#if (eq column.keyName "caseName")}} + {{!-- TODO not a clean solution using style inline, need an auk-u class for this --}} + + {{t column.translationKey}} + {{else}} - {{t column.translationKey}} + {{#if column.sortable}} + + {{else}} + {{t column.translationKey}} + {{/if}} {{/if}} {{/if}} + {{/each}} + +   + + + + {{#if this.tableColumnDisplayOptions.caseName}} + {{!-- There is legacy data were case does not have a shortTitle, we have to fall back to title --}} + + {{#if row.case.shortTitle}} + + {{else}} + {{#if row.case.title}} + + {{else}} + {{t "dash"}} + {{/if}} + {{/if}} + {{/if}} - {{/each}} - -   - - - - {{#if this.tableColumnDisplayOptions.caseName}} - {{!-- There is legacy data were case does not have a shortTitle, we have to fall back to title --}} - - {{#if row.case.shortTitle}} - - {{else}} - {{#if row.case.title}} - + {{#if this.tableColumnDisplayOptions.publicationNumber}} + + {{#if row.publicationNumber}} + {{row.publicationNumberToDisplay}} {{else}} {{t "dash"}} {{/if}} - {{/if}} - - {{/if}} - {{#if this.tableColumnDisplayOptions.publicationNumber}} - - {{#if row.publicationNumber}} - {{row.publicationNumberToDisplay}} - {{else}} - {{t "dash"}} - {{/if}} - - {{/if}} - {{#if this.tableColumnDisplayOptions.numacNumber}} - - {{#each row.numacNumbers as |numac|}} - {{numac.name}} - {{else}} - {{t "dash"}} - {{/each}} - - {{/if}} - {{#if this.tableColumnDisplayOptions.regulationType}} - - {{#if row.regulationType}} - {{row.regulationType.label}} - {{else}} - {{t "dash"}} - {{/if}} - - {{/if}} - {{#if this.tableColumnDisplayOptions.meetingDate}} - - {{t "dash"}} - - {{/if}} - {{#if this.tableColumnDisplayOptions.requestedPublicationDate}} - - {{#if row.publishDateRequested}} - {{moment-format row.publishDateRequested "DD-MM-YYYY"}} - {{else}} - {{t "dash"}} - {{/if}} - - {{/if}} - {{#if this.tableColumnDisplayOptions.finalPublicationDate}} - - {{#if row.publishBefore}} - {{!-- TODO We want to check if the publication is still ongoing, no warnings for published/withdrawn --}} - - {{else}} + + {{/if}} + {{#if this.tableColumnDisplayOptions.numacNumber}} + + {{#each row.numacNumbers as |numac|}} + {{numac.name}} + {{else}} + {{t "dash"}} + {{/each}} + + {{/if}} + {{#if this.tableColumnDisplayOptions.regulationType}} + + {{#if row.regulationType}} + {{row.regulationType.label}} + {{else}} + {{t "dash"}} + {{/if}} + + {{/if}} + {{#if this.tableColumnDisplayOptions.meetingDate}} + {{t "dash"}} - {{/if}} - - {{/if}} - {{#if this.tableColumnDisplayOptions.publicationDate}} - - {{if - row.publishedAt - (moment-format row.publishedAt "DD-MM-YYYY") - (t "dash") - }} - - {{/if}} + + {{/if}} + {{#if this.tableColumnDisplayOptions.requestedPublicationDate}} + + {{#if row.publishDateRequested}} + {{moment-format row.publishDateRequested "DD-MM-YYYY"}} + {{else}} + {{t "dash"}} + {{/if}} + + {{/if}} + {{#if this.tableColumnDisplayOptions.finalPublicationDate}} + + {{#if row.publishBefore}} + {{!-- TODO We want to check if the publication is still ongoing, no warnings for published/withdrawn --}} + + {{else}} + {{t "dash"}} + {{/if}} + + {{/if}} + {{#if this.tableColumnDisplayOptions.publicationDate}} + + {{if + row.publishedAt + (moment-format row.publishedAt "DD-MM-YYYY") + (t "dash") + }} + + {{/if}} - {{#if this.tableColumnDisplayOptions.caseManager}} - - {{t "dash"}} - - {{/if}} + {{#if this.tableColumnDisplayOptions.caseManager}} + + {{t "dash"}} + + {{/if}} - {{#if this.tableColumnDisplayOptions.lastEdited}} - - {{moment-format row.modified "DD-MM-YYYY"}}
- - {{moment-format row.modified "HH:mm"}} - - - {{/if}} + {{#if this.tableColumnDisplayOptions.lastEdited}} + + {{moment-format row.modified "DD-MM-YYYY"}}
+ + {{moment-format row.modified "HH:mm"}} + + + {{/if}} - {{#if this.tableColumnDisplayOptions.lastEditedBy}} - - {{t "dash"}} - - {{/if}} + {{#if this.tableColumnDisplayOptions.lastEditedBy}} + + {{t "dash"}} + + {{/if}} - {{#if this.tableColumnDisplayOptions.withdrawnDate}} - - {{t "dash"}} - - {{/if}} + {{#if this.tableColumnDisplayOptions.withdrawnDate}} + + {{t "dash"}} + + {{/if}} - {{#if this.tableColumnDisplayOptions.pauseDate}} - - {{t "dash"}} - - {{/if}} + {{#if this.tableColumnDisplayOptions.pauseDate}} + + {{t "dash"}} + + {{/if}} - {{#if this.tableColumnDisplayOptions.translateRequests}} - - {{#if (gt (await row.translationRequestsTotal) 0)}} - {{#if - (eq (await row.translationRequestsFinished) (await row.translationRequestsTotal)) - }} - - {{await row.translationRequestsFinished}} / {{await row.translationRequestsTotal}} - + {{#if this.tableColumnDisplayOptions.translateRequests}} + + {{#if (gt (await row.translationRequestsTotal) 0)}} + {{#if + (eq (await row.translationRequestsFinished) (await row.translationRequestsTotal)) + }} + + {{await row.translationRequestsFinished}} / {{await row.translationRequestsTotal}} + + {{else}} + + {{await row.translationRequestsFinished}} / {{await row.translationRequestsTotal}} + + {{/if}} {{else}} - - {{await row.translationRequestsFinished}} / {{await row.translationRequestsTotal}} - + {{/if}} - {{else}} - - {{/if}} - - {{/if}} + + {{/if}} - {{#if this.tableColumnDisplayOptions.signRequests}} - - {{t "dash"}} - - {{/if}} - {{#if this.tableColumnDisplayOptions.publishPreviewRequests}} - - {{#if (gt (await row.publishpreviewRequestsTotal) 0)}} - {{#if - (eq (await row.publishpreviewRequestsFinished) (await row.publishpreviewRequestsTotal)) - }} - - {{await row.publishpreviewRequestsFinished}} / {{await row.publishpreviewRequestsTotal}} - + {{#if this.tableColumnDisplayOptions.signRequests}} + + {{t "dash"}} + + {{/if}} + {{#if this.tableColumnDisplayOptions.publishPreviewRequests}} + + {{#if (gt (await row.publishpreviewRequestsTotal) 0)}} + {{#if + (eq (await row.publishpreviewRequestsFinished) (await row.publishpreviewRequestsTotal)) + }} + + {{await row.publishpreviewRequestsFinished}} / {{await row.publishpreviewRequestsTotal}} + + {{else}} + + {{await row.publishpreviewRequestsFinished}} / {{await row.publishpreviewRequestsTotal}} + + {{/if}} {{else}} - - {{await row.publishpreviewRequestsFinished}} / {{await row.publishpreviewRequestsTotal}} - + {{/if}} - {{else}} - - {{/if}} - - {{/if}} + + {{/if}} - {{#if this.tableColumnDisplayOptions.speedProcedure}} - - {{#if row.hasPriority}} - - -

- {{t "priority-procedure"}} -

-
- {{else}} - {{t "dash"}} - {{/if}} - - {{/if}} + {{#if this.tableColumnDisplayOptions.speedProcedure}} + + {{#if row.hasPriority}} + + +

+ {{t "priority-procedure"}} +

+
+ {{else}} + {{t "dash"}} + {{/if}} + + {{/if}} - {{#if this.tableColumnDisplayOptions.comment}} - - {{#if row.remark}} - - -

- {{row.remark}} -

-
- {{else}} + {{#if this.tableColumnDisplayOptions.comment}} + + {{#if row.remark}} + + +

+ {{row.remark}} +

+
+ {{else}} + {{t "dash"}} + {{/if}} + + {{/if}} + {{#if this.tableColumnDisplayOptions.fromDesignAgenda}} + {{t "dash"}} - {{/if}} - - {{/if}} - {{#if this.tableColumnDisplayOptions.fromDesignAgenda}} - - {{t "dash"}} + + {{/if}} + + + + - {{/if}} - - - - - -
-
-
+ + + +
+{{#if this.isShowPublicationModal}} + +{{/if}} +{{#if this.isShowPublicationFilterModal}} + +{{/if}} {{#if this.showTableDisplayOptions}} { cy.login('Admin'); }); + // TODO so much setup for 1 assert + it('Should show no warning in kortbestek view', () => { const caseTitle = `testId=${currentTimestamp()}: Cypress test dossier 1`; const agendaDate = Cypress.moment().add(3, 'weeks') diff --git a/cypress/integration/unit/NewsletterInfo/shouldSwitchTheFinishedSwitch.spec.js b/cypress/integration/unit/NewsletterInfo/shouldSwitchTheFinishedSwitch.spec.js index 0bc0d6f121..ebaffb9e14 100644 --- a/cypress/integration/unit/NewsletterInfo/shouldSwitchTheFinishedSwitch.spec.js +++ b/cypress/integration/unit/NewsletterInfo/shouldSwitchTheFinishedSwitch.spec.js @@ -31,7 +31,7 @@ context('NewsletterInfo: Switching the finished switch', () => { .wait('@patchNewsletterInfo'); }); - it('Should check the box "in kort bestek" and uncheck ik afterward', () => { + it('Should check the box "in kort bestek" and uncheck it afterward', () => { cy.route('PATCH', '/newsletter-infos/*').as('patchNewsletterInfo'); goToKortBestek(); cy.get('.auk-checkbox').last() diff --git a/cypress/integration/unit/case/case.spec.js b/cypress/integration/unit/case/case.spec.js index fffaca138c..5d4cc31110 100644 --- a/cypress/integration/unit/case/case.spec.js +++ b/cypress/integration/unit/case/case.spec.js @@ -15,7 +15,10 @@ context('Create case as Admin user', () => { cy.logout(); }); + // TODO missing asserts? Clicking a button does not mean it works, maybe there is a verify modal or an error + it('Create a case with confidentiality and short title', () => { + // TODO use the createCase command, use data selectors cy.visit('/dossiers'); cy.get(cases.casesHeaderAddCase).click(); cy.get(form.formVlToggle).eq(0) @@ -37,6 +40,8 @@ context('Create case as Admin user', () => { cy.visit('/dossiers'); cy.get(cases.casesHeaderAddCase).click(); cy.get(form.formCancelButton).click(); + // TODO assert modal is gone ? + // TODO assert there is no state when cancelling en recreating ? }); it('Een lege procedurestap kopieƫren in een dossier zou geen fouten mogen geven.', () => { @@ -47,6 +52,7 @@ context('Create case as Admin user', () => { cy.get(cases.casesHeaderAddCase).click(); cy.get('button').contains('Dossier aanmaken') .click(); + // TODO testing without title is done in next it, DUPLICATE test cy.get(modal.publication.alertError).should('be.visible'); cy.get(modal.publication.alertError).contains('Kijk het formulier na'); cy.get('.vlc-input-field-block').eq(1)