mirror of
https://github.com/grafana/grafana.git
synced 2026-07-30 00:08:10 -05:00
Explore: Add history to query fields
- queries are saved to localstorage history array - one history per datasource type (plugin ID) - 100 items kept with timestamps - history suggestions can be pulled up with Ctrl-SPACE
This commit is contained in:
@@ -32,6 +32,18 @@ describe('store', () => {
|
||||
expect(store.getBool('key5', false)).toBe(true);
|
||||
});
|
||||
|
||||
it('gets an object', () => {
|
||||
expect(store.getObject('object1')).toBeUndefined();
|
||||
expect(store.getObject('object1', [])).toEqual([]);
|
||||
store.setObject('object1', [1]);
|
||||
expect(store.getObject('object1')).toEqual([1]);
|
||||
});
|
||||
|
||||
it('sets an object', () => {
|
||||
expect(store.setObject('object2', { a: 1 })).toBe(true);
|
||||
expect(store.getObject('object2')).toEqual({ a: 1 });
|
||||
});
|
||||
|
||||
it('key should be deleted', () => {
|
||||
store.set('key6', '123');
|
||||
store.delete('key6');
|
||||
|
||||
Reference in New Issue
Block a user