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(android): setting tab properties before open event crashes as of 10.0.0 #12717

Merged
merged 2 commits into from Apr 13, 2021

Conversation

jquick-axway
Copy link
Contributor

JIRA:
https://jira.appcelerator.org/browse/TIMOB-28418

Summary:

  • Setting a TabGroup's tab property after creation but before the "open" event crashes as of 10.0.0.
    • Issue is with TabProxy.onPropertyChanged() calling TabGroupProxy.getOrCreateView() method. It can't create tab group's view until activity has been opened. (I'm not sure why it didn't crash before 10.0.0.)
  • Fixed to not log following error upon open if activeTab property was not set as of 10.0.0.
    • No valid tab provided when setting active tab.
  • Fixed to not log following error upon close if all tabs were removed as of 10.0.0.
    • Cannot activate tab not in this group.

Test:

  1. Create a Classic Titanium test app from template. (It contains tab group icons.)
  2. Use TabGroupChangeBeforeOpenTest.js attached to TIMOB-28418 as the app.js.
  3. Build and run on Android.
  4. Verify app starts up without crashing.
  5. Verify you see Tab 1 and Tab 2 tab titles with icons.
  6. Verify tab 1's badge number is 1 and tab 2's badge number is 2.
  7. Verify the following error is NOT logged.
    No valid tab provided when setting active tab.

@jquick-axway jquick-axway added android bug backport 10_2_X when applied, PRs with this label will get an auto-generated backport to 10_2_X branch on merge labels Apr 13, 2021
@build build added this to the 10.1.0 milestone Apr 13, 2021
@build build requested a review from a team April 13, 2021 02:31
@build
Copy link
Contributor

build commented Apr 13, 2021

Fails
🚫 Tests have failed, see below for more information.
Messages
📖 ✊ The commits in this PR match our conventions! Feel free to Rebase and Merge this PR when ready.
📖 ❌ 4 tests have failed There are 4 tests failing and 965 skipped out of 16047 total tests.
📖

💾 Here's the generated SDK zipfile.

Tests:

ClassnameNameTimeError
ios.macos.Titanium.Blobimage dimensions should be reported in pixels (10.15.7)0.125
Error: expected 6 to be 11
value@file:///node_modules/should/cjs/should.js:356:23
postlayout@file:///ti.blob.test.js:488:33
ios.macos.Titanium.Media.properties.audioPlaying is a Boolean (10.15.7)385.504
Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (app.js)
run@file:///ti.main.js:8796:22
processImmediateQueue@file:///ti.main.js:8859:18
drainQueues@file:///ti.main.js:8836:52
ios.macos.Titanium.Media.AudioPlayer.properties.duration gives around 45 seconds for test input (10.15.7)1.101
Error: expected -2147483648 to be within 45250..45500
value@file:///node_modules/should/cjs/should.js:356:23
file:///ti.media.audioplayer.test.js:134:51
ios.macos.Titanium.UI.WebViewbeforeload (10.15.7)30.04
Error: Timeout of 30000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (app.js)

Generated by 🚫 dangerJS against 8aee9ce

Copy link
Contributor

@garymathews garymathews left a comment

Choose a reason for hiding this comment

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

CR: PASS

@ssjsamir ssjsamir self-requested a review April 13, 2021 13:39
Copy link
Contributor

@ssjsamir ssjsamir left a comment

Choose a reason for hiding this comment

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

FR Passed, tested using the instructions mentioned in the description

Test Environment

MacOS Big Sur: 11.1 Beta 1
Xcode: 12.2 Beta
Java Version: 1.8.0_242
Android NDK: 21.3.6528147
Node.js: 12.18.1
""NPM":"5.0.0","CLI":"8.1.1""
Android API 29 Nexus 5X emulator 

@sgtcoolguy sgtcoolguy merged commit f785ff9 into tidev:master Apr 13, 2021
@build build removed the backport 10_2_X when applied, PRs with this label will get an auto-generated backport to 10_2_X branch on merge label Apr 13, 2021
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