Skip to content

[web-app] Unify steps for cookie management#5637

Draft
valfirst wants to merge 1 commit intomasterfrom
web-app-unify-steps-for-cookie-management
Draft

[web-app] Unify steps for cookie management#5637
valfirst wants to merge 1 commit intomasterfrom
web-app-unify-steps-for-cookie-management

Conversation

@valfirst
Copy link
Copy Markdown
Collaborator

@valfirst valfirst commented Jan 2, 2025

No description provided.

@valfirst valfirst requested a review from a team as a code owner January 2, 2025 20:17
@valfirst valfirst force-pushed the web-app-unify-steps-for-cookie-management branch from 17019ba to dacd0c2 Compare January 2, 2025 20:21
@valfirst valfirst marked this pull request as draft January 2, 2025 20:21
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jan 2, 2025

Qodana for JVM

5 new problems were found

Inspection name Severity Problems
Incorrect constructor injection in XML Spring bean 🔴 Failure 5

💡 Qodana analysis was run in the pull request mode: only the changed files were checked
☁️ View the detailed Qodana report

Contact Qodana team

Contact us at qodana-support@jetbrains.com

<property name="uriToIgnoreRegex" value="${resource-checker.uri-to-ignore-regex}" />
</bean>

<bean id="browserAndHttpContextIntegrationSteps" class="org.vividus.integration.steps.BrowserAndHttpContextIntegrationSteps" />

Check failure

Code scanning / QDJVM

Incorrect constructor injection in XML Spring bean Error

No matching constructor found in class 'BrowserAndHttpContextIntegrationSteps'#treeend |-------------------------------------------------|---|-----------|
| BrowserAndHttpContextIntegrationSteps(...): | | Bean: |
| CookieManager<?> cookieManager | | ??? |
| CookieStoreProvider cookieStoreProvider | | ??? |
| HttpTestContext httpTestContext | | ??? |
| NavigateActions navigateActions | | ??? |
| AttachmentPublisher attachmentPublisher | | ??? |
</bean>
<bean id="mouseActions" class="org.vividus.ui.web.action.MouseActions" />
<bean id="navigateActions" class="org.vividus.ui.web.action.NavigateActions" />
<bean id="navigateActions" class="org.vividus.ui.web.action.SeleniumNavigateActions" />

Check failure

Code scanning / QDJVM

Incorrect constructor injection in XML Spring bean Error

No matching constructor found in class 'SeleniumNavigateActions'#treeend |----------------------------------------|---|----------------------------------------------------|
| SeleniumNavigateActions(...): | | Bean: |
| IWebDriverProvider webDriverProvider | | ??? |
| WebJavascriptActions javascriptActions | | Autowired: javascriptActions(WebJavascriptActions) |
| IWebWaitActions waitActions | | Autowired: null(WebWaitActions) |
| ISoftAssert softAssert | | ??? |
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Jan 2, 2025

@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 2, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.77%. Comparing base (64667fc) to head (fa11433).
⚠️ Report is 33 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #5637   +/-   ##
=========================================
  Coverage     97.77%   97.77%           
+ Complexity     7400     7399    -1     
=========================================
  Files          1014     1013    -1     
  Lines         21420    21421    +1     
  Branches       1405     1406    +1     
=========================================
+ Hits          20943    20944    +1     
  Misses          361      361           
  Partials        116      116           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@valfirst valfirst force-pushed the web-app-unify-steps-for-cookie-management branch from dacd0c2 to fa11433 Compare March 13, 2026 21:17
@valfirst valfirst requested a review from Copilot March 13, 2026 21:17
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 13, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 57e86f2f-d29a-4547-b332-7f38d9c2d17b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch web-app-unify-steps-for-cookie-management
📝 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.

Tip

You can disable sequence diagrams in the walkthrough.

Disable the reviews.sequence_diagrams setting to disable sequence diagrams in the walkthrough.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR unifies cookie-management steps across Selenium and Playwright by introducing a shared navigation abstraction and moving cookie operations into the common CookieSteps implementation.

Changes:

  • Introduced NavigateActions abstraction (getCurrentUrl, refresh) and added Selenium/Playwright implementations.
  • Migrated “set/remove cookies (with/without applying changes)” steps into vividus-extension-web-app shared CookieSteps.
  • Simplified/centralized browser↔HTTP cookie integration steps and updated docs + integration stories accordingly.

Reviewed changes

