Skip to content

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

Merged
kobenguyent merged 3 commits into
codeceptjs:3.xfrom
mjalav:3.x
Mar 5, 2025
Merged

Resolving path inconsistency in container.js and appium.js #4866
kobenguyent merged 3 commits into
codeceptjs:3.xfrom
mjalav:3.x

Conversation

@mjalav

Copy link
Copy Markdown
Contributor

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)

Fixedcodeceptjs#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
Copy Markdown
ContributorAuthor

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

Comment threadlib/container.js Outdated
Co-authored-by: kobenguyent <7845001+kobenguyent@users.noreply.github.com>
@kobenguyent
kobenguyent merged commit f3cd36e into codeceptjs:3.xMar 5, 2025
@kobenguyentkobenguyent mentioned this pull request Mar 19, 2025
Sign up for freeto 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

@mjalav@kobenguyent