mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Add 'value' to trigger formula autocomplete
Summary: API signature for autocomplete updated to add column ID, which is necessary for exposing correct types for 'value'. Test Plan: Unit tests. Reviewers: alexmojaki Reviewed By: alexmojaki Subscribers: jarek, alexmojaki Differential Revision: https://phab.getgrist.com/D2896
This commit is contained in:
@@ -312,11 +312,17 @@ class TestRenames(test_engine.EngineTestCase):
|
||||
# Renaming a table should not leave the old name available for auto-complete.
|
||||
self.load_sample(self.sample)
|
||||
names = {"People", "Persons"}
|
||||
self.assertEqual(names.intersection(self.engine.autocomplete("Pe", "Address")), {"People"})
|
||||
self.assertEqual(
|
||||
names.intersection(self.engine.autocomplete("Pe", "Address", "city")),
|
||||
{"People"}
|
||||
)
|
||||
|
||||
# Rename the table and ensure that "People" is no longer present among top-level names.
|
||||
out_actions = self.apply_user_action(["RenameTable", "People", "Persons"])
|
||||
self.assertEqual(names.intersection(self.engine.autocomplete("Pe", "Address")), {"Persons"})
|
||||
self.assertEqual(
|
||||
names.intersection(self.engine.autocomplete("Pe", "Address", "city")),
|
||||
{"Persons"}
|
||||
)
|
||||
|
||||
def test_rename_to_id(self):
|
||||
# Check that we renaming a column to "Id" disambiguates it with a suffix.
|
||||
|
||||
Reference in New Issue
Block a user