Skip to content

Commit

Permalink
3172: Fixed test issues
Browse files Browse the repository at this point in the history
  • Loading branch information
tuj committed Dec 10, 2024
1 parent e3b6dba commit 136e85e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions e2e/feed-sources.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ test.describe("fest", () => {

test("It loads create datakilde page", async ({ page }) => {
page.getByText("Opret ny datakilde").click();
await expect(page.locator("#save_feed-source")).toBeVisible();
await expect(page.locator("#save")).toBeVisible();
});

test("It display error toast on save error", async ({ page }) => {
Expand All @@ -238,7 +238,7 @@ test.describe("fest", () => {
await expect(
page.locator(".Toastify").locator(".Toastify__toast--error")
).not.toBeVisible();
await page.locator("#save_feed-source").click();
await page.locator("#save").click();
await expect(
page.locator(".Toastify").locator(".Toastify__toast--error")
).toBeVisible();
Expand All @@ -253,9 +253,9 @@ test.describe("fest", () => {
});
test("Cancel create datakilde", async ({ page }) => {
page.getByText("Opret ny datakilde").click();
await expect(page.locator("#cancel_feed-source")).toBeVisible();
await page.locator("#cancel_feed-source").click();
await expect(page.locator("#cancel_feed-source")).not.toBeVisible();
await expect(page.locator("#cancel")).toBeVisible();
await page.locator("#cancel").click();
await expect(page.locator("#cancel")).not.toBeVisible();
});
});

Expand Down
2 changes: 1 addition & 1 deletion e2e/playlist.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ test.describe("Playlist create tests", () => {
await expect(
page.locator(".Toastify").locator(".Toastify__toast--success")
).not.toBeVisible();
await page.locator("#save_playlist").click();
await page.locator("#save_slide_and_close").click();
await expect(
page
.locator(".Toastify")
Expand Down
6 changes: 3 additions & 3 deletions src/components/feed-sources/feed-source-form.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ function FeedSourceForm({
<Button
variant="secondary"
type="button"
id="cancel_feed-source"
id="cancel"
onClick={() => navigate("/feed-sources/list")}
className="margin-right-button"
>
Expand All @@ -125,7 +125,7 @@ function FeedSourceForm({
<Button
variant="outline-primary"
type="button"
id="cancel_feed-source"
id="save-without-close"
onClick={handleSaveNoClose}
className="margin-right-button"
>
Expand All @@ -135,7 +135,7 @@ function FeedSourceForm({
variant="primary"
type="button"
onClick={handleSubmit}
id="save_feed-source"
id="save"
>
{t("save-button")}
</Button>
Expand Down
2 changes: 1 addition & 1 deletion src/components/playlist/playlist-campaign-form.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ function PlaylistCampaignForm({
variant="primary"
type="button"
onClick={checkInputsHandleSubmit}
id="save_slide_an_close"
id="save_slide_and_close"
className="margin-right-button"
>
{t("save-button-and-close")}
Expand Down

0 comments on commit 136e85e

Please sign in to comment.