Skip to content

Commit

Permalink
Remove outdated e2e-tests
Browse files Browse the repository at this point in the history
RISDEV-0000
  • Loading branch information
malte-laukoetter committed Feb 18, 2025
1 parent 3876b3d commit cf1ef3a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 86 deletions.
6 changes: 3 additions & 3 deletions frontend/e2e/amending-laws-article-editor-common.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ test.describe("Navigation", () => {
)

await expect(
page.getByRole("textbox", {
name: "Neuer Text Inhalt",
page.getByRole("combobox", {
name: "Zeitgrenze",
}),
).toHaveValue("1. Beispiel")
).toHaveText("01.02.1001")
})
})

Expand Down
35 changes: 0 additions & 35 deletions frontend/e2e/amending-laws-article-editor-quoted-structure.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,6 @@ test.describe("Load mod details", () => {
})
await expect(modFormSection).toBeVisible()

// Textual Mode Type
const textualModeTypeElement = modFormSection.getByRole("textbox", {
name: "Änderungstyp",
})
await expect(textualModeTypeElement).toBeVisible()
await expect(textualModeTypeElement).toHaveValue("Ersetzen")
await expect(textualModeTypeElement).toHaveAttribute("readonly", "")

// Time Boundaries
const timeBoundariesElement = modFormSection.getByRole("combobox", {
name: "Zeitgrenze",
Expand All @@ -52,33 +44,6 @@ test.describe("Load mod details", () => {

const timeBoundaryOptionElements = sharedPage.getByRole("option")
await expect(timeBoundaryOptionElements).toHaveCount(3)

// // Destination Href Eli
const destinationHrefEliElement = modFormSection.getByRole("textbox", {
name: "ELI Zielgesetz",
})
await expect(destinationHrefEliElement).toBeVisible()
await expect(destinationHrefEliElement).toHaveValue(
"eli/bund/bgbl-1/1002/1/1002-01-01/1/deu/regelungstext-1",
)
await expect(destinationHrefEliElement).toHaveAttribute("readonly", "")

const elementToBeReplacedField = sharedPage.getByTestId(
"elementToBeReplaced",
)

const selectedElementLocator = elementToBeReplacedField.getByRole(
"button",
{ name: "long title", exact: true },
)

await expect(selectedElementLocator).toBeInViewport()

await expect(selectedElementLocator).toHaveClass(/selected/)

await expect(sharedPage.getByTestId("replacingElement")).toHaveText(
"Fiktives Beispielgesetz für das Ersetzen von Strukturen und Gliederungseinheiten mit Änderungsbefehlen (Strukturänderungsgesetz)",
)
})
})

Expand Down
48 changes: 0 additions & 48 deletions frontend/e2e/amending-laws-article-editor-quoted-text.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,54 +11,6 @@ test.describe("Editing a single mod", () => {
test.afterEach(async ({ authenticatedRequest: request }) => {
await uploadAmendingLaw(request, "bgbl-1_2017_s419/aenderungsgesetz.xml")
})

test(
"editing and saving the eid mod change by highlighting",
{ tag: ["@RISDEV-4553"] },
async ({ page }) => {
const amendingLawSection = page.getByRole("region", {
name: "Änderungsbefehle",
})

await amendingLawSection.getByText("§ 20 Absatz 1 Satz 2").click()

const modFormSection = page.getByRole("region", {
name: "Änderungsbefehl bearbeiten",
})

await expect(
modFormSection.getByRole("textbox", {
name: "zu ersetzende Textstelle",
}),
).toHaveValue(
"hauptteil-1_art-1_abs-1_untergl-1_listenelem-2_inhalt-1_text-1/9-34.xml",
)

const textBoundingBox = await modFormSection
.getByLabel("Zu ersetzender Text")
.getByText("entgegen § 9")
.boundingBox()

await page.mouse.dblclick(textBoundingBox!.x + 50, textBoundingBox!.y + 5)
await page.mouse.click(0, 0)

await expect(
modFormSection.getByRole("textbox", {
name: "zu ersetzende Textstelle",
}),
).not.toHaveValue(
"hauptteil-1_art-1_abs-1_untergl-1_listenelem-2_inhalt-1_text-1/9-34.xml",
)

await expect(
modFormSection.getByRole("textbox", {
name: "zu ersetzende Textstelle",
}),
).toHaveValue(
"hauptteil-1_art-1_abs-1_untergl-1_listenelem-2_inhalt-1_text-1/0-8.xml",
)
},
)
})

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

0 comments on commit cf1ef3a

Please sign in to comment.