Skip to content

Commit

Permalink
feat(e2e): Add Playwright E2E test suite for dotCMS frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
nicobytes committed Feb 27, 2025
1 parent ec86c40 commit 72caa80
Show file tree
Hide file tree
Showing 22 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion e2e/dotcms-e2e-node/frontend/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const reporter = resolveReporter();
* See https://playwright.dev/docs/test-configuration.
*/
export default defineConfig({
testDir: "./tests",
testDir: "./src/tests",
/* Run tests in files in parallel */
fullyParallel: true,
/* Fail the build on CI if you accidentally left test.only in the source code. */
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { APIRequestContext, Page } from "@playwright/test";
import { updateFeatureFlag } from "../utils/api";
import { updateFeatureFlag } from "@utils/api";

export class ListingContentTypesPage {
constructor(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import { expect, test } from "@playwright/test";
import {
dotCMSUtils,
waitForVisibleAndCallback,
} from "../../utils/dotCMSUtils";
} from "@utils/dotCMSUtils";
import {
GroupEntriesLocators,
MenuEntriesLocators,
ToolEntriesLocators,
} from "../../locators/navigation/menuLocators";
} from "@locators/navigation/menuLocators";
import { ContentUtils } from "../../utils/contentUtils";
import {
iFramesLocators,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ import { expect, test } from "@playwright/test";
import {
dotCMSUtils,
waitForVisibleAndCallback,
} from "../../utils/dotCMSUtils";
} from "@utils/dotCMSUtils";
import { ContentUtils } from "../../utils/contentUtils";
import {
addContent,
iFramesLocators,
contentGeneric,
} from "../../locators/globalLocators";
} from "@locators/globalLocators";
import {
GroupEntriesLocators,
MenuEntriesLocators,
ToolEntriesLocators,
} from "../../locators/navigation/menuLocators";
} from "@locators/navigation/menuLocators";
import { contentProperties, genericContent1 } from "./contentData";

const cmsUtils = new dotCMSUtils();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { expect, test } from "@playwright/test";
import { assert } from "console";
import { waitForVisibleAndCallback } from "../../utils/dotCMSUtils";
import { waitForVisibleAndCallback } from "@utils/dotCMSUtils";

const languages = [
{ language: "español (España)", translation: "¡Bienvenido!" },
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
iFramesLocators,
fileAsset,
pageAsset,
} from "../locators/globalLocators";
} from "@locators/globalLocators";
import { waitForVisibleAndCallback } from "./dotCMSUtils";
import {
contentProperties,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Page, expect, Locator } from "@playwright/test";
import { loginLocators } from "../locators/globalLocators";
import { loginLocators } from "@locators/globalLocators";

export class dotCMSUtils {
/**
Expand Down
9 changes: 5 additions & 4 deletions e2e/dotcms-e2e-node/frontend/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@pages/*": ["pages/*"],
"@utils/*": ["utils/*"],
"@data/*": ["data/*"],
"@models/*": ["models/*"]
"@pages/*": ["./src/pages/*"],
"@locators/*": ["./src/locators/*"],
"@utils/*": ["./src/utils/*"],
"@data/*": ["./src/data/*"],
"@models/*": ["./src/models/*"]
}
}
}

0 comments on commit 72caa80

Please sign in to comment.