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): cleanup search controller on close #13072

Merged
merged 1 commit into from Sep 21, 2021

Conversation

garymathews
Copy link
Contributor

@garymathews garymathews commented Sep 16, 2021

  • Cleanup search controller state upon window close
    • Preventing search controller from maintaining focus after close
TEST CASE
const win_a = Ti.UI.createWindow({ title: 'Window A' });
const row = Ti.UI.createTableViewRow({ title: 'Open Window B' });
const table_a = Ti.UI.createTableView({ data: [ row ] });
const nav = Ti.UI.createNavigationWindow({ window: win_a });

row.addEventListener('click', e => {
    const win_b = Ti.UI.createWindow({ title: 'Window B' });
    const table_b = Ti.UI.createTableView({
        search: Ti.UI.createSearchBar(),
        data: [ Ti.UI.createTableViewRow({ title: 'Focus search then navigate back' }) ]
    });

    win_b.add(table_b);
    nav.openWindow(win_b);
});

win_a.add(table_a);
nav.open();
  • Tap 'Open Window B'
  • Tap search box
  • Navigate to Window A
  • Tap 'Open Window B'
    • Window B should display

JIRA Ticket
Issue #13070

@build
Copy link
Contributor

build commented Sep 16, 2021

Warnings
⚠️ 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.
📖 ❌ 10 tests have failed There are 10 tests failing and 1162 skipped out of 20666 total tests.
📖

💾 Here's the generated SDK zipfile.

Tests:

ClassnameNameTimeError
android.emulator.5.0.Titanium.Geolocation.methods#reverseGeocoder() works via Promise return value (5.0.2)2.002
Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (app.js)
android.emulator.5.0.Titanium.Geolocation.methods#reverseGeocoder() works via function callback (5.0.2)5.054
Error: expected false to be true
at Assertion.fail (/node_modules/should/cjs/should.js:275:13)
      at Assertion.value (/node_modules/should/cjs/should.js:356:9)
      at Geolocation.<anonymous> (/ti.geolocation.test.js:645:32)
android.emulator.5.0.Titanium.Geolocation.methods#forwardGeocoder() works via Promise return value (5.0.2)5.047
Error: done() invoked with non-Error: {"source":{"accuracy":1,"locationServicesEnabled":true,"hasCompass":true,"lastGeolocation":"{\"latitude\":37.4219983,\"longitude\":-122.084,\"altitude\":5,\"accuracy\":20,\"heading\":0,\"speed\":0,\"timestamp\":1632250889000}","apiName":"Ti.Geolocation","bubbleParent":true,"__propertiesDefined__":true},"code":-1,"success":false}
at /ti.geolocation.test.js:610:12
android.emulator.5.0.Titanium.Geolocation.methods#forwardGeocoder() works via callback argument (5.0.2)5.015
Error: expected false to be true
at Assertion.fail (/node_modules/should/cjs/should.js:275:13)
      at Assertion.value (/node_modules/should/cjs/should.js:356:9)
      at Geolocation.<anonymous> (/ti.geolocation.test.js:585:32)
ios.ipad.Titanium.Blobresize very large image (15.0.0)11.054
Error: Timeout of 10000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (app.js)
postlayout@file:///Users/build/Library/Developer/CoreSimulator/Devices/0B3E2435-8B37-4A3D-B794-2A02D0029000/data/Containers/Bundle/Application/56322862-E226-4081-AFEC-243A066294AD/mocha.app/ti.blob.test.js:464:13
ios.ipad.Titanium.UI.WebView.userAgent (15.0.0)60.003
Error: Timeout of 60000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (app.js)
ios.iphone.Titanium.Blobresize very large image (15.0.0)10.651
Error: Timeout of 10000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (app.js)
postlayout@file:///Users/build/Library/Developer/CoreSimulator/Devices/B2925BFB-EA99-4EBD-9A17-248A2DA2B125/data/Containers/Bundle/Application/81577197-C509-45A7-A8C5-699D524437C0/mocha.app/ti.blob.test.js:464:13
ios.iphone.Titanium.UI.View.borderRadius corners1 value with shadow effect (15.0.0)0.035
Error: expected 'Ti.UI.View' to match image ('snapshots/borderRadiusWithShadow_30px@3x~iphone.png')
    mismatched pixels. allowed: 0, actual: 18
value@file:///Users/build/Library/Developer/CoreSimulator/Devices/B2925BFB-EA99-4EBD-9A17-248A2DA2B125/data/Containers/Bundle/Application/81577197-C509-45A7-A8C5-699D524437C0/mocha.app/node_modules/should/cjs/should.js:356:23
postlayout@file:///Users/build/Library/Developer/CoreSimulator/Devices/B2925BFB-EA99-4EBD-9A17-248A2DA2B125/data/Containers/Bundle/Application/81577197-C509-45A7-A8C5-699D524437C0/mocha.app/ti.ui.view.test.js:1264:39
ios.iphone.Titanium.UI.WebView.userAgent (15.0.0)60.002
Error: Timeout of 60000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (app.js)
ios.macos.Titanium.UI.WebView.userAgent (11.5.2)60.017
Error: Timeout of 60000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (app.js)

Generated by 🚫 dangerJS against 6261f5d

Copy link
Contributor

@jquick-axway jquick-axway left a comment

Choose a reason for hiding this comment

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

CR/FR: Pass

Tested on iOS 14.5 and iOS 12.4.

@lokeshchdhry
Copy link
Contributor

FR Passed.

@lokeshchdhry lokeshchdhry merged commit 7041f6f into tidev:master Sep 21, 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

4 participants