Skip to content

Commit 1159612

Browse files
Merge pull request #1011 from digitalservicebund/remove-delta
Remove non time-boundary stuff from RisModForm
2 parents 8b3e27c + cf1ef3a commit 1159612

19 files changed

+87
-2377
lines changed

backend/src/main/java/de/bund/digitalservice/ris/norms/adapter/input/restapi/controller/NormExpressionController.java

Lines changed: 0 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,10 @@
44

55
import de.bund.digitalservice.ris.norms.adapter.input.restapi.mapper.NormResponseMapper;
66
import de.bund.digitalservice.ris.norms.adapter.input.restapi.schema.NormResponseSchema;
7-
import de.bund.digitalservice.ris.norms.adapter.input.restapi.schema.UpdateModRequestSchema;
8-
import de.bund.digitalservice.ris.norms.adapter.input.restapi.schema.UpdateModResponseSchema;
9-
import de.bund.digitalservice.ris.norms.adapter.input.restapi.schema.UpdateModsRequestSchema;
10-
import de.bund.digitalservice.ris.norms.adapter.input.restapi.schema.UpdateModsResponseSchema;
117
import de.bund.digitalservice.ris.norms.application.port.input.*;
128
import de.bund.digitalservice.ris.norms.domain.entity.eli.DokumentExpressionEli;
13-
import jakarta.validation.Valid;
14-
import jakarta.validation.constraints.NotEmpty;
159
import java.time.Instant;
16-
import java.util.Map;
1710
import java.util.Optional;
18-
import org.springframework.http.HttpStatusCode;
1911
import org.springframework.http.ResponseEntity;
2012
import org.springframework.web.bind.annotation.*;
2113

@@ -127,75 +119,4 @@ public ResponseEntity<String> updateAmendingLaw(
127119

128120
return ResponseEntity.ok(updatedAmendingLaw);
129121
}
130-
131-
/**
132-
* Update an amending command of an amending law and consecutively creates/updates the ZF0 the
133-
* affected document.
134-
*
135-
* @param eli Eli of the request
136-
* @param eid the eId of the akn:mod within the amending law
137-
* @param updateModRequestSchema the new data about the akn:mod element
138-
* @param dryRun Should the save operation only be previewed and not actually persisted?
139-
* @return A {@link ResponseEntity} containing the updated xml of the amending law.
140-
* <p>Returns HTTP 200 (OK) if both amending law and zf0 successfully uddated.
141-
* <p>Returns HTTP 404 (Not Found) if amending law, target law or node within target law not
142-
* found.
143-
* @deprecated
144-
*/
145-
@PutMapping(
146-
path = "/mods/{eid}",
147-
consumes = { APPLICATION_JSON_VALUE },
148-
produces = { APPLICATION_JSON_VALUE }
149-
)
150-
@Deprecated(forRemoval = true)
151-
public ResponseEntity<UpdateModResponseSchema> updateMod(
152-
final DokumentExpressionEli eli,
153-
@PathVariable final String eid,
154-
@RequestBody @Valid final UpdateModRequestSchema updateModRequestSchema,
155-
@RequestParam(defaultValue = "false") final Boolean dryRun
156-
) {
157-
return ResponseEntity
158-
.status(
159-
HttpStatusCode.valueOf(
160-
501 // Not implemented
161-
)
162-
)
163-
.build();
164-
}
165-
166-
/**
167-
* Update multiple akn:mod elements of an amending law and consecutively creates/updates all ZF0
168-
* of all affected documents.
169-
*
170-
* @param eli Eli of the request
171-
* @param updateModsRequestSchema the eids and changes for the amending commands to update
172-
* @param dryRun Should the save operation only be previewed and not actually persisted?
173-
* @return A {@link ResponseEntity} containing the updated xmls of the norms.
174-
* <p>Returns HTTP 200 (OK) if the amending law and all zf0 successfully updated.
175-
* <p>Returns HTTP 404 (Not Found) if amending law, target law or node within target law not
176-
* found.
177-
* @deprecated
178-
*/
179-
@PatchMapping(
180-
path = "/mods",
181-
consumes = { APPLICATION_JSON_VALUE },
182-
produces = { APPLICATION_JSON_VALUE }
183-
)
184-
@Deprecated(forRemoval = true)
185-
public ResponseEntity<UpdateModsResponseSchema> updateMods(
186-
final DokumentExpressionEli eli,
187-
@RequestBody @Valid @NotEmpty final Map<
188-
String,
189-
UpdateModsRequestSchema.ModUpdate
190-
> updateModsRequestSchema,
191-
@RequestParam(defaultValue = "false") final Boolean dryRun
192-
) {
193-
return ResponseEntity
194-
.status(
195-
HttpStatusCode.valueOf(
196-
501 // Not implemented
197-
)
198-
)
199-
.build();
200-
}
201122
}

backend/src/main/java/de/bund/digitalservice/ris/norms/adapter/input/restapi/schema/UpdateModRequestSchema.java

Lines changed: 0 additions & 32 deletions
This file was deleted.

backend/src/main/java/de/bund/digitalservice/ris/norms/adapter/input/restapi/schema/UpdateModResponseSchema.java

Lines changed: 0 additions & 18 deletions
This file was deleted.

backend/src/main/java/de/bund/digitalservice/ris/norms/adapter/input/restapi/schema/UpdateModsRequestSchema.java

