|
| 1 | +# Date: 29/01/2022 |
| 2 | +# Author: Eugeniu Costetchi |
| 3 | +# Email: costezki.eugen@gmail.com |
| 4 | + |
| 5 | +Feature: Notice state and content in the lifecycle process |
| 6 | + |
| 7 | + A notice accounts for its state and status in the process lifecycle |
| 8 | + so that affordances are known and constraints are met. |
| 9 | + |
| 10 | + Scenario: add normalised metadata |
| 11 | + Given a notice |
| 12 | + And normalised metadata |
| 13 | + When normalised metadata is added |
| 14 | + Then the notice object contains the normalised metadata |
| 15 | + And the notice status is NORMALISED_METADATA |
| 16 | + |
| 17 | + Scenario: overwrite normalised metadata |
| 18 | + Given a notice eligible for transformation |
| 19 | + And normalised metadata |
| 20 | + And the notice already contains normalised metadata |
| 21 | + When normalised metadata is overwritten |
| 22 | + Then the notice object contains the new normalised metadata |
| 23 | + And the notice status is NORMALISED_METADATA |
| 24 | + And normalised notice contains no RDF manifestation |
| 25 | + And notice not contains RDF validation |
| 26 | + And notice contains no METS manifestation |
| 27 | + |
| 28 | + Scenario: add RDF manifestation |
| 29 | + Given a notice eligible for transformation |
| 30 | + And RDF manifestation |
| 31 | + When RDF manifestation is added |
| 32 | + Then the notice object contains the RDF manifestation |
| 33 | + And the notice status is TRANSFORMED |
| 34 | + |
| 35 | + Scenario: overwrite RDF manifestation |
| 36 | + Given a notice eligible for transformation |
| 37 | + And RDF manifestation |
| 38 | + And the notice already contains an RDF manifestation |
| 39 | + When the RDF manifestation is overwritten |
| 40 | + Then the notice object contains the new RDF manifestation |
| 41 | + And the notice status is TRANSFORMED |
| 42 | + And notice contains no RDF validation |
| 43 | + And notice contains no METS manifestation |
| 44 | + |
| 45 | + Scenario: add validation report for a transformation |
| 46 | + Given a notice eligible for transformation |
| 47 | + And RDF validation report |
| 48 | + And the notice contains an RDF manifestation |
| 49 | + When RDF validation report is added |
| 50 | + Then the notice object contains the RDF validation report |
| 51 | + And the notice status is VALIDATED |
| 52 | + And notice contains no METS manifestation |
| 53 | + |
| 54 | + Scenario: cannot add a validation report when there is no transformation |
| 55 | + Given a notice |
| 56 | + And RDF validation report |
| 57 | + And the notice does not contains an RDF manifestation |
| 58 | + When RDF validation report is added an exception is raised |
| 59 | + |
| 60 | + |
| 61 | + Scenario: add METS manifestation |
| 62 | + Given a packaging eligible notice |
| 63 | + And METS manifestation |
| 64 | + When METS manifestation is added |
| 65 | + Then the notice object contains the METS manifestation |
| 66 | + And the notice status is PACKAGED |
| 67 | + |
| 68 | + Scenario: overwrite METS manifestation |
| 69 | + Given a packaging eligible notice |
| 70 | + And METS manifestation |
| 71 | + And the notice already contains an METS manifestation |
| 72 | + When METS manifestation is added |
| 73 | + Then the notice object contains the new METS manifestation |
| 74 | + And the notice status is PACKAGED |
| 75 | + |
| 76 | + Scenario Outline: set notice eligibility for transformation before transformation |
| 77 | + Given a notice |
| 78 | + And eligibility check result is <eligibility> |
| 79 | + And the notice status is lower than TRANSFORMED |
| 80 | + When eligibility for transformation is set |
| 81 | + Then notice status is <notice_status> |
| 82 | + |
| 83 | + Examples: |
| 84 | + | eligibility | notice_status | |
| 85 | + | true | ELIGIBLE_FOR_TRANSFORMATION | |
| 86 | + | false | INELIGIBLE_FOR_TRANSFORMATION | |
| 87 | + |
| 88 | + Scenario Outline: set notice eligibility for transformation after transformation |
| 89 | + Given a notice |
| 90 | + And eligibility check result is <eligibility> |
| 91 | + And the notice status is equal or greater than TRANSFORMED |
| 92 | + When eligibility for transformation is set |
| 93 | + Then notice status is <notice_status> |
| 94 | + |
| 95 | + Examples: |
| 96 | + | eligibility | notice_status | |
| 97 | + | false | INELIGIBLE_FOR_TRANSFORMATION | |
| 98 | + |
| 99 | + Scenario Outline: set notice eligibility for packaging before packaging |
| 100 | + Given a notice |
| 101 | + And eligibility check result is <eligibility> |
| 102 | + And the notice is validated |
| 103 | + When eligibility for packaging is set |
| 104 | + Then notice status is <notice_status> |
| 105 | + |
| 106 | + Examples: |
| 107 | + | eligibility | notice_status | |
| 108 | + | true | ELIGIBLE_FOR_PACKAGING | |
| 109 | + | false | INELIGIBLE_FOR_PACKAGING | |
| 110 | + |
| 111 | + Scenario Outline: set notice eligibility for packaging after packaging |
| 112 | + Given a notice |
| 113 | + And eligibility check result is <eligibility> |
| 114 | + And the notice is published |
| 115 | + When eligibility for packaging is set |
| 116 | + Then notice status is <notice_status> |
| 117 | + |
| 118 | + Examples: |
| 119 | + | eligibility | notice_status | |
| 120 | + | false | INELIGIBLE_FOR_PACKAGING | |
| 121 | + |
| 122 | + Scenario Outline: set notice eligibility for publishing after packaging |
| 123 | + Given a notice |
| 124 | + And eligibility check result is <eligibility> |
| 125 | + And notice contains a METS package |
| 126 | + When the package validity is set |
| 127 | + Then notice status is <notice_status> |
| 128 | + |
| 129 | + Examples: |
| 130 | + | eligibility | notice_status | |
| 131 | + | true | ELIGIBLE_FOR_PUBLISHING | |
| 132 | + | false | INELIGIBLE_FOR_PUBLISHING | |
| 133 | + |
| 134 | + Scenario Outline: set notice eligibility for publishing after publishing |
| 135 | + Given a notice |
| 136 | + And eligibility check result is <eligibility> |
| 137 | + And the notice is published |
| 138 | + When the package validity is set |
| 139 | + Then notice status is <notice_status> |
| 140 | + |
| 141 | + Examples: |
| 142 | + | eligibility | notice_status | |
| 143 | + | false | INELIGIBLE_FOR_PUBLISHING | |
| 144 | + |
| 145 | + |
| 146 | + Scenario Outline: mark notice as published if eligible |
| 147 | + Given a notice |
| 148 | + And eligibility check result is <eligibility> |
| 149 | + And the notice is packaged |
| 150 | + When the package validity is set |
| 151 | + And the notice is marked as published |
| 152 | + Then notice status is <notice_status> |
| 153 | + Examples: |
| 154 | + | eligibility | notice_status | |
| 155 | + | true | PUBLISHED | |
| 156 | + |
| 157 | + |
| 158 | + Scenario Outline: mark notice as published when ineligible |
| 159 | + Given a notice |
| 160 | + And eligibility check result is <eligibility> |
| 161 | + And the notice is packaged |
| 162 | + When the package validity is set |
| 163 | + Then the notice cannot be marked as published |
| 164 | + |
| 165 | + Examples: |
| 166 | + | eligibility | |
| 167 | + | false | |
| 168 | + |
| 169 | + |
| 170 | + Scenario Outline: set notice public availability after publishing |
| 171 | + Given a notice |
| 172 | + And availability check result is <availability> |
| 173 | + And the notice is published |
| 174 | + When public availability is set |
| 175 | + Then notice status is <notice_status> |
| 176 | + |
| 177 | + Examples: |
| 178 | + | availability | notice_status | |
| 179 | + | true | PUBLICLY_AVAILABLE | |
| 180 | + | false | PUBLICLY_UNAVAILABLE | |
| 181 | + |
0 commit comments