-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TIMOB-25414](7_0_X) : iOS Search bar in absolute-positioned ListView…
… extends when focused (#9657) * [TIMOB-25414] : iOS Search bar in absolute-positioned ListView extends when focused * [TIMOB-25414] : Unit test added
- Loading branch information
1 parent
ee87c7b
commit 9423ebb
Showing
4 changed files
with
54 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/* | ||
* Appcelerator Titanium Mobile | ||
* Copyright (c) 2011-Present by Appcelerator, Inc. All Rights Reserved. | ||
* Licensed under the terms of the Apache Public License | ||
* Please see the LICENSE included with this distribution for details. | ||
*/ | ||
/* eslint-env mocha */ | ||
/* global Ti */ | ||
/* eslint no-unused-expressions: "off" */ | ||
'use strict'; | ||
var should = require('./utilities/assertions'); | ||
|
||
describe('Titanium.UI.SearchBar', function () { | ||
it.ios('Should work with absolute-positioned search-bars (ListView)', function (finish) { | ||
var data = [ { properties: { title : 'Bashful', hasDetail: true } }]; | ||
|
||
var win = Ti.UI.createWindow( { | ||
backgroundColor : 'white' | ||
}); | ||
|
||
win.addEventListener('open', function () { | ||
should(listView.top).eql(50); | ||
should(listView.bottom).eql(50); | ||
should(listView.left).eql(40); | ||
should(listView.right).eql(40); | ||
|
||
should(searchBar.getWidth()).eql(150); | ||
|
||
setTimeout(function () { | ||
win.close(); | ||
finish(); | ||
}, 1000); | ||
}); | ||
|
||
var searchBar = Ti.UI.createSearchBar( { | ||
width : 150 | ||
}); | ||
|
||
var listView = Ti.UI.createListView( { | ||
backgroundColor : '#999', | ||
searchView : searchBar, | ||
sections : [Ti.UI.createListSection({items: data})], | ||
top : 50, | ||
bottom : 50, | ||
left : 40, | ||
right : 40 | ||
}); | ||
win.add(listView); | ||
win.open(); | ||
}); | ||
}); |