Lines changed: 0 additions & 15 deletions
This file was deleted.

backend/src/main/java/de/bund/digitalservice/ris/norms/adapter/input/restapi/schema/UpdateModsResponseSchema.java

Lines changed: 0 additions & 18 deletions
This file was deleted.

frontend/e2e/amending-laws-article-editor-common.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ test.describe("Navigation", () => {
4848
)
4949

5050
await expect(
51-
page.getByRole("textbox", {
52-
name: "Neuer Text Inhalt",
51+
page.getByRole("combobox", {
52+
name: "Zeitgrenze",
5353
}),
54-
).toHaveValue("1. Beispiel")
54+
).toHaveText("01.02.1001")
5555
})
5656
})
5757

frontend/e2e/amending-laws-article-editor-quoted-structure.spec.ts

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,6 @@ test.describe("Load mod details", () => {
3333
})
3434
await expect(modFormSection).toBeVisible()
3535

36-
// Textual Mode Type
37-
const textualModeTypeElement = modFormSection.getByRole("textbox", {
38-
name: "Änderungstyp",
39-
})
40-
await expect(textualModeTypeElement).toBeVisible()
41-
await expect(textualModeTypeElement).toHaveValue("Ersetzen")
42-
await expect(textualModeTypeElement).toHaveAttribute("readonly", "")
43-
4436
// Time Boundaries
4537
const timeBoundariesElement = modFormSection.getByRole("combobox", {
4638
name: "Zeitgrenze",
@@ -52,33 +44,6 @@ test.describe("Load mod details", () => {
5244

5345
const timeBoundaryOptionElements = sharedPage.getByRole("option")
5446
await expect(timeBoundaryOptionElements).toHaveCount(3)
55-
56-
// // Destination Href Eli
57-
const destinationHrefEliElement = modFormSection.getByRole("textbox", {
58-
name: "ELI Zielgesetz",
59-
})
60-
await expect(destinationHrefEliElement).toBeVisible()
61-
await expect(destinationHrefEliElement).toHaveValue(
62-
"eli/bund/bgbl-1/1002/1/1002-01-01/1/deu/regelungstext-1",
63-
)
64-
await expect(destinationHrefEliElement).toHaveAttribute("readonly", "")
65-
66-
const elementToBeReplacedField = sharedPage.getByTestId(
67-
"elementToBeReplaced",
68-
)
69-
70-
const selectedElementLocator = elementToBeReplacedField.getByRole(
71-
"button",
72-
{ name: "long title", exact: true },
73-
)
74-
75-
await expect(selectedElementLocator).toBeInViewport()
76-
77-
await expect(selectedElementLocator).toHaveClass(/selected/)
78-
79-
await expect(sharedPage.getByTestId("replacingElement")).toHaveText(
80-
"Fiktives Beispielgesetz für das Ersetzen von Strukturen und Gliederungseinheiten mit Änderungsbefehlen (Strukturänderungsgesetz)",
81-
)
8247
})
8348
})
8449

frontend/e2e/amending-laws-article-editor-quoted-text.spec.ts

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -11,54 +11,6 @@ test.describe("Editing a single mod", () => {
1111
test.afterEach(async ({ authenticatedRequest: request }) => {
1212
await uploadAmendingLaw(request, "bgbl-1_2017_s419/aenderungsgesetz.xml")
1313
})
14-
15-
test(
16-
"editing and saving the eid mod change by highlighting",
17-
{ tag: ["@RISDEV-4553"] },
18-
async ({ page }) => {
19-
const amendingLawSection = page.getByRole("region", {
20-
name: "Änderungsbefehle",
21-
})
22-
23-
await amendingLawSection.getByText("§ 20 Absatz 1 Satz 2").click()
24-
25-
const modFormSection = page.getByRole("region", {
26-
name: "Änderungsbefehl bearbeiten",
27-
})
28-
29-
await expect(
30-
modFormSection.getByRole("textbox", {
31-
name: "zu ersetzende Textstelle",
32-
}),
33-
).toHaveValue(
34-
"hauptteil-1_art-1_abs-1_untergl-1_listenelem-2_inhalt-1_text-1/9-34.xml",
35-
)
36-
37-
const textBoundingBox = await modFormSection
38-
.getByLabel("Zu ersetzender Text")
39-
.getByText("entgegen § 9")
40-
.boundingBox()
41-
42-
await page.mouse.dblclick(textBoundingBox!.x + 50, textBoundingBox!.y + 5)
43-
await page.mouse.click(0, 0)
44-
45-
await expect(
46-
modFormSection.getByRole("textbox", {
47-
name: "zu ersetzende Textstelle",
48-
}),
49-
).not.toHaveValue(
50-
"hauptteil-1_art-1_abs-1_untergl-1_listenelem-2_inhalt-1_text-1/9-34.xml",
51-
)
52-
53-
await expect(
54-
modFormSection.getByRole("textbox", {
55-
name: "zu ersetzende Textstelle",
56-
}),
57-
).toHaveValue(
58-
"hauptteil-1_art-1_abs-1_untergl-1_listenelem-2_inhalt-1_text-1/0-8.xml",
59-
)
60-
},
61-
)
6214
})
6315

6416
test.describe("Editing multiple mods", () => {

0 commit comments

Comments
 (0)