Skip to content

Component testing on android emulator #3460

Merged
beatfactor merged 4 commits intonightwatchjs:mainfrom
prudhvi22:testing-on-mobile
Nov 1, 2022
Merged

Component testing on android emulator #3460
beatfactor merged 4 commits intonightwatchjs:mainfrom
prudhvi22:testing-on-mobile

Conversation

@prudhvi22
Copy link
Copy Markdown
Contributor

Changes

  • Replacing localhost with 10.0.2.2 in baseUrl for mobile component testing on mobile.

@prudhvi22 prudhvi22 requested a review from beatfactor October 31, 2022 17:56
Comment thread lib/core/client.js Outdated
Comment thread lib/core/client.js Outdated
Comment thread lib/core/client.js Outdated

// For e2e and component testing on android emulator
if (!this.settings.desiredCapabilities.real_mobile && this.settings.desiredCapabilities.avd) {
value = value.replace(/localhost|127.0.0.1/g, '10.0.2.2');
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
value = value.replace(/localhost|127.0.0.1/g, '10.0.2.2');
value = value.replace('localhost', '10.0.2.2').replace('127.0.0.1', '10.0.2.2');

Comment thread test/src/index/testMobileComponent.js Outdated


describe('Mobile Component Testing', function () {
it('test baseUrl for Andoid Emulator', function(){
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

can you add a test for '127.0.0.1' as well?

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