Copilot reviewed 26 out of 26 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
vividus-tests/src/main/resources/story/integration/WebCookieSteps.story Updates integration story to validate new unified cookie steps behavior (apply vs no-apply).
vividus-plugin-web-app/src/test/java/org/vividus/ui/web/action/NavigateActionsTests.java Updates Selenium navigation tests for renamed implementation and adds getCurrentUrl coverage.
vividus-plugin-web-app/src/test/java/org/vividus/steps/ui/web/SeleniumCookieStepsTests.java Removes cookie-step tests now covered by shared CookieStepsTests.
vividus-plugin-web-app/src/main/resources/vividus-plugin/spring.xml Switches navigateActions bean to Selenium-specific implementation.
vividus-plugin-web-app/src/main/java/org/vividus/ui/web/action/NavigateActions.java Renames/refactors Selenium navigate actions and adds getCurrentUrl.
vividus-plugin-web-app/src/main/java/org/vividus/ui/web/action/INavigateActions.java Makes Selenium-specific navigation extend shared NavigateActions.
vividus-plugin-web-app/src/main/java/org/vividus/steps/ui/web/SeleniumCookieSteps.java Delegates cookie operations to shared CookieSteps via NavigateActions.
vividus-plugin-web-app-to-rest-api/src/test/java/org/vividus/integration/steps/SeleniumBrowserAndHttpContextIntegrationStepsTests.java Removes Selenium-specific tests in favor of unified base steps tests.
vividus-plugin-web-app-to-rest-api/src/test/java/org/vividus/integration/steps/PlaywrightBrowserAndHttpContextIntegrationStepsTests.java Removes Playwright-specific tests in favor of unified base steps tests.
vividus-plugin-web-app-to-rest-api/src/test/java/org/vividus/integration/steps/BrowserAndHttpContextIntegrationStepsTests.java Adds unified tests using NavigateActions.refresh() contract.
vividus-plugin-web-app-to-rest-api/src/main/resources/vividus-plugin/spring.xml Registers unified steps bean and removes engine-specific профiled beans.
vividus-plugin-web-app-to-rest-api/src/main/java/org/vividus/integration/steps/SeleniumBrowserAndHttpContextIntegrationSteps.java Removes Selenium-specific subclass in favor of unified steps.
vividus-plugin-web-app-to-rest-api/src/main/java/org/vividus/integration/steps/PlaywrightBrowserAndHttpContextIntegrationSteps.java Removes Playwright-specific subclass in favor of unified steps.
vividus-plugin-web-app-to-rest-api/src/main/java/org/vividus/integration/steps/BrowserAndHttpContextIntegrationSteps.java Uses NavigateActions directly instead of passing a refresh runnable.
vividus-plugin-web-app-playwright/src/test/java/org/vividus/ui/web/playwright/steps/PlaywrightCookieStepsTests.java Removes tests for cookie operations now covered by shared CookieStepsTests.
vividus-plugin-web-app-playwright/src/test/java/org/vividus/ui/web/playwright/steps/PageStepsTests.java Updates refresh-page test to rely on NavigateActions.refresh().
vividus-plugin-web-app-playwright/src/test/java/org/vividus/ui/web/playwright/action/PlaywrightNavigateActionsTests.java Adds unit tests for Playwright navigation abstraction.
vividus-plugin-web-app-playwright/src/main/resources/vividus-plugin/spring.xml Registers Playwright NavigateActions implementation bean.
vividus-plugin-web-app-playwright/src/main/java/org/vividus/ui/web/playwright/steps/PlaywrightCookieSteps.java Delegates cookie ops to shared CookieSteps using NavigateActions.
vividus-plugin-web-app-playwright/src/main/java/org/vividus/ui/web/playwright/steps/PageSteps.java Uses NavigateActions.refresh() instead of Page.reload().
vividus-plugin-web-app-playwright/src/main/java/org/vividus/ui/web/playwright/action/PlaywrightNavigateActions.java Introduces Playwright implementation of shared NavigateActions.
vividus-extension-web-app/src/test/java/org/vividus/ui/web/CookieStepsTests.java Adds/updates tests to cover unified cookie operations via NavigateActions.
vividus-extension-web-app/src/main/java/org/vividus/ui/web/action/NavigateActions.java Introduces shared navigation contract used by cookie steps and integrations.
vividus-extension-web-app/src/main/java/org/vividus/ui/web/CookieSteps.java Moves cookie set/remove (+ no-apply variants) into shared implementation.
docs/modules/plugins/partials/web-cookie-steps.adoc Documents new “without applying changes” steps and refresh semantics.
docs/modules/plugins/pages/plugin-web-app.adoc Replaces inlined cookie steps docs with shared partial include.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

<property name="uriToIgnoreRegex" value="${resource-checker.uri-to-ignore-regex}" />
</bean>

<bean id="browserAndHttpContextIntegrationSteps" class="org.vividus.integration.steps.BrowserAndHttpContextIntegrationSteps" />
@Test
void shoutSetAllCookiesWithoutApplyingChanges()
{
testSetAllCookies(cookieSteps::setAllCookiesWithoutApply);
}

@Test
void shoutSetAllCookiesWithoutApplyingChanges()
Comment on lines +60 to +61
* Adds the cookies provided in the input ExamplesTable with domain of the opened currently page. After adding
* the cookies the opened page is refreshed (this is required to apply the new cookies).
Removes the certain cookie from the current domain.
Removes the certain cookie from the current domain. The actions performed by the step:

* remove the certain cookie the from current domain;
@github-actions
Copy link
Copy Markdown

Qodana for JVM

5 new problems were found

Inspection name Severity Problems
Incorrect constructor injection in XML Spring bean 🔴 Failure 5

💡 Qodana analysis was run in the pull request mode: only the changed files were checked
☁️ View the detailed Qodana report

Contact Qodana team

Contact us at qodana-support@jetbrains.com

@sonarqubecloud
Copy link
Copy Markdown

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.

3 participants