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

fix(ios) : Convert property ‘value’ to string inside hasText function #10521

Merged
merged 9 commits into from Dec 19, 2018

Conversation

vijaysingh-axway
Copy link
Contributor

@vijaysingh-axway vijaysingh-axway commented Dec 10, 2018

@build
Copy link
Contributor

build commented Dec 10, 2018

Messages
📖

💾 Here's the generated SDK zipfile.

📖

✅ All tests are passing
Nice one! All 2904 tests are passing.

Generated by 🚫 dangerJS


win.add(textFieldB);

textFieldA.addEventListener('change', function () {
Copy link
Contributor

Choose a reason for hiding this comment

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

What's the change event listener for? How will it be triggered in a unit test?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

When value get set , at that time also 'change' event listener get called.

Copy link
Contributor

Choose a reason for hiding this comment

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

This event will only be triggered by user input, not when changing the text programmatically.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In this particular case when we set number, 'change' event listener is getting called. I guess you are correct, ideally it should not call if it set programatically.
Though I have updated unit test, I'll create a ticket to check the behaviour of 'change' event listener.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For verifying the conversion of 0 to "0" -
There is no getter method implemented in this to get value from textfield. Whenever we call getter it will simply fetch value from proxy (default getter). So with getter it will always give the same value, which is number. Other places also I can see default getter (value from proxy) returned.

Copy link
Contributor

@janvennemann janvennemann left a comment

Choose a reason for hiding this comment

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

Please also verify the string value in the unit test, e.g. make sure 0 is being converted to "0".

@lokeshchdhry
Copy link
Contributor

FR Passed.

hasText() works as expected.

Studio Ver: 5.1.2.201810301430
SDK Ver: 8.0.0 local build
OS Ver: 10.14
Xcode Ver: Xcode 10.1
Appc NPM: 4.2.13
Appc CLI: 7.0.9-3
Daemon Ver: 1.1.3
Ti CLI Ver: 5.1.1
Alloy Ver: 1.13.4
Node Ver: 8.9.1
NPM Ver: 5.5.1
Java Ver: 10.0.2
Simulator: Iphone X IOS 12.1

@ssjsamir ssjsamir merged commit 3f1c9c2 into tidev:master Dec 19, 2018
Brianggalvez pushed a commit to Brianggalvez/titanium_mobile that referenced this pull request Dec 31, 2018
* source/master: (1616 commits)
  [TIMOB-26537] Android: Module "AndroidManifest.xml" <uses> elements overwrites "tiapp.xml" elements (tidev#10467)
  fix(ios): test for refresh control usage (tidev#10550)
  fix: standardize os.arch values to Node.js equivalents
  feat(api): add node-compatible os core module
  docs: add totalMemory(), cpus() and uptime to Ti.Platform
  feat(ios): add totalMemory() method and uptime property to Ti.Platform
  feat(android): add totalMemory() method, cpus() method and uptime property to Ti.Platform
  chore(android): remove deprecated Geolocation properties (tidev#10547)
  fix(ios): Set transitionIsAnimating while pushing the controller rather waiting for delegate (tidev#10535)
  fix(ios) : Convert property ‘value’ to string inside hasText function (tidev#10521)
  fix(ios): Added missing flag to code sign TitaniumKit so device builds work again. (tidev#10505)
  [TIMOB-26585] Android: Catch all TCP socket read and write exceptions (tidev#10490)
  [TIMOB-26095] iOS 12: Replace UIWebView API in favor of WKWebView (tidev#10169)
  chore: update node-titanium-sdk (tidev#10548)
  fix(android): Fix for splashscreen activity with translucent status bar. (tidev#10536)
  core(deps): Add danger-plugin-dependencies
  chore: migrate latest tests to suite
  chore(package): update lockfile package-lock.json
  chore(package): update @seadub/danger-plugin-junit to version 0.0.2
  test: migrate tests to common suite
  ...

# Conflicts:
#	apidoc/Titanium/UI/ListView.yml
#	iphone/Classes/TiUIListView.h
#	iphone/Classes/TiUIListView.m
#	iphone/Classes/TiUIListViewProxy.m
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants