@konfuzio/document-validation-ui 0.1.19-dev.2 → 0.1.19
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/.eslintrc.js +10 -10
- package/.prettierrc.json +1 -1
- package/LICENSE +21 -21
- package/README.md +24 -24
- package/cypress.config.js +13 -13
- package/dist/js/app.js +1 -1
- package/dist/js/app.js.map +1 -1
- package/dist/js/chunk-vendors.js +1 -1
- package/dist/js/chunk-vendors.js.map +1 -1
- package/jest.config.js +4 -4
- package/package.json +66 -66
- package/src/api.js +82 -82
- package/src/assets/images/AcceptedCheckMark.vue +8 -8
- package/src/assets/images/AcceptedUser.vue +8 -8
- package/src/assets/images/ActionIcon.vue +60 -60
- package/src/assets/images/ArrowDownKey.vue +11 -11
- package/src/assets/images/ArrowUpKey.vue +11 -11
- package/src/assets/images/CategoryIconImg.vue +13 -13
- package/src/assets/images/CheckMark.vue +8 -8
- package/src/assets/images/DraggableIcon.vue +14 -14
- package/src/assets/images/EditDocIcon.vue +12 -12
- package/src/assets/images/EmptyStateImg.vue +129 -129
- package/src/assets/images/ErrorIcon.vue +28 -28
- package/src/assets/images/EyeIcon.vue +11 -11
- package/src/assets/images/FileNameNotSavedImage.vue +26 -26
- package/src/assets/images/FileNameSavedImage.vue +14 -14
- package/src/assets/images/FitZoomIcon.vue +16 -16
- package/src/assets/images/GridIcon.vue +16 -16
- package/src/assets/images/KeyboardIcon.vue +16 -16
- package/src/assets/images/MagicWandIcon.vue +16 -16
- package/src/assets/images/MinusIcon.vue +13 -13
- package/src/assets/images/NotFoundIcon.vue +16 -16
- package/src/assets/images/NotOptimizedIllustration.vue +651 -651
- package/src/assets/images/PlusIcon.vue +13 -13
- package/src/assets/images/QuestionMark.vue +12 -12
- package/src/assets/images/ServerImage.vue +73 -73
- package/src/assets/images/SettingsIcon.vue +14 -14
- package/src/assets/images/SplitLines.vue +18 -18
- package/src/assets/images/SplitZigZag.vue +49 -49
- package/src/assets/images/StarIcon.vue +16 -16
- package/src/assets/images/StatusImg.vue +14 -14
- package/src/assets/images/TranslateArrows.vue +33 -33
- package/src/assets/scss/ann_set_table_options.scss +26 -26
- package/src/assets/scss/annotation_details.scss +141 -141
- package/src/assets/scss/choose_label_set_modal.scss +65 -65
- package/src/assets/scss/document_action_bar.scss +37 -37
- package/src/assets/scss/document_annotations.scss +558 -558
- package/src/assets/scss/document_category.scss +85 -85
- package/src/assets/scss/document_dashboard.scss +52 -52
- package/src/assets/scss/document_edit.scss +410 -410
- package/src/assets/scss/document_error.scss +81 -81
- package/src/assets/scss/document_name.scss +60 -60
- package/src/assets/scss/document_page.scss +12 -12
- package/src/assets/scss/document_thumbnails.scss +41 -41
- package/src/assets/scss/document_toolbar.scss +111 -111
- package/src/assets/scss/document_top_bar.scss +171 -171
- package/src/assets/scss/document_viewport_modal.scss +25 -25
- package/src/assets/scss/documents_list.scss +141 -141
- package/src/assets/scss/edit_page_thumbnail.scss +53 -53
- package/src/assets/scss/empty_state.scss +34 -34
- package/src/assets/scss/extracting_data.scss +35 -35
- package/src/assets/scss/imports.scss +1 -1
- package/src/assets/scss/multi_ann_table_overlay.scss +38 -38
- package/src/assets/scss/multi_ann_table_popup.scss +12 -12
- package/src/assets/scss/new_annotation.scss +102 -102
- package/src/assets/scss/scrolling_document.scss +19 -19
- package/src/assets/scss/theme.scss +801 -801
- package/src/assets/scss/variables.scss +66 -66
- package/src/components/App.cy.js +7 -7
- package/src/components/App.vue +187 -187
- package/src/components/DocumentAnnotations/AnnotationActionButtons.vue +152 -152
- package/src/components/DocumentAnnotations/AnnotationContent.vue +210 -210
- package/src/components/DocumentAnnotations/AnnotationDetails.vue +251 -251
- package/src/components/DocumentAnnotations/AnnotationRow.vue +752 -752
- package/src/components/DocumentAnnotations/AnnotationSetActionButtons.vue +89 -89
- package/src/components/DocumentAnnotations/ChooseLabelSetModal.vue +186 -186
- package/src/components/DocumentAnnotations/DocumentAnnotations.cy.js +441 -441
- package/src/components/DocumentAnnotations/DocumentAnnotations.vue +534 -534
- package/src/components/DocumentAnnotations/DocumentLabel.vue +189 -189
- package/src/components/DocumentAnnotations/EmptyAnnotation.vue +193 -193
- package/src/components/DocumentAnnotations/EmptyState.vue +21 -21
- package/src/components/DocumentAnnotations/ExtractingData.vue +41 -41
- package/src/components/DocumentAnnotations/LoadingAnnotations.vue +43 -43
- package/src/components/DocumentAnnotations/LoadingLabels.vue +43 -43
- package/src/components/DocumentAnnotations/MultiAnnotationTableOverlay.vue +338 -338
- package/src/components/DocumentAnnotations/index.js +8 -8
- package/src/components/DocumentCategory.vue +281 -281
- package/src/components/DocumentDashboard.vue +170 -170
- package/src/components/DocumentEdit/DocumentEdit.cy.js +541 -541
- package/src/components/DocumentEdit/DocumentEdit.vue +503 -503
- package/src/components/DocumentEdit/EditConfirmationModal.vue +55 -55
- package/src/components/DocumentEdit/EditPageThumbnail.vue +114 -114
- package/src/components/DocumentEdit/EditPages.vue +161 -161
- package/src/components/DocumentEdit/EditSidebar.vue +154 -154
- package/src/components/DocumentEdit/RenameAndCategorize.vue +184 -184
- package/src/components/DocumentEdit/SidebarButtons.vue +53 -53
- package/src/components/DocumentEdit/SplitInfoBar.vue +21 -21
- package/src/components/DocumentEdit/index.js +4 -4
- package/src/components/DocumentModals/DocumentErrorModal.vue +58 -58
- package/src/components/DocumentModals/NotOptimizedViewportModal.vue +51 -51
- package/src/components/DocumentPage/ActionBar.vue +48 -48
- package/src/components/DocumentPage/AnnSetTableOptions.vue +111 -111
- package/src/components/DocumentPage/BoxSelection.vue +152 -152
- package/src/components/DocumentPage/DocumentPage.cy.js +92 -92
- package/src/components/DocumentPage/DocumentPage.vue +568 -568
- package/src/components/DocumentPage/DocumentToolbar.cy.js +215 -215
- package/src/components/DocumentPage/DocumentToolbar.vue +228 -228
- package/src/components/DocumentPage/DummyPage.vue +55 -55
- package/src/components/DocumentPage/MultiAnnSelection.vue +371 -371
- package/src/components/DocumentPage/NewAnnotation.vue +308 -308
- package/src/components/DocumentPage/ScrollingDocument.vue +149 -149
- package/src/components/DocumentPage/ScrollingPage.vue +179 -179
- package/src/components/DocumentPage/index.js +5 -5
- package/src/components/DocumentThumbnails/DocumentThumbnails.cy.js +67 -67
- package/src/components/DocumentThumbnails/DocumentThumbnails.vue +132 -132
- package/src/components/DocumentThumbnails/LoadingThumbnail.vue +25 -25
- package/src/components/DocumentThumbnails/index.js +1 -1
- package/src/components/DocumentTopBar/DocumentName.vue +236 -236
- package/src/components/DocumentTopBar/DocumentTopBar.cy.js +222 -222
- package/src/components/DocumentTopBar/DocumentTopBar.vue +202 -202
- package/src/components/DocumentTopBar/DocumentTopBarButtons.vue +183 -183
- package/src/components/DocumentTopBar/KeyboardActionsDescription.vue +74 -74
- package/src/components/DocumentTopBar/index.js +3 -3
- package/src/components/DocumentsList/DocumentsList.vue +121 -121
- package/src/components/DocumentsList/index.js +1 -1
- package/src/components/ErrorMessage.vue +40 -40
- package/src/components/index.js +1 -1
- package/src/constants.js +5 -5
- package/src/directives/scroll.js +28 -28
- package/src/i18n.js +22 -22
- package/src/icons.js +45 -45
- package/src/locales/de.json +148 -148
- package/src/locales/en.json +148 -148
- package/src/main.js +26 -26
- package/src/store/category.js +191 -191
- package/src/store/display.js +311 -311
- package/src/store/document.js +1438 -1438
- package/src/store/edit.js +316 -316
- package/src/store/index.js +21 -21
- package/src/store/project.js +143 -143
- package/src/store/selection.js +210 -210
- package/src/utils/utils.js +54 -54
- package/vue.config.js +25 -25
|
@@ -1,223 +1,223 @@
|
|
|
1
|
-
import DocumentTopBar from "./DocumentTopBar";
|
|
2
|
-
|
|
3
|
-
describe("Document Top Bar", () => {
|
|
4
|
-
let currentDocument;
|
|
5
|
-
|
|
6
|
-
beforeEach(() => {
|
|
7
|
-
cy.fetchDocument().then(() => {
|
|
8
|
-
cy.getStore("document")
|
|
9
|
-
.then($document => {
|
|
10
|
-
currentDocument = $document.selectedDocument;
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
cy.getStore("project")
|
|
14
|
-
.then($project => {
|
|
15
|
-
cy.fetchCategories($project.projectId);
|
|
16
|
-
});
|
|
17
|
-
});
|
|
18
|
-
cy.dispatchAction("document", "setPublicView", false);
|
|
19
|
-
cy.dispatchAction("edit", "disableEditMode");
|
|
20
|
-
cy.mount(DocumentTopBar);
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
it("Shows category dropdown if not edit mode or reviewed", () => {
|
|
24
|
-
cy.dispatchAction("edit", "disableEditMode");
|
|
25
|
-
|
|
26
|
-
cy.get("#document-top-bar-component")
|
|
27
|
-
.find(".left-bar-components")
|
|
28
|
-
.find(".category-chooser")
|
|
29
|
-
.should("be.visible");
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
it("Shows correct file name", () => {
|
|
33
|
-
const fileName = currentDocument.data_file_name;
|
|
34
|
-
|
|
35
|
-
cy.get("#document-top-bar-component")
|
|
36
|
-
.find(".center-bar-components")
|
|
37
|
-
.find(".document-name-component")
|
|
38
|
-
.should("be.visible");
|
|
39
|
-
|
|
40
|
-
cy.get("#document-top-bar-component")
|
|
41
|
-
.find(".center-bar-components")
|
|
42
|
-
.find(".document-name-component")
|
|
43
|
-
.find(".document-name")
|
|
44
|
-
.contains(fileName);
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
it("Shows arrows if available documents to navigate to", () => {
|
|
48
|
-
cy.fetchDocumentList();
|
|
49
|
-
const assignee = currentDocument.assignee;
|
|
50
|
-
|
|
51
|
-
cy.getStore("project")
|
|
52
|
-
.then($project => {
|
|
53
|
-
cy.gettersStore().then(($getters) => {
|
|
54
|
-
const filtered = $project.documentsInProject.filter(
|
|
55
|
-
(document) =>
|
|
56
|
-
($getters["document/waitingForSplittingConfirmation"](document) || $getters["document/isDocumentReadyToBeReviewed"](document)
|
|
57
|
-
) && document.assignee === assignee
|
|
58
|
-
);
|
|
59
|
-
|
|
60
|
-
if (filtered.length > 0) {
|
|
61
|
-
cy.get("#document-top-bar-component")
|
|
62
|
-
.find(".center-bar-components")
|
|
63
|
-
.find(".navigation-arrow")
|
|
64
|
-
.should("be.visible");
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
});
|
|
68
|
-
});
|
|
69
|
-
|
|
70
|
-
it("Shows keyboard icon", () => {
|
|
71
|
-
cy.get("#document-top-bar-component")
|
|
72
|
-
.find(".right-bar-components")
|
|
73
|
-
.find(".keyboard-actions-info")
|
|
74
|
-
.should("be.visible");
|
|
75
|
-
});
|
|
76
|
-
|
|
77
|
-
it("Shows disabled finish review button", () => {
|
|
78
|
-
cy.get("#document-top-bar-component")
|
|
79
|
-
.find(".right-bar-components")
|
|
80
|
-
.find(".top-bar-buttons")
|
|
81
|
-
.find(".finish-review-button-container")
|
|
82
|
-
.should("be.visible");
|
|
83
|
-
|
|
84
|
-
cy.get("#document-top-bar-component")
|
|
85
|
-
.find(".right-bar-components")
|
|
86
|
-
.find(".top-bar-buttons")
|
|
87
|
-
.find(".finish-review-button-container")
|
|
88
|
-
.find(".finish-review-btn")
|
|
89
|
-
.should("be.disabled");
|
|
90
|
-
});
|
|
91
|
-
|
|
92
|
-
it("Shows edit mode buttons", () => {
|
|
93
|
-
cy.dispatchAction("edit", "enableEditMode");
|
|
94
|
-
|
|
95
|
-
cy.get("#document-top-bar-component")
|
|
96
|
-
.find(".right-bar-components")
|
|
97
|
-
.find(".top-bar-buttons")
|
|
98
|
-
.find(".finish-review-button-container")
|
|
99
|
-
.should("not.exist");
|
|
100
|
-
|
|
101
|
-
cy.get("#document-top-bar-component")
|
|
102
|
-
.find(".right-bar-components")
|
|
103
|
-
.find(".top-bar-buttons")
|
|
104
|
-
.find(".edit-mode-buttons")
|
|
105
|
-
.should("be.visible");
|
|
106
|
-
});
|
|
107
|
-
|
|
108
|
-
it("Edits file name", () => {
|
|
109
|
-
const newName = "test-name";
|
|
110
|
-
|
|
111
|
-
cy.get("#document-top-bar-component")
|
|
112
|
-
.find(".center-bar-components")
|
|
113
|
-
.find(".document-name-component")
|
|
114
|
-
.find(".edit-btn")
|
|
115
|
-
.click();
|
|
116
|
-
|
|
117
|
-
cy.get("#document-top-bar-component")
|
|
118
|
-
.find(".center-bar-components")
|
|
119
|
-
.find(".document-name-component")
|
|
120
|
-
.find(".document-name")
|
|
121
|
-
.should("have.class", "is-editable");
|
|
122
|
-
|
|
123
|
-
cy.get("#document-top-bar-component")
|
|
124
|
-
.find(".center-bar-components")
|
|
125
|
-
.find(".document-name-component")
|
|
126
|
-
.find(".document-name")
|
|
127
|
-
.type('{selectAll}')
|
|
128
|
-
.type('{backspace}')
|
|
129
|
-
.type(newName);
|
|
130
|
-
|
|
131
|
-
cy.get("#document-top-bar-component")
|
|
132
|
-
.find(".center-bar-components")
|
|
133
|
-
.find(".document-name-component")
|
|
134
|
-
.find(".save-btn")
|
|
135
|
-
.should("be.visible");
|
|
136
|
-
|
|
137
|
-
cy.get("#document-top-bar-component")
|
|
138
|
-
.find(".center-bar-components")
|
|
139
|
-
.find(".document-name-component")
|
|
140
|
-
.find(".save-btn")
|
|
141
|
-
.click();
|
|
142
|
-
|
|
143
|
-
cy.wait(1000);
|
|
144
|
-
|
|
145
|
-
cy.get("#document-top-bar-component")
|
|
146
|
-
.find(".center-bar-components")
|
|
147
|
-
.find(".document-name-component")
|
|
148
|
-
.find(".cloud-icon")
|
|
149
|
-
.should("be.visible");
|
|
150
|
-
|
|
151
|
-
cy.wait(1000);
|
|
152
|
-
|
|
153
|
-
cy.get("#document-top-bar-component")
|
|
154
|
-
.find(".center-bar-components")
|
|
155
|
-
.find(".document-name-component")
|
|
156
|
-
.contains(newName);
|
|
157
|
-
});
|
|
158
|
-
|
|
159
|
-
it("Shows tooltip when hovering over keyboard info", () => {
|
|
160
|
-
cy.get("#document-top-bar-component")
|
|
161
|
-
.find(".right-bar-components")
|
|
162
|
-
.find(".keyboard-actions-info")
|
|
163
|
-
.trigger("mouseenter");
|
|
164
|
-
|
|
165
|
-
cy.get("#document-top-bar-component")
|
|
166
|
-
.find(".right-bar-components")
|
|
167
|
-
.find(".keyboard-actions-info")
|
|
168
|
-
.find(".keyboard-actions-description")
|
|
169
|
-
.should("be.visible");
|
|
170
|
-
|
|
171
|
-
cy.get("#document-top-bar-component")
|
|
172
|
-
.find(".right-bar-components")
|
|
173
|
-
.find(".keyboard-actions-info")
|
|
174
|
-
.trigger("mouseleave");
|
|
175
|
-
});
|
|
176
|
-
|
|
177
|
-
it("Closes edit mode when clicking 'back to annotation view' button", () => {
|
|
178
|
-
cy.dispatchAction("edit", "enableEditMode");
|
|
179
|
-
|
|
180
|
-
cy.get("#document-top-bar-component")
|
|
181
|
-
.find(".right-bar-components")
|
|
182
|
-
.find(".edit-mode-buttons")
|
|
183
|
-
.should("exist");
|
|
184
|
-
|
|
185
|
-
cy.get("#document-top-bar-component")
|
|
186
|
-
.find(".right-bar-components")
|
|
187
|
-
.find(".edit-mode-buttons")
|
|
188
|
-
.find(".button-cancel")
|
|
189
|
-
.then(($button) => {
|
|
190
|
-
if (!$button.is(':disabled')) {
|
|
191
|
-
cy.wrap($button)
|
|
192
|
-
.click();
|
|
193
|
-
|
|
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
|
-
});
|
|
203
|
-
|
|
204
|
-
});
|
|
205
|
-
|
|
206
|
-
it("Shows rename and categorize section when clicking 'next' button", () => {
|
|
207
|
-
cy.dispatchAction("edit", "enableEditMode");
|
|
208
|
-
|
|
209
|
-
cy.get("#document-top-bar-component")
|
|
210
|
-
.find(".right-bar-components")
|
|
211
|
-
.find(".edit-mode-buttons")
|
|
212
|
-
.find(".button-next")
|
|
213
|
-
.click();
|
|
214
|
-
|
|
215
|
-
cy.wait(1000);
|
|
216
|
-
|
|
217
|
-
cy.get("#document-top-bar-component")
|
|
218
|
-
.find(".right-bar-components")
|
|
219
|
-
.find(".edit-mode-buttons")
|
|
220
|
-
.find(".submit-btn")
|
|
221
|
-
.should("be.visible");
|
|
222
|
-
});
|
|
1
|
+
import DocumentTopBar from "./DocumentTopBar";
|
|
2
|
+
|
|
3
|
+
describe("Document Top Bar", () => {
|
|
4
|
+
let currentDocument;
|
|
5
|
+
|
|
6
|
+
beforeEach(() => {
|
|
7
|
+
cy.fetchDocument().then(() => {
|
|
8
|
+
cy.getStore("document")
|
|
9
|
+
.then($document => {
|
|
10
|
+
currentDocument = $document.selectedDocument;
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
cy.getStore("project")
|
|
14
|
+
.then($project => {
|
|
15
|
+
cy.fetchCategories($project.projectId);
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
cy.dispatchAction("document", "setPublicView", false);
|
|
19
|
+
cy.dispatchAction("edit", "disableEditMode");
|
|
20
|
+
cy.mount(DocumentTopBar);
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
it("Shows category dropdown if not edit mode or reviewed", () => {
|
|
24
|
+
cy.dispatchAction("edit", "disableEditMode");
|
|
25
|
+
|
|
26
|
+
cy.get("#document-top-bar-component")
|
|
27
|
+
.find(".left-bar-components")
|
|
28
|
+
.find(".category-chooser")
|
|
29
|
+
.should("be.visible");
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
it("Shows correct file name", () => {
|
|
33
|
+
const fileName = currentDocument.data_file_name;
|
|
34
|
+
|
|
35
|
+
cy.get("#document-top-bar-component")
|
|
36
|
+
.find(".center-bar-components")
|
|
37
|
+
.find(".document-name-component")
|
|
38
|
+
.should("be.visible");
|
|
39
|
+
|
|
40
|
+
cy.get("#document-top-bar-component")
|
|
41
|
+
.find(".center-bar-components")
|
|
42
|
+
.find(".document-name-component")
|
|
43
|
+
.find(".document-name")
|
|
44
|
+
.contains(fileName);
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
it("Shows arrows if available documents to navigate to", () => {
|
|
48
|
+
cy.fetchDocumentList();
|
|
49
|
+
const assignee = currentDocument.assignee;
|
|
50
|
+
|
|
51
|
+
cy.getStore("project")
|
|
52
|
+
.then($project => {
|
|
53
|
+
cy.gettersStore().then(($getters) => {
|
|
54
|
+
const filtered = $project.documentsInProject.filter(
|
|
55
|
+
(document) =>
|
|
56
|
+
($getters["document/waitingForSplittingConfirmation"](document) || $getters["document/isDocumentReadyToBeReviewed"](document)
|
|
57
|
+
) && document.assignee === assignee
|
|
58
|
+
);
|
|
59
|
+
|
|
60
|
+
if (filtered.length > 0) {
|
|
61
|
+
cy.get("#document-top-bar-component")
|
|
62
|
+
.find(".center-bar-components")
|
|
63
|
+
.find(".navigation-arrow")
|
|
64
|
+
.should("be.visible");
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
it("Shows keyboard icon", () => {
|
|
71
|
+
cy.get("#document-top-bar-component")
|
|
72
|
+
.find(".right-bar-components")
|
|
73
|
+
.find(".keyboard-actions-info")
|
|
74
|
+
.should("be.visible");
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
it("Shows disabled finish review button", () => {
|
|
78
|
+
cy.get("#document-top-bar-component")
|
|
79
|
+
.find(".right-bar-components")
|
|
80
|
+
.find(".top-bar-buttons")
|
|
81
|
+
.find(".finish-review-button-container")
|
|
82
|
+
.should("be.visible");
|
|
83
|
+
|
|
84
|
+
cy.get("#document-top-bar-component")
|
|
85
|
+
.find(".right-bar-components")
|
|
86
|
+
.find(".top-bar-buttons")
|
|
87
|
+
.find(".finish-review-button-container")
|
|
88
|
+
.find(".finish-review-btn")
|
|
89
|
+
.should("be.disabled");
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
it("Shows edit mode buttons", () => {
|
|
93
|
+
cy.dispatchAction("edit", "enableEditMode");
|
|
94
|
+
|
|
95
|
+
cy.get("#document-top-bar-component")
|
|
96
|
+
.find(".right-bar-components")
|
|
97
|
+
.find(".top-bar-buttons")
|
|
98
|
+
.find(".finish-review-button-container")
|
|
99
|
+
.should("not.exist");
|
|
100
|
+
|
|
101
|
+
cy.get("#document-top-bar-component")
|
|
102
|
+
.find(".right-bar-components")
|
|
103
|
+
.find(".top-bar-buttons")
|
|
104
|
+
.find(".edit-mode-buttons")
|
|
105
|
+
.should("be.visible");
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
it("Edits file name", () => {
|
|
109
|
+
const newName = "test-name";
|
|
110
|
+
|
|
111
|
+
cy.get("#document-top-bar-component")
|
|
112
|
+
.find(".center-bar-components")
|
|
113
|
+
.find(".document-name-component")
|
|
114
|
+
.find(".edit-btn")
|
|
115
|
+
.click();
|
|
116
|
+
|
|
117
|
+
cy.get("#document-top-bar-component")
|
|
118
|
+
.find(".center-bar-components")
|
|
119
|
+
.find(".document-name-component")
|
|
120
|
+
.find(".document-name")
|
|
121
|
+
.should("have.class", "is-editable");
|
|
122
|
+
|
|
123
|
+
cy.get("#document-top-bar-component")
|
|
124
|
+
.find(".center-bar-components")
|
|
125
|
+
.find(".document-name-component")
|
|
126
|
+
.find(".document-name")
|
|
127
|
+
.type('{selectAll}')
|
|
128
|
+
.type('{backspace}')
|
|
129
|
+
.type(newName);
|
|
130
|
+
|
|
131
|
+
cy.get("#document-top-bar-component")
|
|
132
|
+
.find(".center-bar-components")
|
|
133
|
+
.find(".document-name-component")
|
|
134
|
+
.find(".save-btn")
|
|
135
|
+
.should("be.visible");
|
|
136
|
+
|
|
137
|
+
cy.get("#document-top-bar-component")
|
|
138
|
+
.find(".center-bar-components")
|
|
139
|
+
.find(".document-name-component")
|
|
140
|
+
.find(".save-btn")
|
|
141
|
+
.click();
|
|
142
|
+
|
|
143
|
+
cy.wait(1000);
|
|
144
|
+
|
|
145
|
+
cy.get("#document-top-bar-component")
|
|
146
|
+
.find(".center-bar-components")
|
|
147
|
+
.find(".document-name-component")
|
|
148
|
+
.find(".cloud-icon")
|
|
149
|
+
.should("be.visible");
|
|
150
|
+
|
|
151
|
+
cy.wait(1000);
|
|
152
|
+
|
|
153
|
+
cy.get("#document-top-bar-component")
|
|
154
|
+
.find(".center-bar-components")
|
|
155
|
+
.find(".document-name-component")
|
|
156
|
+
.contains(newName);
|
|
157
|
+
});
|
|
158
|
+
|
|
159
|
+
it("Shows tooltip when hovering over keyboard info", () => {
|
|
160
|
+
cy.get("#document-top-bar-component")
|
|
161
|
+
.find(".right-bar-components")
|
|
162
|
+
.find(".keyboard-actions-info")
|
|
163
|
+
.trigger("mouseenter");
|
|
164
|
+
|
|
165
|
+
cy.get("#document-top-bar-component")
|
|
166
|
+
.find(".right-bar-components")
|
|
167
|
+
.find(".keyboard-actions-info")
|
|
168
|
+
.find(".keyboard-actions-description")
|
|
169
|
+
.should("be.visible");
|
|
170
|
+
|
|
171
|
+
cy.get("#document-top-bar-component")
|
|
172
|
+
.find(".right-bar-components")
|
|
173
|
+
.find(".keyboard-actions-info")
|
|
174
|
+
.trigger("mouseleave");
|
|
175
|
+
});
|
|
176
|
+
|
|
177
|
+
it("Closes edit mode when clicking 'back to annotation view' button", () => {
|
|
178
|
+
cy.dispatchAction("edit", "enableEditMode");
|
|
179
|
+
|
|
180
|
+
cy.get("#document-top-bar-component")
|
|
181
|
+
.find(".right-bar-components")
|
|
182
|
+
.find(".edit-mode-buttons")
|
|
183
|
+
.should("exist");
|
|
184
|
+
|
|
185
|
+
cy.get("#document-top-bar-component")
|
|
186
|
+
.find(".right-bar-components")
|
|
187
|
+
.find(".edit-mode-buttons")
|
|
188
|
+
.find(".button-cancel")
|
|
189
|
+
.then(($button) => {
|
|
190
|
+
if (!$button.is(':disabled')) {
|
|
191
|
+
cy.wrap($button)
|
|
192
|
+
.click();
|
|
193
|
+
|
|
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
|
+
});
|
|
203
|
+
|
|
204
|
+
});
|
|
205
|
+
|
|
206
|
+
it("Shows rename and categorize section when clicking 'next' button", () => {
|
|
207
|
+
cy.dispatchAction("edit", "enableEditMode");
|
|
208
|
+
|
|
209
|
+
cy.get("#document-top-bar-component")
|
|
210
|
+
.find(".right-bar-components")
|
|
211
|
+
.find(".edit-mode-buttons")
|
|
212
|
+
.find(".button-next")
|
|
213
|
+
.click();
|
|
214
|
+
|
|
215
|
+
cy.wait(1000);
|
|
216
|
+
|
|
217
|
+
cy.get("#document-top-bar-component")
|
|
218
|
+
.find(".right-bar-components")
|
|
219
|
+
.find(".edit-mode-buttons")
|
|
220
|
+
.find(".submit-btn")
|
|
221
|
+
.should("be.visible");
|
|
222
|
+
});
|
|
223
223
|
});
|