Use Autocomplete instead of Select in Add to List screen

This commit is contained in:
2023-01-05 10:07:01 -08:00
parent 4d0b9b015c
commit 7b236b1c2f
6 changed files with 105 additions and 28 deletions

View File

@@ -6,7 +6,12 @@ Copyright (c) 2022 Asymworks, LLC. All Rights Reserved.
import pytest
from sigl.domain.service import product_by_id, product_create, products_all
from sigl.domain.service import (
product_by_id,
product_by_name,
product_create,
products_all,
)
# Always use 'app' fixture so ORM gets initialized
pytestmark = pytest.mark.usefixtures('app')
@@ -60,3 +65,11 @@ def test_product_all_items_skips_non_remembered(session):
assert p1 in products
assert p3 in products
assert p2 not in products
@pytest.mark.unit
def test_product_lookup_by_name(session):
"""Test that a Product can be looked up by Name (case-insensitive)."""
p1 = product_create(session, 'Apples')
product = product_by_name(session, 'apples')
assert product == p1