Skip to content

623 create the free and premium ai generate flow#22344

Merged
vraja-pro merged 8 commits intofeature/ai-generator-in-freefrom
623-create-the-free-and-premium-ai-generate-flow
Jun 12, 2025
Merged

623 create the free and premium ai generate flow#22344
vraja-pro merged 8 commits intofeature/ai-generator-in-freefrom
623-create-the-free-and-premium-ai-generate-flow

Conversation

@vraja-pro
Copy link
Copy Markdown
Contributor

@vraja-pro vraja-pro commented Jun 12, 2025

Context

Summary

This PR can be summarized in the following changelog entry:

  • Implements the flow for the free sparks.

Relevant technical choices:

Test instructions

Test instructions for the acceptance test before the PR gets merged

This PR can be acceptance tested by following these steps:

  • Edit a post ( on local environment use this patch fake-api.patch).
  • Click on Use AI button and check you see the upsell modal with the button to try for free.
  • Click on the Try for free button and check you now see the consent modal.
  • Grant consent and check you can see the AI generator
  • Generate titles until you reach 10 sparks
  • Check you see the toast notification and the "Generate 5 more" button is disabled.
    Screenshot 2025-06-12 at 16 41 46
  • Close the modal
  • Click on the "Use AI" button and check you now see the upsell modal without the "Try for free" button and with an alert:
    Screenshot 2025-06-12 at 16 36 50

Relevant test scenarios

  • Changes should be tested with the browser console open
  • Changes should be tested on different posts/pages/taxonomies/custom post types/custom taxonomies
  • Changes should be tested on different editors (Default Block/Gutenberg/Classic/Elementor/other)
  • Changes should be tested on different browsers
  • Changes should be tested on multisite

Test instructions for QA when the code is in the RC

  • QA should use the same steps as above.

QA can test this PR by following these steps:

Impact check

This PR affects the following parts of the plugin, which may require extra testing:

UI changes

  • This PR changes the UI in the plugin. I have added the 'UI change' label to this PR.

Other environments

  • This PR also affects Shopify. I have added a changelog entry starting with [shopify-seo], added test instructions for Shopify and attached the Shopify label to this PR.

Documentation

  • I have written documentation for this change. For example, comments in the Relevant technical choices, comments in the code, documentation on Confluence / shared Google Drive / Yoast developer portal, or other.

Quality assurance

  • I have tested this code to the best of my abilities.
  • During testing, I had activated all plugins that Yoast SEO provides integrations for.
  • I have added unit tests to verify the code works as intended.
  • If any part of the code is behind a feature flag, my test instructions also cover cases where the feature flag is switched off.
  • I have written this PR in accordance with my team's definition of done.
  • I have checked that the base branch is correctly set.

Innovation

  • No innovation project is applicable for this PR.
  • This PR falls under an innovation project. I have attached the innovation label.
  • I have added my hours to the WBSO document.

Fixes Create the Free and Premium AI generate flow

@vraja-pro vraja-pro added the changelog: non-user-facing Needs to be included in the 'Non-userfacing' category in the changelog label Jun 12, 2025
@vraja-pro vraja-pro force-pushed the 623-create-the-free-and-premium-ai-generate-flow branch from a504b0a to 6de3485 Compare June 12, 2025 13:39
@vraja-pro
Copy link
Copy Markdown
Contributor Author

CR & AC ✅

@vraja-pro vraja-pro merged commit d90c42d into feature/ai-generator-in-free Jun 12, 2025
19 checks passed
@vraja-pro vraja-pro deleted the 623-create-the-free-and-premium-ai-generate-flow branch June 12, 2025 14:08
@coveralls
Copy link
Copy Markdown

coveralls commented Jun 12, 2025

Pull Request Test Coverage Report for Build e4c93786bf87249678f057274cb09911da6ab0bc

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 10 of 87 (11.49%) changed or added relevant lines in 8 files are covered.
  • 4 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.05%) to 52.044%

Changes Missing Coverage Covered Lines Changed/Added Lines %
packages/js/src/ai-generator/components/introduction.js 1 2 50.0%
packages/js/src/ai-generator/store/free-sparks.js 0 4 0.0%
packages/js/src/ai-generator/store/usage-count.js 1 6 16.67%
packages/js/src/ai-generator/components/feature-error.js 0 8 0.0%
packages/js/src/ai-generator/components/modal-content.js 0 9 0.0%
packages/js/src/ai-generator/components/app.js 3 53 5.66%
Files with Coverage Reduction New Missed Lines %
packages/js/src/ai-generator/components/modal-content.js 2 1.97%
packages/js/src/ai-generator/components/app.js 2 4.24%
Totals Coverage Status
Change from base Build 43cd58aab1376b105881e33bd03944088801ab8d: -0.05%
Covered Lines: 29976
Relevant Lines: 58670

💛 - Coveralls

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

Labels

changelog: non-user-facing Needs to be included in the 'Non-userfacing' category in the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants