Родитель
34cf3cddb4
Коммит
f4875c6968
|
@ -62,6 +62,12 @@ export const QUERIABLE_FIELDS: QueryField[] = [
|
|||
// 'launch_bug_url': Feature.launch_bug_url,
|
||||
// 'initial_public_proposal_url': Feature.initial_public_proposal_url,
|
||||
// 'browsers.chrome.blink_components': Feature.blink_components,
|
||||
{
|
||||
name: 'shipping_year',
|
||||
kind: NUM_KIND,
|
||||
doc: 'Estimated shipping year',
|
||||
},
|
||||
|
||||
{
|
||||
name: 'browsers.chrome.devrel',
|
||||
kind: EMAIL_KIND,
|
||||
|
|
|
@ -63,6 +63,7 @@ def _get_strings_dict(fe: FeatureEntry) -> dict[str, list[str|None]]:
|
|||
|
||||
'bug_url': [fe.bug_url],
|
||||
'launch_bug_url': [fe.launch_bug_url],
|
||||
'shipping_year': [str(fe.shipping_year or '')],
|
||||
|
||||
# TODO: impl_status_Chrome
|
||||
'flag_name': [fe.flag_name],
|
||||
|
@ -116,7 +117,6 @@ def _get_strings_dict(fe: FeatureEntry) -> dict[str, list[str|None]]:
|
|||
def get_strings(fe: FeatureEntry, field_name: str|None = None) -> list[str]:
|
||||
"""Return a list of separate string values in the given feature entry."""
|
||||
strings_dict = _get_strings_dict(fe)
|
||||
|
||||
if field_name and field_name in strings_dict:
|
||||
strings = strings_dict[field_name]
|
||||
else:
|
||||
|
|
|
@ -274,6 +274,7 @@ QUERIABLE_FIELDS: dict[str, Property] = {
|
|||
'launch_bug_url': FeatureEntry.launch_bug_url,
|
||||
'breaking_change': FeatureEntry.breaking_change,
|
||||
'enterprise_impact': FeatureEntry.enterprise_impact,
|
||||
'shipping_year': FeatureEntry.shipping_year,
|
||||
|
||||
'browsers.chrome.status': FeatureEntry.impl_status_chrome,
|
||||
'browsers.chrome.flag_name': FeatureEntry.flag_name,
|
||||
|
|
|
@ -211,6 +211,7 @@ class SearchFeaturesTest(testing_config.CustomTestCase):
|
|||
self.check_wrong_type('owner', [True])
|
||||
self.check_wrong_type('owner', [123])
|
||||
self.check_wrong_type('deleted', ['not a boolean'])
|
||||
self.check_wrong_type('shipping_year', ['not an integer'])
|
||||
self.check_wrong_type('star_count', ['not an integer'])
|
||||
self.check_wrong_type('created.when', ['not a date'])
|
||||
self.check_wrong_type('owner', ['ok@example.com', True])
|
||||
|
|
Загрузка…
Ссылка в новой задаче