Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolving path inconsistency in container.js and appium.js #4866

Merged
merged 3 commits into from
Mar 5, 2025

Conversation

mjalav
Copy link
Contributor

@mjalav mjalav commented Feb 26, 2025

Applicable helpers:

  • Playwright
  • Puppeteer
  • WebDriver
  • REST
  • FileHelper
  • [X ] Appium
  • TestCafe

Applicable plugins:

  • allure
  • autoDelay
  • autoLogin
  • customLocator
  • pauseOnFail
  • coverage
  • retryFailedStep
  • screenshotOnFail
  • selenoid
  • stepByStepReport
  • stepTimeout
  • wdio
  • subtitles

Type of change

  • 🔥 Breaking changes
  • 🚀 New functionality
  • [X ] 🐛 Bug fix
  • 🧹 Chore
  • 📋 Documentation changes/updates
  • ♨️ Hot fix
  • 🔨 Markdown files fix - not related to source code
  • 💅 Polish code

Checklist:

  • Tests have been added
  • Documentation has been added (Run npm run docs)
  • [X ] Lint checking (Run npm run lint)
  • [X ] Local tests are passed (Run npm test)

Fixed codeceptjs#4865
Enhancement: Prevent Double Slashes in Appium Endpoint URL
Overview:
This update improves the _buildAppiumEndpoint() function by ensuring the path does not end with a trailing slash. This prevents potential issues with double slashes when constructing the Appium REST API endpoint URL.

Changes:
Introduced normalizedPath, which removes a trailing slash from path using .replace(/\/$/, '').
Updated the return statement to use normalizedPath instead of path.
Benefits:
✅ Prevents malformed URLs with double slashes.
✅ Improves consistency and reliability of API requests.
✅ Enhances code readability and maintainability.
@mjalav
Copy link
Contributor Author

mjalav commented Feb 26, 2025

not sure why Playwright and Puppeteer tests failed. would you please review @kobenguyent? Thanks.

Co-authored-by: kobenguyent <[email protected]>
@kobenguyent kobenguyent merged commit f3cd36e into codeceptjs:3.x Mar 5, 2025
10 of 12 checks passed
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.

Path Inconsistency in container.js (Introduced in v3.7.2)
2 participants