Skip to content

Conversation

@ibalosh
Copy link
Contributor

@ibalosh ibalosh commented Nov 17, 2025

what

  • added import aliases for most used helpers
  • added ESlint rule to enforce path aliases over relative imports

why

  • import aliases make importing simpler, with clearer intentions on what is imported

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 17, 2025

Walkthrough

This PR replaces numerous relative import paths with TypeScript path aliases across the e2e test suite and helpers, updates e2e/tsconfig.json to enable baseUrl and add paths mappings, and narrows tsconfig exclude to only node_modules. It adds an ESLint plugin and rule for banning relative imports and adds that devDependency in e2e/package.json. A few localized code edits include non-null assertions (e.g., name!) in some member tests, one explicit saveButton.click() replacement, and a minor cosmetic blank-line change in a page object file. No exported/public API signatures were modified.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Changes are mostly repetitive import-path migrations but span many files and touch config (tsconfig, eslint, package.json).
  • Heterogeneous items requiring attention:
    • tsconfig.json path mappings and exclude change
    • eslint.config.js rule addition and new devDependency in e2e/package.json
    • files where non-null assertions (!) were added (members tests) — check for potential runtime assertions
    • the one UX interaction change replacing save() with saveButton.click()
    • any imports that use new aliases that might not match expected mappings

