@konfuzio/document-validation-ui 0.1.18-dev.0 → 0.1.18-dev.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/css/app.css +1 -1
- package/dist/index.html +1 -1
- package/dist/js/app.js +1 -1
- package/dist/js/app.js.map +1 -1
- package/package.json +1 -1
- package/src/components/DocumentAnnotations/DocumentAnnotations.cy.js +90 -90
- package/src/components/DocumentCategory.vue +8 -12
- package/src/components/DocumentEdit/DocumentEdit.cy.js +214 -1
- package/src/components/DocumentPage/NewAnnotation.vue +4 -1
- package/src/components/DocumentTopBar/DocumentTopBar.cy.js +14 -7
- package/src/store/category.js +13 -3
|
@@ -174,7 +174,7 @@ describe("Document Top Bar", () => {
|
|
|
174
174
|
.trigger("mouseleave");
|
|
175
175
|
});
|
|
176
176
|
|
|
177
|
-
it("Closes edit mode when clicking 'back to
|
|
177
|
+
it("Closes edit mode when clicking 'back to annotation view' button", () => {
|
|
178
178
|
cy.dispatchAction("edit", "enableEditMode");
|
|
179
179
|
|
|
180
180
|
cy.get("#document-top-bar-component")
|
|
@@ -186,14 +186,21 @@ describe("Document Top Bar", () => {
|
|
|
186
186
|
.find(".right-bar-components")
|
|
187
187
|
.find(".edit-mode-buttons")
|
|
188
188
|
.find(".button-cancel")
|
|
189
|
-
.
|
|
189
|
+
.then(($button) => {
|
|
190
|
+
if (!$button.is(':disabled')) {
|
|
191
|
+
cy.wrap($button)
|
|
192
|
+
.click();
|
|
190
193
|
|
|
191
|
-
|
|
194
|
+
cy.wait(1000);
|
|
195
|
+
|
|
196
|
+
cy.get("#document-top-bar-component")
|
|
197
|
+
.find(".right-bar-components")
|
|
198
|
+
.find(".edit-mode-buttons")
|
|
199
|
+
.should("not.exist");
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
});
|
|
192
203
|
|
|
193
|
-
cy.get("#document-top-bar-component")
|
|
194
|
-
.find(".right-bar-components")
|
|
195
|
-
.find(".edit-mode-buttons")
|
|
196
|
-
.should("not.exist");
|
|
197
204
|
});
|
|
198
205
|
|
|
199
206
|
it("Shows rename and categorize section when clicking 'next' button", () => {
|
package/src/store/category.js
CHANGED
|
@@ -21,6 +21,16 @@ const getters = {
|
|
|
21
21
|
return "";
|
|
22
22
|
},
|
|
23
23
|
|
|
24
|
+
categoryConfidence: () => (confidence) => {
|
|
25
|
+
if (!confidence) {
|
|
26
|
+
if (confidence === 0) return confidence.toFixed(2);
|
|
27
|
+
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
return (confidence * 100).toFixed(2);
|
|
32
|
+
},
|
|
33
|
+
|
|
24
34
|
/**
|
|
25
35
|
* Get the category for a given category ID
|
|
26
36
|
*/
|
|
@@ -106,9 +116,9 @@ const actions = {
|
|
|
106
116
|
if (
|
|
107
117
|
poll &&
|
|
108
118
|
rootState.project.documentsInProject.length !==
|
|
109
|
-
|
|
119
|
+
state.documentsAvailableToReview.length &&
|
|
110
120
|
state.documentsAvailableToReview.length + errors !==
|
|
111
|
-
|
|
121
|
+
rootState.project.documentsInProject.length
|
|
112
122
|
) {
|
|
113
123
|
if (count >= 10) return true;
|
|
114
124
|
|
|
@@ -126,7 +136,7 @@ const actions = {
|
|
|
126
136
|
if (
|
|
127
137
|
rootState.project.documentsInProject.length === 0 ||
|
|
128
138
|
rootState.project.documentsInProject.length !==
|
|
129
|
-
|
|
139
|
+
state.documentsAvailableToReview.length
|
|
130
140
|
) {
|
|
131
141
|
let duration;
|
|
132
142
|
if (count <= 5) {
|