Skip to content

Migrated portal invite test#26897

Merged
9larsons merged 1 commit intomainfrom
mg-portal-signup
Mar 19, 2026
Merged

Migrated portal invite test#26897
9larsons merged 1 commit intomainfrom
mg-portal-signup

Conversation

@9larsons
Copy link
Copy Markdown
Contributor

no ref

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 19, 2026

Walkthrough

This change updates E2E test infrastructure for portal signup access validation. Two new Locator fields were added to the SignUpPage class to capture invite-only and free trial notification elements via test IDs. A new test case was introduced in the portal loading test suite that verifies invite-only signup behavior by creating a paid tier with trial period, configuring membership signup as invite-only, and asserting correct UI state. An equivalent test case was removed from the site settings test suite along with its unused tier creation import.

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive The description 'no ref' is extremely vague and provides no meaningful information about the changeset, what was migrated, or why. Add a description explaining what was migrated, where it was moved from/to, and the rationale for the migration.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Migrated portal invite test' directly describes the main change: moving an existing test from one file to another with updated implementation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch mg-portal-signup
📝 Coding Plan
  • Generate coding plan for human review comments

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
Copy Markdown
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.

🧹 Nitpick comments (2)
e2e/helpers/pages/portal/sign-up-page.ts (1)

9-10: Expose the new locators as public readonly to match page-object convention.

Line 9 and Line 10 should use explicit public readonly per the page-object rule.

Suggested update
-    readonly inviteOnlyNotification: Locator;
-    readonly freeTrialNotification: Locator;
+    public readonly inviteOnlyNotification: Locator;
+    public readonly freeTrialNotification: Locator;

As per coding guidelines, "Page Objects should be located in helpers/pages/ and expose locators as public readonly".

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@e2e/helpers/pages/portal/sign-up-page.ts` around lines 9 - 10, The two
locator fields inviteOnlyNotification and freeTrialNotification are declared as
readonly but need to follow the page-object convention of using explicit public
visibility; update their declarations to public readonly inviteOnlyNotification:
Locator and public readonly freeTrialNotification: Locator in the sign-up page
class so they are explicitly exposed as public page-object locators.
e2e/tests/public/portal-loading.test.ts (1)

47-47: Rename the new suite to follow the E2E suite naming convention.

Line 47 introduces a suite name that doesn’t match the required Ghost Public - Feature pattern.

Suggested update
-    test.describe('signup access', () => {
+    test.describe('Ghost Public - Signup access', () => {

As per coding guidelines, "Test suites should be named 'Ghost Admin - Feature' or 'Ghost Public - Feature'".

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@e2e/tests/public/portal-loading.test.ts` at line 47, The test suite declared
with test.describe('signup access', ...) should be renamed to follow the E2E
naming convention; update the suite name used in the test.describe call to the
required pattern (for example, "Ghost Public - Signup access" or "Ghost Public -
Feature") so it matches the "Ghost Public - Feature" format across
e2e/tests/public/portal-loading.test.ts.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@e2e/helpers/pages/portal/sign-up-page.ts`:
- Around line 9-10: The two locator fields inviteOnlyNotification and
freeTrialNotification are declared as readonly but need to follow the
page-object convention of using explicit public visibility; update their
declarations to public readonly inviteOnlyNotification: Locator and public
readonly freeTrialNotification: Locator in the sign-up page class so they are
explicitly exposed as public page-object locators.

In `@e2e/tests/public/portal-loading.test.ts`:
- Line 47: The test suite declared with test.describe('signup access', ...)
should be renamed to follow the E2E naming convention; update the suite name
used in the test.describe call to the required pattern (for example, "Ghost
Public - Signup access" or "Ghost Public - Feature") so it matches the "Ghost
Public - Feature" format across e2e/tests/public/portal-loading.test.ts.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 22f775a0-36b2-49b5-b368-41fe1e60c314

📥 Commits

Reviewing files that changed from the base of the PR and between fd06558 and f7c3ed6.

📒 Files selected for processing (3)
  • e2e/helpers/pages/portal/sign-up-page.ts
  • e2e/tests/public/portal-loading.test.ts
  • ghost/core/test/e2e-browser/admin/site-settings.spec.js

@9larsons 9larsons merged commit 4bdc6aa into main Mar 19, 2026
35 checks passed
@9larsons 9larsons deleted the mg-portal-signup branch March 19, 2026 19:53
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.

1 participant