Files/areas to pay extra attention:

  • e2e/tsconfig.json
  • e2e/eslint.config.js and e2e/package.json
  • e2e/tests/admin/members/* (non-null assertions and saveButton.click change)
  • A few environment/service-manager and playwright fixture files that import core helpers

Possibly related PRs

Suggested labels

browser-tests

Suggested reviewers

  • cmraible
  • 9larsons

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: introducing TypeScript import aliases to replace relative imports throughout the e2e test suite.
Description check ✅ Passed The description clearly relates to the changeset by explaining the purpose of the import alias implementation and the rationale behind it.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch update-imports-with-alias

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (4)
e2e/tests/admin/members/impersonation.test.ts (1)

1-3: Alias imports + non-null assertion look good; consider an explicit invariant

The switch to @helpers/pages, @data-factory, and @helpers/playwright is consistent with the alias strategy and shouldn’t affect behavior. The name! non-null assertion matches the assumption that memberFactory.create always yields a member with a name.

If there’s any chance name could be missing in future factory changes, you might consider making that invariant explicit (for example, by passing a name into create here or asserting expect(name).toBeDefined() before using it) to keep failures clearer.

Also applies to: 18-18

e2e/tests/admin/members/filter-actions.test.ts (1)

1-4: Alias imports for members filter tests are correct; consider alias conventions

Using @helpers/playwright, @data-factory, and @admin-pages here aligns with the new alias setup and should behave the same as the previous relative imports.

One minor consistency thought: this file imports MembersPage from @admin-pages, whereas e2e/tests/admin/members/impersonation.test.ts imports MembersPage from @helpers/pages. If both aliases target the same underlying module, it might be worth settling on one convention for admin pages to reduce cognitive overhead; if they’re intentionally distinct, this is fine as-is.

e2e/tests/public/portal-loading.test.ts (1)

1-1: Minor formatting: Add space after comma.

Missing space after HomePage, in the import statement.

Apply this diff:

-import {HomePage,SignInPage, SignUpPage} from '@helpers/pages';
+import {HomePage, SignInPage, SignUpPage} from '@helpers/pages';
e2e/tests/admin/members/members.test.ts (1)

82-82: Potential undefined values from destructuring.

Lines 82 and 104 destructure properties that may be undefined, yet non-null assertions are used later. Consider adding explicit checks or default values.

For line 82, consider:

const {name = 'Test Member', email, note = 'Test note'} = memberFactory.build({
  email: '[email protected]',
  name: 'Test Member'
});

For line 104, since the member is created (not built), verify that the factory guarantees the name field is set.

Also applies to: 104-104

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 98a4101 and 984d0f4.

📒 Files selected for processing (29)
  • e2e/helpers/pages/admin/members/member-details-page.ts (1 hunks)
  • e2e/tests/admin/analytics/growth.test.ts (1 hunks)
  • e2e/tests/admin/analytics/location.test.ts (1 hunks)
  • e2e/tests/admin/analytics/newsletters.test.ts (1 hunks)
  • e2e/tests/admin/analytics/overview.test.ts (1 hunks)
  • e2e/tests/admin/analytics/post-analytics/growth.test.ts (1 hunks)
  • e2e/tests/admin/analytics/post-analytics/overview.test.ts (1 hunks)
  • e2e/tests/admin/analytics/utm-tracking.test.ts (1 hunks)
  • e2e/tests/admin/analytics/web-traffic.test.ts (1 hunks)
  • e2e/tests/admin/members/export.test.ts (1 hunks)
  • e2e/tests/admin/members/filter-actions.test.ts (1 hunks)
  • e2e/tests/admin/members/impersonation.test.ts (2 hunks)
  • e2e/tests/admin/members/members.test.ts (8 hunks)
  • e2e/tests/admin/posts/post-preview.test.ts (1 hunks)
  • e2e/tests/admin/posts/post-settings.test.ts (1 hunks)
  • e2e/tests/admin/posts/posts.test.ts (1 hunks)
  • e2e/tests/admin/reset-password.test.ts (1 hunks)
  • e2e/tests/admin/settings/labs-search.test.ts (1 hunks)
  • e2e/tests/admin/settings/publication-language.test.ts (1 hunks)
  • e2e/tests/admin/tags/editor.test.ts (1 hunks)
  • e2e/tests/admin/tags/list.test.ts (1 hunks)
  • e2e/tests/admin/two-factor-auth.test.ts (1 hunks)
  • e2e/tests/admin/whats-new.test.ts (1 hunks)
  • e2e/tests/post-factory.test.ts (1 hunks)
  • e2e/tests/public/homepage.test.ts (1 hunks)
  • e2e/tests/public/member-signup-types.test.ts (1 hunks)
  • e2e/tests/public/member-signup.test.ts (1 hunks)
  • e2e/tests/public/portal-loading.test.ts (1 hunks)
  • e2e/tsconfig.json (2 hunks)
🧰 Additional context used
🧠 Learnings (7)
📓 Common learnings
Learnt from: niranjan-uma-shankar
Repo: TryGhost/Ghost PR: 24557
File: apps/admin-x-settings/src/components/settings/general/TimeZone.tsx:7-7
Timestamp: 2025-08-01T12:44:07.467Z
Learning: In Ghost development, PRs may depend on unpublished changes from SDK packages. When this occurs, TypeScript compilation errors for missing exports are expected and documented in the PR description until the dependency packages are published and updated. This is normal workflow for cross-repository feature development.
📚 Learning: 2025-11-05T16:42:12.989Z
Learnt from: rob-ghost
Repo: TryGhost/Ghost PR: 25356
File: apps/admin/test-utils/fixtures/query-client.tsx:17-35
Timestamp: 2025-11-05T16:42:12.989Z
Learning: In apps/admin/test-utils/fixtures/query-client.tsx, the createTestQueryClient function is intentionally duplicated from admin-x-framework to reduce external dependencies in the admin app's test utilities.

Applied to files:

  • e2e/tests/admin/members/export.test.ts
  • e2e/tests/public/member-signup-types.test.ts
  • e2e/tests/admin/members/filter-actions.test.ts
  • e2e/tests/admin/two-factor-auth.test.ts
  • e2e/tests/admin/tags/list.test.ts
  • e2e/tests/admin/posts/posts.test.ts
  • e2e/tests/admin/settings/publication-language.test.ts
  • e2e/tests/admin/analytics/overview.test.ts
📚 Learning: 2025-03-13T09:00:20.205Z
Learnt from: mike182uk
Repo: TryGhost/Ghost PR: 22471
File: apps/admin-x-activitypub/src/utils/pending-activity.ts:13-71
Timestamp: 2025-03-13T09:00:20.205Z
Learning: The pending activity utilities in the Ghost ActivityPub module are covered by tests in the file `apps/admin-x-activitypub/test/unit/utils/pending-activity.ts`.

Applied to files:

  • e2e/tests/admin/members/export.test.ts
  • e2e/tests/admin/reset-password.test.ts
  • e2e/tests/admin/analytics/growth.test.ts
  • e2e/tests/public/homepage.test.ts
  • e2e/tests/public/member-signup-types.test.ts
  • e2e/tests/admin/posts/post-settings.test.ts
  • e2e/tests/admin/analytics/post-analytics/overview.test.ts
  • e2e/tests/admin/posts/post-preview.test.ts
  • e2e/tests/admin/members/filter-actions.test.ts
  • e2e/tests/admin/analytics/utm-tracking.test.ts
  • e2e/tests/admin/two-factor-auth.test.ts
  • e2e/tests/public/member-signup.test.ts
  • e2e/tests/admin/analytics/location.test.ts
  • e2e/tests/admin/analytics/post-analytics/growth.test.ts
  • e2e/tests/admin/members/impersonation.test.ts
  • e2e/tests/admin/analytics/web-traffic.test.ts
  • e2e/tests/admin/tags/editor.test.ts
  • e2e/tests/admin/tags/list.test.ts
  • e2e/tests/admin/posts/posts.test.ts
  • e2e/tests/admin/members/members.test.ts
  • e2e/tests/admin/settings/publication-language.test.ts
  • e2e/tests/admin/settings/labs-search.test.ts
  • e2e/tests/admin/analytics/overview.test.ts
📚 Learning: 2025-05-29T10:37:26.369Z
Learnt from: ErisDS
Repo: TryGhost/Ghost PR: 23588
File: ghost/core/test/e2e-api/admin/backup.test.js:136-148
Timestamp: 2025-05-29T10:37:26.369Z
Learning: In the Ghost test framework, when testing CSV exports via the admin API, the response `body` field is empty while the actual CSV data is provided through the `text` field. Tests should use `expectEmptyBody()` and then validate the CSV content via `.expect(({text}) => ...)` - this is not contradictory behavior.

Applied to files:

  • e2e/tests/admin/members/export.test.ts
  • e2e/tests/admin/posts/post-settings.test.ts
  • e2e/tests/admin/posts/posts.test.ts
📚 Learning: 2025-03-13T09:00:20.205Z
Learnt from: mike182uk
Repo: TryGhost/Ghost PR: 22471
File: apps/admin-x-activitypub/src/utils/pending-activity.ts:13-71
Timestamp: 2025-03-13T09:00:20.205Z
Learning: The pending activity utilities in Ghost's ActivityPub module are thoroughly tested in `apps/admin-x-activitypub/test/unit/utils/pending-activity.ts`, which covers `generatePendingActivityId`, `isPendingActivity`, and `generatePendingActivity` functions.

Applied to files:

  • e2e/tests/admin/members/export.test.ts
  • e2e/tests/admin/reset-password.test.ts
  • e2e/tests/admin/analytics/growth.test.ts
  • e2e/tests/public/member-signup-types.test.ts
  • e2e/tests/admin/posts/post-settings.test.ts
  • e2e/tests/admin/analytics/post-analytics/overview.test.ts
  • e2e/tests/admin/members/filter-actions.test.ts
  • e2e/tests/admin/analytics/utm-tracking.test.ts
  • e2e/tests/public/member-signup.test.ts
  • e2e/tests/admin/analytics/post-analytics/growth.test.ts
  • e2e/tests/admin/members/impersonation.test.ts
  • e2e/tests/admin/analytics/web-traffic.test.ts
  • e2e/tests/admin/tags/editor.test.ts
  • e2e/tests/admin/tags/list.test.ts
  • e2e/tests/admin/posts/posts.test.ts
  • e2e/tests/admin/members/members.test.ts
  • e2e/tests/admin/settings/publication-language.test.ts
📚 Learning: 2025-11-03T12:33:31.093Z
Learnt from: kevinansfield
Repo: TryGhost/Ghost PR: 25320
File: apps/admin/src/layout/app-sidebar/NavHeader.tsx:10-10
Timestamp: 2025-11-03T12:33:31.093Z
Learning: The Ghost admin apps (apps/admin/**) do not use SSR, so accessing browser APIs like `navigator`, `window`, or `document` at module load time is safe and does not require typeof guards.

Applied to files:

  • e2e/tests/admin/analytics/post-analytics/overview.test.ts
  • e2e/tests/admin/analytics/utm-tracking.test.ts
  • e2e/tests/admin/analytics/post-analytics/growth.test.ts
  • e2e/tests/admin/analytics/web-traffic.test.ts
  • e2e/tests/admin/tags/editor.test.ts
  • e2e/tests/admin/analytics/overview.test.ts
📚 Learning: 2025-10-21T13:04:40.040Z
Learnt from: jonatansberg
Repo: TryGhost/Ghost PR: 24967
File: apps/admin/vite.config.ts:1-8
Timestamp: 2025-10-21T13:04:40.040Z
Learning: In Vite config files (vite.config.ts, vite.config.js), __dirname can be used directly even when the package.json has "type": "module". Vite handles config file transpilation in a way that makes __dirname available, so no ESM shim (fileURLToPath/dirname) is needed.

Applied to files:

  • e2e/tsconfig.json
🔇 Additional comments (29)
e2e/tests/public/member-signup.test.ts (1)

1-5: LGTM! Import aliases properly configured.

All path mappings in e2e/tsconfig.json are correctly set up, and the refactored imports align with the configured paths. This clean migration from relative to alias-based imports maintains full backward compatibility with proper TypeScript resolution.

e2e/tests/admin/posts/posts.test.ts (1)

1-3: Import alias configuration verified and working correctly.

All three import aliases are properly configured in e2e/tsconfig.json and resolve to valid paths:

  • @data-factorye2e/data-factory/index.ts
  • @helpers/pagese2e/helpers/pages/
  • @helpers/playwrighte2e/helpers/playwright/

The refactoring improves code maintainability with no issues identified.

e2e/tests/admin/whats-new.test.ts (1)

1-2: LGTM! Aliases are correctly configured.

The import migration to module aliases is clean and properly supported. Verified that e2e/tsconfig.json correctly defines @admin-pages./helpers/pages/admin/index and @helpers/*./helpers/*, with all target files and exports in place. This pattern is already in use across multiple test files in the codebase.

e2e/tests/admin/posts/post-preview.test.ts (1)

1-3: ✓ Alias configuration verified. Code changes approved.

The imports in this file are correctly configured. All three aliases are properly defined in e2e/tsconfig.json:

  • @admin-pages maps to ./helpers/pages/admin/index
  • @data-factory maps to ./data-factory/index.ts
  • @helpers/* maps to ./helpers/* (supporting @helpers/playwright)

The migration is essentially complete, with only two setup/teardown files (e2e/tests/global.setup.ts and e2e/tests/global.teardown.ts) still using relative imports—likely by design.

e2e/tests/public/member-signup-types.test.ts (1)

1-8: LGTM! Import alias refactoring is properly configured and verified.

The migration from relative paths to semantic module aliases improves maintainability and resilience to file restructuring. All path aliases in e2e/tsconfig.json are correctly configured with matching target files verified to exist:

  • @admin-pages, @public-pages, @portal-pages → page helper index files
  • @helpers/* → helpers directory with wildcard support
  • @data-factory → factory index file

All seven imports in the test file resolve correctly.

e2e/tests/admin/two-factor-auth.test.ts (1)

1-3: All import aliases are correctly configured and valid.

Verification confirms that:

  • @admin-pages resolves to e2e/helpers/pages/admin/index.ts and exports AnalyticsOverviewPage, LoginPage, and LoginVerifyPage
  • @helpers/services/email/mail-pit resolves correctly and exports EmailClient, EmailMessage, and MailPit
  • @helpers/playwright resolves to e2e/helpers/playwright/index.ts and exports both test and expect from the Playwright fixture

The TypeScript path configuration in e2e/tsconfig.json is properly set up with correct baseUrl and paths mappings. No issues found.

e2e/tests/admin/posts/post-settings.test.ts (1)

1-3: Import alias refactoring verified—all path mappings resolve correctly.

The migration from relative to module aliases is sound. The tsconfig.json path mappings are properly configured:

  • @helpers/*./helpers/* (resolves both @helpers/pages and @helpers/playwright)
  • @data-factory./data-factory/index.ts

All target directories exist with correct exports, and @faker-js/faker is present in e2e/package.json. The test logic remains unchanged and the imports will resolve correctly.

e2e/tests/admin/tags/editor.test.ts (1)

1-2: Import alias migration for tags tests looks good

Using @admin-pages for admin tag page objects and @helpers/playwright for the test wrapper matches the alias strategy in this PR and doesn’t change runtime behavior.

e2e/helpers/pages/admin/members/member-details-page.ts (1)

34-34: Formatting-only blank line change is fine

The added blank line between the subscription toggles and save-related locators is cosmetic and has no functional impact.

e2e/tests/admin/reset-password.test.ts (1)

1-2: Reset-password imports correctly switched to aliases

Admin page objects, email helpers, and the Playwright wrapper are now imported via the configured aliases, mirroring the previous relative structure without changing test behavior.

Also applies to: 4-5

e2e/tests/admin/settings/labs-search.test.ts (1)

1-2: LGTM! Clean migration to module aliases.

The import updates are consistent with the project-wide shift to path aliasing. The aliases are clear and improve readability over deep relative paths.

e2e/tests/admin/analytics/utm-tracking.test.ts (1)

1-3: LGTM! Alias imports simplify module resolution.

The migration consolidates multiple page object and helper imports using clear aliases, making dependencies more explicit.

e2e/tests/admin/analytics/overview.test.ts (1)

5-7: LGTM! Consistent alias usage.

Import paths updated to match the project-wide aliasing standard. No functional changes.

e2e/tests/admin/analytics/newsletters.test.ts (1)

1-3: LGTM! Service imports properly aliased.

The alias migration includes service utilities under @helpers/services/*, maintaining a clear organizational structure.

e2e/tests/admin/analytics/post-analytics/growth.test.ts (1)

6-7: LGTM! Import aliases applied correctly.

Multiple page objects consolidated under @admin-pages, simplifying dependency management.

e2e/tests/post-factory.test.ts (1)

1-3: LGTM! Data factory imports properly aliased.

Both runtime and type imports correctly use @data-factory, maintaining consistency across import types.

e2e/tests/public/homepage.test.ts (1)

1-2: LGTM! Public page imports correctly aliased.

Appropriate use of @public-pages for public-facing page objects, maintaining clear separation from admin pages.

e2e/tests/admin/analytics/location.test.ts (1)

1-2: LGTM! Import alias migration is clean.

The migration from relative imports to path aliases (@admin-pages, @helpers/playwright) improves code readability and maintainability without affecting runtime behavior.

e2e/tests/public/portal-loading.test.ts (1)

1-2: Import alias migration looks good.

The transition to path aliases (@helpers/pages, @helpers/playwright) maintains consistency with the project-wide alias strategy.

e2e/tests/admin/analytics/growth.test.ts (1)

1-2: LGTM! Clean alias migration.

Import paths successfully migrated to aliases without any functional changes.

e2e/tests/admin/settings/publication-language.test.ts (1)

1-3: LGTM! Comprehensive alias migration.

Successfully migrates all three import categories (@admin-pages, @data-factory, @helpers/playwright) demonstrating consistent adoption of the path alias system.

e2e/tests/admin/analytics/web-traffic.test.ts (1)

1-2: LGTM! Import migration is correct.

Path alias adoption aligns with the broader refactoring across analytics test files.

e2e/tests/admin/analytics/post-analytics/overview.test.ts (1)

6-7: LGTM! Multi-import alias migration.

The import statement correctly uses path aliases for multiple page objects and test utilities.

e2e/tests/admin/members/members.test.ts (2)

1-3: LGTM! Import alias migration is correct.

The migration to path aliases (@helpers/pages, @data-factory, @helpers/playwright) is consistent with the project-wide refactoring.


20-20: Non-null assertions are justified—the factory always guarantees non-null values.

The MemberFactory's buildDefaultMember() method always generates non-null values for both name (via faker.person.firstName() + faker.person.lastName()) and note (via faker.lorem.sentence()). While the Member interface defines these fields as nullable (string | null), the factory implementation ensures they're never null at runtime. The test case calls memberFactory.build({email: '...'}) without overriding these fields, so they retain their guaranteed non-null default values.

Likely an incorrect or invalid review comment.

e2e/tsconfig.json (2)

30-37: Path alias configuration verified successfully.

All path mappings resolve correctly:

  • ✓ @admin-pages → e2e/helpers/pages/admin/index
  • @public-pagese2e/helpers/pages/public/index
  • ✓ @portal-pages → e2e/helpers/pages/portal/index
  • ✓ @helpers/* → e2e/helpers/ (environment, playwright, pages, utils, services)
  • @data-factorye2e/data-factory/index.ts

115-115: The exclude field narrowing is not problematic.

The include field explicitly specifies what gets compiled: ["helpers/**/*", "tests/**/*", "data-factory/**/*", "types.d.ts"]. When TypeScript evaluates both include and exclude, it first applies the include patterns to create the compilation list, then removes items matching exclude. This means the explicit include field controls what actually gets compiled, regardless of how the exclude field is configured. The exclude: ["node_modules"] is a standard safety measure. No unintended files are currently included in compilation, and the configuration follows TypeScript best practices.

