mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Add dropdown conditions
Summary: Dropdown conditions let you specify a predicate formula that's used to filter choices and references in their respective autocomplete dropdown menus. Test Plan: Python and browser tests (WIP). Reviewers: jarek, paulfitz Reviewed By: jarek Subscribers: dsagal, paulfitz Differential Revision: https://phab.getgrist.com/D4235
This commit is contained in:
@@ -1,22 +0,0 @@
|
||||
import {getTimeFromNow} from 'app/client/models/HomeModel';
|
||||
import {assert} from 'chai';
|
||||
import moment from 'moment';
|
||||
|
||||
describe("HomeModel", function() {
|
||||
describe("getTimeFromNow", function() {
|
||||
it("should give good summary of time that just passed", function() {
|
||||
const t = moment().subtract(10, 's');
|
||||
assert.equal(getTimeFromNow(t.toISOString()), 'a few seconds ago');
|
||||
});
|
||||
|
||||
it("should gloss over times slightly in future", function() {
|
||||
const t = moment().add(2, 's');
|
||||
assert.equal(getTimeFromNow(t.toISOString()), 'a few seconds ago');
|
||||
});
|
||||
|
||||
it("should not gloss over times further in future", function() {
|
||||
const t = moment().add(2, 'minutes');
|
||||
assert.equal(getTimeFromNow(t.toISOString()), 'in 2 minutes');
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user