You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 18, 2024. It is now read-only.
Add red highlight for invalid dates. Validate all (global and per-region) dates before submit.
* Check `validate()` in every tag, not only required
Labels' validate() was broken anyway, so better to remove it.
And TimeSeriesLabels` required could not be checked because that's
not a classification.
* Add `validate()` for DateTime
Check per-regions as well.
It's important to go through results and check their values.
And because values are formatted but min/max is in ISO, we have to
convert values to ISO.
* Add little comments
* Fix Required — validate only if required=true
* Fix linting
* Fix validate() result — should be true/false only
* Add test for DateTime validation; fix current one
* Fix ISO conversion with shifted timezones; fix tests
* Fix min/max checks for only=year
text: 'Albert Einstein (/ˈaɪnstaɪn/ EYEN-styne;[6] German: [ˈalbɛʁt ˈʔaɪnʃtaɪn] (listen); 14 March 1879 – 18 April 1955) was a German-born theoretical physicist,[7] widely acknowledged to be one of the greatest and most influential physicists of all time. Einstein is best known for developing the theory of relativity, but he also made important contributions to the development of the theory of quantum mechanics. Relativity and quantum mechanics are together the two pillars of modern physics.[3][8] His mass–energy equivalence formula E = mc2, which arises from relativity theory, has been dubbed "the world\'s most famous equation".[9] His work is also known for its influence on the philosophy of science.[10][11] He received the 1921 Nobel Prize in Physics "for his services to theoretical physics, and especially for his discovery of the law of the photoelectric effect",[12] a pivotal step in the development of quantum theory. His intellectual achievements and originality resulted in "Einstein" becoming synonymous with "genius".[13]',
28
27
};
29
28
30
-
constannotations=[
31
-
{label: 'birth',rangeStart: 83,rangeEnd: 96,text: '14 March 1879',date: '03141879',dateValue: '1879-03-14',year: '2022'},
32
-
{label: 'death',rangeStart: 99,rangeEnd: 112,text: '18 April 1955',date: '04181955',dateValue: '1955-04-18',year: '2021'},
33
-
{label: 'event',rangeStart: 728,rangeEnd: 755,text: '1921 Nobel Prize in Physics',date: '10101921',dateValue: '1921-10-10',year: '2020'},
29
+
constcreatedDate={
30
+
incorrectMin: '1988-01-12',
31
+
correctMin: '1988-01-13',
32
+
incorrectMax: '2000-01-01',
33
+
correctMax: '1999-12-31',
34
+
result: '31.12.1999',
35
+
};
36
+
37
+
constregions=[
38
+
{label: 'birth',rangeStart: 83,rangeEnd: 96,text: '14 March 1879',dateValue: '1879-03-14',year: '2022'},
39
+
{label: 'death',rangeStart: 99,rangeEnd: 112,text: '18 April 1955',dateValue: '1955-04-18',year: '2021'},
40
+
{label: 'event',rangeStart: 728,rangeEnd: 755,text: '1921 Nobel Prize in Physics',dateValue: '1921-10-10',year: '2020'},
34
41
];
35
42
36
43
constparams={ config, data };
37
44
38
-
Scenario('Check DateTime holds state between annotations and saves result',asyncfunction({ I, LabelStudio }){
39
-
45
+
Scenario('Check DateTime holds state between annotations and saves result',asyncfunction({ I, AtDateTime, AtLabels, AtSidebar, LabelStudio }){
0 commit comments