e2e/tests/admin/tags/list.test.ts (2)

2-4: Path aliases are properly configured in tsconfig.json.

Verification confirms that tsconfig.json includes all required path mappings for the imports used in this file:

  • @admin-pages./helpers/pages/admin/index
  • @data-factory./data-factory/index.ts
  • @helpers/*./helpers/* (covers @helpers/playwright)

1-4: Module alias imports are correctly configured.

All alias paths defined in e2e/tsconfig.json correctly resolve to their target modules:

  • @admin-pagese2e/helpers/pages/admin/index.ts
  • @data-factorye2e/data-factory/index.ts
  • @helpers/playwrighte2e/helpers/playwright/index.ts

The baseUrl is properly set to ./, and all target paths exist. TypeScript module resolution is correctly configured.

Comment on lines 1 to 4
import {expect, test} from '@helpers/playwright';

import {MemberFactory, createMemberFactory} from '../../../data-factory';
import {MembersPage} from '../../../helpers/pages';
import {MemberFactory, createMemberFactory} from '@data-factory';
import {MembersPage} from '@helpers/pages';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

Verify the @helpers/pages import path.

Lines 3-4 import from @data-factory and @helpers/pages. Most other admin tests in this PR import page objects from @admin-pages, but this uses @helpers/pages for MembersPage. This might be intentional if there's a different export structure, but please confirm this is the correct alias.


🏁 Script executed:

#!/bin/bash
# Verify MembersPage is exported from the correct alias location
# Check if MembersPage exists in both locations or just one

echo "Checking for MembersPage exports:"
rg -n "export.*MembersPage" e2e/helpers/pages/

Length of output: 129


🏁 Script executed:

#!/bin/bash
# Check TypeScript/alias configuration to understand path mappings
echo "=== Looking for tsconfig or path alias configuration ==="
find e2e -name "tsconfig*.json" -o -name "jest.config.*" | head -20

echo ""
echo "=== Checking for path aliases in tsconfig.json (if exists) ==="
fd -n "tsconfig.json$" | xargs cat 2>/dev/null | grep -A 20 '"paths"'

echo ""
echo "=== Checking if @admin-pages alias exists and what it exports ==="
rg -n "export.*MembersPage" --type ts | grep -i admin

echo ""
echo "=== Verify the imports in the test file itself ==="
cat e2e/tests/admin/members/export.test.ts | head -10

Length of output: 964


🏁 Script executed:

#!/bin/bash
# Read tsconfig to understand path aliases
echo "=== Path aliases in e2e/tsconfig.json ==="
cat e2e/tsconfig.json | grep -A 30 '"paths"'

echo ""
echo "=== Check for @admin-pages usage in other admin tests ==="
rg -n "@admin-pages" e2e/tests/admin/ -A 2

echo ""
echo "=== Check what @helpers/pages actually exports ==="
ls -la e2e/helpers/pages/

Length of output: 8563


🏁 Script executed:

#!/bin/bash
echo "=== e2e/helpers/pages/index.ts ==="
cat e2e/helpers/pages/index.ts

echo ""
echo "=== e2e/helpers/pages/admin/index.ts ==="
cat e2e/helpers/pages/admin/index.ts

echo ""
echo "=== Check if MembersPage is exported from admin/index.ts ==="
grep -n "MembersPage" e2e/helpers/pages/admin/index.ts

Length of output: 514


🏁 Script executed:

#!/bin/bash
echo "=== e2e/helpers/pages/admin/members/index.ts ==="
cat e2e/helpers/pages/admin/members/index.ts

Length of output: 119


Change the import from @helpers/pages to @admin-pages for consistency.

Both paths technically work due to re-exports, but all other admin tests consistently import page objects from @admin-pages (verified across 15+ admin test files). Using @helpers/pages here breaks the established convention and should be aligned with the pattern used throughout the codebase.

Change line 4 from:

import {MembersPage} from '@helpers/pages';

to:

import {MembersPage} from '@admin-pages';
🤖 Prompt for AI Agents
In e2e/tests/admin/members/export.test.ts around lines 1 to 4, the import for
MembersPage uses the inconsistent path '@helpers/pages'; update that import to
use the admin convention by changing it to import MembersPage from
'@admin-pages' so the file matches other admin tests and the established
codebase pattern.

import {TagFactory, createPostFactory,createTagFactory} from '../../../data-factory';
import {expect, test} from '../../../helpers/playwright';
import {TagEditorPage, TagsPage} from '@admin-pages';
import {TagFactory, createPostFactory,createTagFactory} from '@data-factory';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Fix missing space in import statement.

Line 3 has a formatting inconsistency where there's a missing space after the comma between createPostFactory and createTagFactory.

-import {TagFactory, createPostFactory,createTagFactory} from '@data-factory';
+import {TagFactory, createPostFactory, createTagFactory} from '@data-factory';
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
import {TagFactory, createPostFactory,createTagFactory} from '@data-factory';
import {TagFactory, createPostFactory, createTagFactory} from '@data-factory';
🤖 Prompt for AI Agents
In e2e/tests/admin/tags/list.test.ts around line 3, the import statement "import
{TagFactory, createPostFactory,createTagFactory} from '@data-factory';" is
missing a space after the comma between createPostFactory and createTagFactory;
update the import to include the space so it reads "... createPostFactory,
createTagFactory ..." to match formatting and linting rules.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (3)
e2e/helpers/playwright/fixture.ts (1)

2-8: Consider using consistent alias for admin pages.

The import paths have been successfully migrated to aliases. However, there's an inconsistency in how admin pages are imported:

  • This file uses @/helpers/pages/admin (line 2)
  • Other files like e2e/tests/admin/reset-password.test.ts use @/admin-pages

Both resolve correctly, but for consistency, consider standardizing on @/admin-pages since it's explicitly defined in tsconfig.json for this purpose.

e2e/helpers/pages/admin/analytics/post-analytics/post-analytics-web-traffic-page.ts (1)

1-1: Consider using the direct import path for consistency.

This file imports AdminPage from @/admin-pages (barrel export), while other page object files in the same module import from @/helpers/pages/admin/admin-page (direct path). For consistency within the page objects module, consider using the direct import path.

Apply this diff for consistency:

-import {AdminPage} from '@/admin-pages';
+import {AdminPage} from '@/helpers/pages/admin/admin-page';
e2e/tests/admin/members/members.test.ts (1)

20-21: Non-null assertions on member name/note and explicit save button click are reasonable

  • The added ! on name/note assumes MemberFactory.build/create always supplies these fields for the flows in this file. Given that, the assertions are fine and keep fillMemberDetails and the getMemberByName/getMemberEmail helpers strongly typed. If there’s any scenario where the factory may intentionally produce null/undefined names or notes, you could later switch to explicit fallbacks or refine the factory’s typing, but that’s not required for this PR.
  • In the “cannot create a member with invalid email” test, using saveButton.click() instead of save() correctly avoids waiting for a “Saved” state that should never appear when validation fails, making the test more robust.

Overall, the behavioral intent of the tests is preserved and slightly improved while aligning with the updated page object API.

Also applies to: 26-27, 37-38, 55-56, 64-65, 77-78, 89-90, 108-109

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 984d0f4 and 9a7ceaf.

📒 Files selected for processing (73)
  • e2e/data-factory/factories/member-factory.ts (1 hunks)
  • e2e/data-factory/factories/post-factory.ts (1 hunks)
  • e2e/data-factory/factories/tag-factory.ts (1 hunks)
  • e2e/data-factory/factories/user-factory.ts (1 hunks)
  • e2e/data-factory/persistence/adapters/api.ts (1 hunks)
  • e2e/data-factory/persistence/adapters/knex.ts (2 hunks)
  • e2e/eslint.config.js (3 hunks)
  • e2e/helpers/environment/service-managers/ghost-manager.ts (1 hunks)
  • e2e/helpers/environment/service-managers/mysql-manager.ts (1 hunks)
  • e2e/helpers/environment/service-managers/portal-manager.ts (1 hunks)
  • e2e/helpers/environment/service-managers/tinybird-manager.ts (1 hunks)
  • e2e/helpers/pages/admin/admin-page.ts (1 hunks)
  • e2e/helpers/pages/admin/analytics/analytics-growth-page.ts (1 hunks)
  • e2e/helpers/pages/admin/analytics/analytics-locations-page.ts (1 hunks)
  • e2e/helpers/pages/admin/analytics/analytics-newsletters-page.ts (1 hunks)
  • e2e/helpers/pages/admin/analytics/analytics-overview-page.ts (1 hunks)
  • e2e/helpers/pages/admin/analytics/analytics-web-traffic-page.ts (1 hunks)
  • e2e/helpers/pages/admin/analytics/post-analytics/post-analytics-growth-page.ts (1 hunks)
  • e2e/helpers/pages/admin/analytics/post-analytics/post-analytics-page.ts (1 hunks)
  • e2e/helpers/pages/admin/analytics/post-analytics/post-analytics-web-traffic-page.ts (1 hunks)
  • e2e/helpers/pages/admin/members/member-details-page.ts (2 hunks)
  • e2e/helpers/pages/admin/members/members-page.ts (1 hunks)
  • e2e/helpers/pages/admin/posts/post/post-editor-page.ts (1 hunks)
  • e2e/helpers/pages/admin/posts/posts-page.ts (1 hunks)
  • e2e/helpers/pages/admin/settings/sections/integrations-section.ts (1 hunks)
  • e2e/helpers/pages/admin/settings/sections/labs-section.ts (1 hunks)
  • e2e/helpers/pages/admin/settings/sections/publications-section.ts (1 hunks)
  • e2e/helpers/pages/admin/settings/sections/staff-section.ts (1 hunks)
  • e2e/helpers/pages/admin/settings/settings-page.ts (1 hunks)
  • e2e/helpers/pages/admin/tags/tag-details-page.ts (1 hunks)
  • e2e/helpers/pages/admin/tags/tags-page.ts (1 hunks)
  • e2e/helpers/pages/admin/whats-new/whats-new-banner.ts (1 hunks)
  • e2e/helpers/pages/admin/whats-new/whats-new-menu.ts (1 hunks)
  • e2e/helpers/pages/base-page.ts (1 hunks)
  • e2e/helpers/pages/portal/portal-page.ts (1 hunks)
  • e2e/helpers/pages/public/public-page.ts (1 hunks)
  • e2e/helpers/playwright/fixture.ts (1 hunks)
  • e2e/helpers/playwright/flows/login.ts (1 hunks)
  • e2e/helpers/playwright/flows/signup.ts (1 hunks)
  • e2e/helpers/services/members-import/members-import-service.ts (2 hunks)
  • e2e/helpers/services/settings/settings-service.ts (1 hunks)
  • e2e/helpers/utils/setup-user.ts (1 hunks)
  • e2e/package.json (1 hunks)
  • e2e/tests/admin/analytics/growth.test.ts (1 hunks)
  • e2e/tests/admin/analytics/location.test.ts (1 hunks)
  • e2e/tests/admin/analytics/newsletters.test.ts (1 hunks)
  • e2e/tests/admin/analytics/overview.test.ts (1 hunks)
  • e2e/tests/admin/analytics/post-analytics/growth.test.ts (1 hunks)
  • e2e/tests/admin/analytics/post-analytics/overview.test.ts (1 hunks)
  • e2e/tests/admin/analytics/utm-tracking.test.ts (1 hunks)
  • e2e/tests/admin/analytics/web-traffic.test.ts (1 hunks)
  • e2e/tests/admin/members/export.test.ts (1 hunks)
  • e2e/tests/admin/members/filter-actions.test.ts (1 hunks)
  • e2e/tests/admin/members/impersonation.test.ts (2 hunks)
  • e2e/tests/admin/members/members.test.ts (8 hunks)
  • e2e/tests/admin/posts/post-preview.test.ts (1 hunks)
  • e2e/tests/admin/posts/post-settings.test.ts (1 hunks)
  • e2e/tests/admin/posts/posts.test.ts (1 hunks)
  • e2e/tests/admin/reset-password.test.ts (1 hunks)
  • e2e/tests/admin/settings/labs-search.test.ts (1 hunks)
  • e2e/tests/admin/settings/publication-language.test.ts (1 hunks)
  • e2e/tests/admin/tags/editor.test.ts (1 hunks)
  • e2e/tests/admin/tags/list.test.ts (1 hunks)
  • e2e/tests/admin/two-factor-auth.test.ts (1 hunks)
  • e2e/tests/admin/whats-new.test.ts (1 hunks)
  • e2e/tests/global.setup.ts (1 hunks)
  • e2e/tests/global.teardown.ts (1 hunks)
  • e2e/tests/post-factory.test.ts (1 hunks)
  • e2e/tests/public/homepage.test.ts (1 hunks)
  • e2e/tests/public/member-signup-types.test.ts (1 hunks)
  • e2e/tests/public/member-signup.test.ts (1 hunks)
  • e2e/tests/public/portal-loading.test.ts (1 hunks)
  • e2e/tsconfig.json (2 hunks)
✅ Files skipped from review due to trivial changes (4)
  • e2e/helpers/pages/admin/analytics/analytics-newsletters-page.ts
  • e2e/helpers/services/members-import/members-import-service.ts
  • e2e/helpers/environment/service-managers/ghost-manager.ts
  • e2e/helpers/pages/admin/settings/sections/staff-section.ts
🚧 Files skipped from review as they are similar to previous changes (19)
  • e2e/tests/admin/posts/post-settings.test.ts
  • e2e/tests/admin/tags/list.test.ts
  • e2e/tests/admin/analytics/post-analytics/overview.test.ts
  • e2e/tests/admin/analytics/utm-tracking.test.ts
  • e2e/tests/post-factory.test.ts
  • e2e/tests/admin/posts/posts.test.ts
  • e2e/tests/public/portal-loading.test.ts
  • e2e/tests/admin/members/impersonation.test.ts
  • e2e/tests/public/member-signup-types.test.ts
  • e2e/tests/admin/analytics/overview.test.ts
  • e2e/tests/admin/whats-new.test.ts
  • e2e/tests/admin/analytics/post-analytics/growth.test.ts
  • e2e/tests/admin/analytics/location.test.ts
  • e2e/tests/public/member-signup.test.ts
  • e2e/tests/admin/members/filter-actions.test.ts
  • e2e/tests/admin/analytics/growth.test.ts
  • e2e/tests/admin/members/export.test.ts
  • e2e/tests/admin/two-factor-auth.test.ts
  • e2e/tests/admin/settings/labs-search.test.ts
🧰 Additional context used
🧠 Learnings (9)
📓 Common learnings
Learnt from: niranjan-uma-shankar
Repo: TryGhost/Ghost PR: 24557
File: apps/admin-x-settings/src/components/settings/general/TimeZone.tsx:7-7
Timestamp: 2025-08-01T12:44:07.467Z
Learning: In Ghost development, PRs may depend on unpublished changes from SDK packages. When this occurs, TypeScript compilation errors for missing exports are expected and documented in the PR description until the dependency packages are published and updated. This is normal workflow for cross-repository feature development.
📚 Learning: 2025-11-05T16:42:12.989Z
Learnt from: rob-ghost
Repo: TryGhost/Ghost PR: 25356
File: apps/admin/test-utils/fixtures/query-client.tsx:17-35
Timestamp: 2025-11-05T16:42:12.989Z
Learning: In apps/admin/test-utils/fixtures/query-client.tsx, the createTestQueryClient function is intentionally duplicated from admin-x-framework to reduce external dependencies in the admin app's test utilities.

Applied to files:

  • e2e/helpers/pages/admin/analytics/analytics-overview-page.ts
  • e2e/tests/admin/reset-password.test.ts
  • e2e/helpers/pages/admin/posts/post/post-editor-page.ts
  • e2e/helpers/pages/admin/whats-new/whats-new-menu.ts
  • e2e/tests/admin/posts/post-preview.test.ts
  • e2e/helpers/pages/admin/members/members-page.ts
  • e2e/tests/admin/settings/publication-language.test.ts
📚 Learning: 2025-09-11T20:38:41.537Z
Learnt from: cmraible
Repo: TryGhost/Ghost PR: 24891
File: e2e/helpers/pages/portal/SignUpSuccessPage.ts:61-67
Timestamp: 2025-09-11T20:38:41.537Z
Learning: In Playwright, page.$() is deprecated and should be replaced with page.locator(). When checking element visibility with Locator.isVisible(), the method returns false both when the element doesn't exist and when it exists but isn't visible, eliminating the need for separate null checks that were required with ElementHandle.

Applied to files:

  • e2e/helpers/pages/admin/tags/tag-details-page.ts
  • e2e/helpers/pages/admin/settings/sections/integrations-section.ts
  • e2e/helpers/pages/admin/whats-new/whats-new-menu.ts
  • e2e/helpers/pages/admin/settings/sections/labs-section.ts
  • e2e/helpers/pages/public/public-page.ts
  • e2e/helpers/pages/admin/analytics/analytics-locations-page.ts
  • e2e/helpers/pages/admin/whats-new/whats-new-banner.ts
  • e2e/helpers/pages/portal/portal-page.ts
📚 Learning: 2025-03-13T09:00:20.205Z
Learnt from: mike182uk
Repo: TryGhost/Ghost PR: 22471
File: apps/admin-x-activitypub/src/utils/pending-activity.ts:13-71
Timestamp: 2025-03-13T09:00:20.205Z
Learning: The pending activity utilities in the Ghost ActivityPub module are covered by tests in the file `apps/admin-x-activitypub/test/unit/utils/pending-activity.ts`.

Applied to files:

  • e2e/tests/admin/reset-password.test.ts
  • e2e/tests/admin/tags/editor.test.ts
  • e2e/tests/admin/posts/post-preview.test.ts
  • e2e/helpers/playwright/fixture.ts
  • e2e/tests/admin/analytics/web-traffic.test.ts
  • e2e/tests/public/homepage.test.ts
  • e2e/tests/admin/members/members.test.ts
  • e2e/tests/admin/settings/publication-language.test.ts
📚 Learning: 2025-03-13T09:00:20.205Z
Learnt from: mike182uk
Repo: TryGhost/Ghost PR: 22471
File: apps/admin-x-activitypub/src/utils/pending-activity.ts:13-71
Timestamp: 2025-03-13T09:00:20.205Z
Learning: The pending activity utilities in Ghost's ActivityPub module are thoroughly tested in `apps/admin-x-activitypub/test/unit/utils/pending-activity.ts`, which covers `generatePendingActivityId`, `isPendingActivity`, and `generatePendingActivity` functions.

Applied to files:

  • e2e/tests/admin/reset-password.test.ts
  • e2e/tests/admin/tags/editor.test.ts
  • e2e/helpers/playwright/fixture.ts
  • e2e/tests/admin/analytics/web-traffic.test.ts
  • e2e/tests/admin/members/members.test.ts
  • e2e/tests/admin/settings/publication-language.test.ts
📚 Learning: 2025-05-27T18:08:00.458Z
Learnt from: cmraible
Repo: TryGhost/Ghost PR: 23546
File: compose.yml:58-59
Timestamp: 2025-05-27T18:08:00.458Z
Learning: The Ghost Docker Compose setup has two independent profiles: `ghost` profile (v0, runs all apps in a single container) and `split` profile (work in progress, runs Ghost server, admin, and frontend apps in separate services). The `split` profile will eventually replace `ghost` as the default.

Applied to files:

  • e2e/helpers/environment/service-managers/portal-manager.ts
  • e2e/helpers/environment/service-managers/mysql-manager.ts
📚 Learning: 2025-11-03T12:33:31.093Z
Learnt from: kevinansfield
Repo: TryGhost/Ghost PR: 25320
File: apps/admin/src/layout/app-sidebar/NavHeader.tsx:10-10
Timestamp: 2025-11-03T12:33:31.093Z
Learning: The Ghost admin apps (apps/admin/**) do not use SSR, so accessing browser APIs like `navigator`, `window`, or `document` at module load time is safe and does not require typeof guards.

Applied to files:

  • e2e/tests/admin/tags/editor.test.ts
  • e2e/helpers/playwright/fixture.ts
  • e2e/tests/admin/analytics/web-traffic.test.ts
📚 Learning: 2025-05-27T18:08:00.458Z
Learnt from: cmraible
Repo: TryGhost/Ghost PR: 23546
File: compose.yml:58-59
Timestamp: 2025-05-27T18:08:00.458Z
Learning: Services that are dependencies for both Ghost Docker Compose profiles (`ghost` and `split`) need to include both profiles in their `profiles` configuration to ensure they start correctly under either profile.

Applied to files:

  • e2e/helpers/environment/service-managers/mysql-manager.ts
📚 Learning: 2025-10-21T13:04:40.040Z
Learnt from: jonatansberg
Repo: TryGhost/Ghost PR: 24967
File: apps/admin/vite.config.ts:1-8
Timestamp: 2025-10-21T13:04:40.040Z
Learning: In Vite config files (vite.config.ts, vite.config.js), __dirname can be used directly even when the package.json has "type": "module". Vite handles config file transpilation in a way that makes __dirname available, so no ESM shim (fileURLToPath/dirname) is needed.

Applied to files:

  • e2e/tsconfig.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Setup
  • GitHub Check: Setup
  • GitHub Check: Build & Push
🔇 Additional comments (50)
e2e/helpers/pages/admin/analytics/analytics-growth-page.ts (1)

1-2: Approve import refactoring - path aliases correctly configured.

The alias-based imports are correctly configured. Verification confirms:

  • tsconfig.json has the required @/helpers/* path mapping configured
  • Both target modules exist at the expected locations
  • Imports resolve correctly with baseUrl configured as ./
e2e/tests/global.setup.ts (1)

1-1: LGTM - Clean alias import migration.

The path alias simplifies the import and aligns with the project-wide refactoring to use centralized module resolution.

e2e/helpers/pages/base-page.ts (1)

3-3: LGTM - Consistent alias import.

The alias-based import for appConfig is consistent with the broader migration and improves module resolution clarity.

e2e/helpers/pages/admin/settings/settings-page.ts (1)

1-1: LGTM - Improved import clarity.

Replacing the relative path with an alias eliminates path traversal and makes the import more maintainable.

e2e/helpers/pages/admin/settings/sections/labs-section.ts (1)

1-1: LGTM - Much cleaner than deep relative paths.

The alias import is a significant improvement over ../../../base-page, making the import intention clear and reducing brittleness during file moves.

e2e/helpers/pages/admin/settings/sections/integrations-section.ts (1)

1-1: LGTM - Consistent with other section imports.

The alias import pattern is consistent with other settings sections and improves maintainability.

e2e/tests/global.teardown.ts (1)

1-1: LGTM - Consistent with global.setup.ts.

The alias import mirrors the pattern used in global.setup.ts, maintaining consistency across the test lifecycle hooks.

e2e/helpers/pages/admin/analytics/analytics-web-traffic-page.ts (1)

1-1: LGTM - Clear module resolution path.

The alias import makes the AdminPage location explicit and consistent with other analytics page imports.

e2e/helpers/services/settings/settings-service.ts (1)

1-1: LGTM - Significant path simplification.

The alias import dramatically simplifies the path from the deeply nested ../../../data-factory/persistence/adapters/http-client to @/data-factory, making the dependency relationship clearer.

e2e/helpers/pages/portal/portal-page.ts (1)

1-1: LGTM! Clean refactor to alias-based import.

The import path update from relative to alias (@/helpers/pages/base-page) improves code maintainability and clarity.

e2e/data-factory/factories/member-factory.ts (1)

1-3: LGTM! Consistent alias usage.

The migration to alias imports (@/data-factory) aligns with the project-wide refactoring and improves import clarity.

e2e/helpers/environment/service-managers/portal-manager.ts (1)

3-3: LGTM! Import path refactored to alias.

The change to @/helpers/environment/docker-compose improves consistency with the project's new import strategy.

e2e/helpers/pages/admin/settings/sections/publications-section.ts (1)

1-1: LGTM! Alias import applied correctly.

The refactoring to @/helpers/pages/base-page is consistent with the broader migration effort.

e2e/helpers/environment/service-managers/mysql-manager.ts (1)

3-3: LGTM! Import refactored to alias.

The migration to @/helpers/environment/docker-compose maintains consistency across service managers.

e2e/helpers/playwright/flows/signup.ts (1)

2-3: LGTM! Multiple imports refactored to aliases.

The updates to @/helpers/pages/public and @/helpers/pages/portal improve readability and align with the project's import strategy.

e2e/tests/admin/analytics/newsletters.test.ts (1)

1-3: LGTM! Test imports updated to aliases.

The refactoring to @/admin-pages, @/helpers/services/members-import, and @/helpers/playwright makes the test imports cleaner and more maintainable.

e2e/data-factory/factories/tag-factory.ts (1)

1-3: LGTM! Factory imports migrated to alias.

The consistent use of @/data-factory for both Factory and utility functions aligns with the project-wide refactoring effort.

e2e/eslint.config.js (1)

5-5: ESLint no-relative-imports plugin wiring matches the alias strategy

Importing eslint-plugin-no-relative-import-paths, registering it under plugins, and configuring no-relative-import-paths/no-relative-import-paths with allowSameFolder: true, rootDir: './', and prefix: '@' is consistent with the new alias usage and should enforce the intended constraints on relative imports.

Please ensure the updated config passes the e2e ESLint run in CI so we know the plugin is resolved correctly and doesn’t conflict with existing overrides.

Also applies to: 34-36, 50-53

e2e/helpers/pages/admin/admin-page.ts (1)

1-1: AdminPage now imports BasePage via alias (no behavior change)

Switching to @/helpers/pages/base-page keeps this page object aligned with the new alias scheme without changing runtime behavior.

e2e/tests/admin/tags/editor.test.ts (1)

1-2: Tag editor tests updated to use alias-based imports

Using @/admin-pages for page objects and @/helpers/playwright for the test harness keeps these tests consistent with the new alias configuration while preserving their behavior.

e2e/helpers/pages/admin/tags/tags-page.ts (1)

1-1: TagsPage now extends AdminPage via alias path

Updating the AdminPage import to @/helpers/pages/admin/admin-page matches the alias usage across admin page objects and doesn’t alter the page’s logic.

e2e/helpers/pages/admin/tags/tag-details-page.ts (1)

1-1: TagDetailsPage AdminPage import aligned with alias-based structure

The switch to @/helpers/pages/admin/admin-page aligns this file with the shared alias pattern; all locators and methods remain unchanged.

e2e/helpers/pages/admin/posts/posts-page.ts (1)

1-1: LGTM! Import path updated to use path alias.

The import path change from relative to alias-based resolution aligns with the PR objective to standardize module imports across the e2e test suite.

e2e/helpers/pages/admin/posts/post/post-editor-page.ts (1)

1-2: LGTM! Import paths updated to use path aliases.

The migration from relative imports to alias-based imports for AdminPage and BasePage is consistent with the project-wide standardization effort.

e2e/tsconfig.json (2)

30-37: LGTM! Path mappings configured correctly.

The baseUrl and paths configuration properly enables the alias-based imports used throughout the e2e test suite. The mappings cover all necessary module categories:

  • Page objects (@/admin-pages, @/public-pages, @/portal-pages)
  • Helpers (@/helpers/*)
  • Data factory (@/data-factory)

115-115: LGTM! Narrowed exclude is safe with explicit include.

Limiting the exclude to only node_modules is appropriate since the include array already explicitly defines which directories to process (helpers, tests, data-factory, types.d.ts).

e2e/helpers/playwright/flows/login.ts (1)

1-1: LGTM! Import path updated to use path alias.

The migration from relative import to @/helpers/pages alias is consistent with the project-wide standardization effort.

e2e/helpers/environment/service-managers/tinybird-manager.ts (1)

5-6: LGTM! Import paths updated to use path aliases.

The migration from relative imports to alias-based imports for DockerCompose and ensureDir utilities is consistent with the project-wide standardization effort.

e2e/tests/admin/reset-password.test.ts (1)

1-5: LGTM! Import paths updated to use path aliases.

The migration from relative imports to alias-based imports is consistent with the PR objective. The use of @/admin-pages for page objects and @/helpers/* for utilities follows the configured path mappings in tsconfig.json.

e2e/data-factory/persistence/adapters/api.ts (1)

2-2: LGTM! Import path updated to use path alias.

The migration from relative import to @/data-factory alias is consistent with the tsconfig path mapping that resolves to ./data-factory/index.ts.

e2e/helpers/pages/public/public-page.ts (1)

1-1: LGTM! Clean alias import.

The import path has been successfully updated to use the TypeScript path alias, improving import clarity and maintainability.

e2e/helpers/pages/admin/analytics/post-analytics/post-analytics-page.ts (1)

1-1: LGTM! Alias import correctly applied.

The AdminPage import now uses the path alias, consistent with the project-wide migration.

e2e/helpers/pages/admin/analytics/analytics-overview-page.ts (1)

1-2: LGTM! Both imports updated to aliases.

Both AdminPage and BasePage now use path aliases, maintaining consistency across the codebase.

e2e/data-factory/factories/user-factory.ts (1)

1-1: LGTM! Factory import uses alias.

The import successfully migrates to the @/data-factory alias pattern.

e2e/helpers/pages/admin/analytics/analytics-locations-page.ts (1)

1-1: LGTM! Alias import applied.

The AdminPage import correctly uses the path alias.

e2e/helpers/pages/admin/whats-new/whats-new-banner.ts (1)

1-1: LGTM! Import updated to alias.

The AdminPage import now uses the path alias, maintaining consistency.

e2e/tests/public/homepage.test.ts (1)

1-2: LGTM! Test imports updated to aliases.

Both imports now use path aliases (@/public-pages and @/helpers/playwright), making the test module resolution clearer and more maintainable.

e2e/package.json (1)

37-37: I need to fix the jq syntax error and retry the npm registry query. Let me run corrected scripts:

I found conflicting version information. Let me verify which version is actually latest:

Version 1.6.1 is valid and has no known security vulnerabilities.

Version 1.6.1 is published on npm and is publicly available with 0 dependencies and 70 dependents. The GitHub security advisory query found no known vulnerabilities for this package. The version constraint ^1.6.1 is appropriate for development dependencies, allowing compatible minor and patch updates while maintaining stability.

e2e/data-factory/factories/post-factory.ts (1)

1-3: LGTM! Clean migration to path aliases.

The import paths have been correctly updated to use the @/data-factory alias, making imports clearer and more maintainable.

e2e/helpers/pages/admin/analytics/post-analytics/post-analytics-growth-page.ts (1)

1-1: LGTM! Import alias correctly applied.

The AdminPage import has been properly updated to use the path alias.

e2e/helpers/pages/admin/whats-new/whats-new-menu.ts (1)

1-1: LGTM! Consistent alias usage.

Import path properly updated to use the alias.

e2e/helpers/pages/admin/members/members-page.ts (1)

1-2: LGTM! Multiple imports cleanly migrated to aliases.

Both AdminPage and BasePage imports have been correctly updated to use path aliases.

e2e/tests/admin/posts/post-preview.test.ts (1)

1-3: LGTM! Test imports properly migrated to aliases.

All test imports have been correctly updated to use the appropriate path aliases, with barrel exports used for page objects and utilities.

e2e/helpers/utils/setup-user.ts (1)

2-2: LGTM! Data factory import correctly aliased.

The import has been properly updated to use the @/data-factory alias.

e2e/tests/admin/settings/publication-language.test.ts (1)

1-3: LGTM! Test imports cleanly migrated to aliases.

All imports have been correctly updated to use path aliases, with appropriate use of barrel exports for page objects and utilities.

e2e/tests/admin/analytics/web-traffic.test.ts (1)

1-2: Alias imports for analytics web-traffic test look good

Using @/admin-pages and @/helpers/playwright keeps the test consistent with the new alias-based structure; no behavioral changes introduced.

e2e/helpers/pages/admin/members/member-details-page.ts (2)

1-2: MemberDetailsPage now correctly uses alias-based imports

Importing AdminPage and BasePage via @/helpers/pages/... aligns this page object with the alias configuration used elsewhere in e2e helpers.


34-35: Whitespace change is fine and improves grouping

The added blank line between newsletterSubscriptionToggles and the save-related locators slightly improves readability by separating content locators from action buttons.

e2e/data-factory/persistence/adapters/knex.ts (1)

1-71: KnexPersistenceAdapter now sources PersistenceAdapter via alias without behavior changes

Switching PersistenceAdapter to import from @/data-factory keeps this adapter aligned with the new alias scheme while preserving the existing CRUD behavior around Knex; the contract and method semantics remain the same.

e2e/tests/admin/members/members.test.ts (1)

1-3: Members e2e tests successfully migrated to alias imports

Using @/helpers/pages, @/data-factory, and @/helpers/playwright matches the alias strategy elsewhere in the e2e suite and keeps imports concise and consistent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants