graphdb-workbench-tests 2.7.0-TR17 → 2.7.0-TR18

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.
@@ -0,0 +1,13 @@
1
+ <?xml version="1.0"?>
2
+ <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
3
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
4
+ xmlns:ex="http://example.org/stuff/1.0/">
5
+
6
+ <rdf:Description rdf:about="http://www.w3.org/TR/rdf-syntax-grammar"
7
+ dc:title="RDF1.1 XML Syntax">
8
+ <ex:looooooooooooooooooooooooooooooooongTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaame>
9
+ </rdf:Description>
10
+ </ex:looooooooooooooooooooooooooooooooongTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaame>
11
+ </rdf:Description>
12
+
13
+ </rdf:RDF>
@@ -1763,14 +1763,6 @@
1763
1763
  "json-ld.frame.link.info": "Specifies JSON-LD frame document as a URL. Only whitelisted URLs can be used.",
1764
1764
  "json-ld.frame.uri.placeholder": "http://example.com/frame.jsonld",
1765
1765
  "json-ld.context.uri.placeholder": "http://example.com/context.jsonld",
1766
- "ndjson-ld.form": "NDJSON-LD form",
1767
- "ndjson-ld.form.info": "Specifies the NDJSON-LD document form",
1768
- "ndjson-ld.context.link": "NDJSON-LD Context",
1769
- "ndjson-ld.context.link.info": "Specifies external NDJSON-LD context as a URL. Only whitelisted URLs can be used.",
1770
- "ndjson-ld.frame.link": "NDJSON-LD Frame",
1771
- "ndjson-ld.frame.link.info": "Specifies NDJSON-LD frame document as a URL. Only whitelisted URLs can be used.",
1772
- "ndjson-ld.frame.uri.placeholder": "http://example.com/frame.ndjsonld",
1773
- "ndjson-ld.context.uri.placeholder": "http://example.com/context.ndjsonld",
1774
1766
  "saved.sparql.queries.label": "Saved SPARQL queries",
1775
1767
  "saved.sparql.queries.tooltip": "Execute a saved SPARQL query directly",
1776
1768
  "common.execute": "Execute",
@@ -1865,6 +1857,19 @@
1865
1857
  "target.label": "Target",
1866
1858
  "show.blank.nodes.label": "Show Blank Nodes",
1867
1859
  "download.as.label": "Download as",
1860
+ "download.as.json": "JSON",
1861
+ "download.as.jsonld": "JSON-LD",
1862
+ "download.as.ndjsonld": "NDJSON-LD",
1863
+ "download.as.rdfxml": "RDF-XML",
1864
+ "download.as.n3": "N3",
1865
+ "download.as.ntriples": "N-Triples",
1866
+ "download.as.nquads": "N-Quads",
1867
+ "download.as.turtle": "Turtle",
1868
+ "download.as.turtlestar": "Turtle*",
1869
+ "download.as.trix": "TriX",
1870
+ "download.as.trig": "TriG",
1871
+ "download.as.trigstar": "TriG*",
1872
+ "download.as.binaryrdf": "Binary RDF",
1868
1873
  "download.as.progress.msg": "Downloading SPARQL result",
1869
1874
  "visual.graph.label": "Visual graph",
1870
1875
  "explore.graph.visually.popover": "Click to explore the graph visually",
@@ -11,18 +11,44 @@ describe('Import server files - Batch operations', () => {
11
11
  repositoryId = 'server-import-' + Date.now();
12
12
  cy.createRepository({id: repositoryId});
13
13
  ImportServerFilesSteps.visitServerImport(repositoryId);
14
- ImportServerFilesSteps.getResources().should('have.length', 17);
14
+ ImportServerFilesSteps.getResources().should('have.length', 18);
15
15
  });
16
16
 
17
17
  afterEach(() => {
18
18
  cy.deleteRepository(repositoryId);
19
19
  });
20
20
 
21
+ it('should batch operation buttons be visible when files/directories are selected', () => {
22
+ // When I select a directory.
23
+ ImportServerFilesSteps.selectFileByName('more-files');
24
+
25
+ // Then I expect the import button be visible
26
+ ImportServerFilesSteps.getBatchImportButton().should('exist');
27
+
28
+ // When I deselect all files and directories
29
+ ImportServerFilesSteps.selectFileByName('more-files');
30
+
31
+ // Then I expect batch import button to not be visible.
32
+ ImportServerFilesSteps.getBatchImportButton().should('not.exist');
33
+
34
+ // When I select a file of some folder
35
+ ImportServerFilesSteps.selectFileByName('rdfxml.rdf');
36
+
37
+ // Then I expect batch import button to not be visible.
38
+ ImportServerFilesSteps.getBatchImportButton().should('exist');
39
+
40
+ // When I deselect a file of some folder
41
+ ImportServerFilesSteps.selectFileByName('rdfxml.rdf');
42
+
43
+ // Then I expect batch import button to not be visible.
44
+ ImportServerFilesSteps.getBatchImportButton().should('not.exist');
45
+ });
46
+
21
47
  it('Should be able to filter server files by status', () => {
22
48
  // When I select All files from the menu
23
49
  ImportServerFilesSteps.selectAllResources();
24
50
  // Then I should see all files selected
25
- ImportServerFilesSteps.getSelectedResources().should('have.length', 17);
51
+ ImportServerFilesSteps.getSelectedResources().should('have.length', 18);
26
52
  // When I select None from the menu
27
53
  ImportServerFilesSteps.deselectAllResources();
28
54
  // Then I should see no files selected
@@ -39,7 +65,7 @@ describe('Import server files - Batch operations', () => {
39
65
  // When I select Not Imported from the menu
40
66
  ImportServerFilesSteps.selectNotImportedResources();
41
67
  // Then I should see only not imported files selected
42
- ImportServerFilesSteps.getSelectedResources().should('have.length', 13);
68
+ ImportServerFilesSteps.getSelectedResources().should('have.length', 17);
43
69
  // Deselect all for the next step
44
70
  ImportServerFilesSteps.deselectAllResources();
45
71
  ImportServerFilesSteps.getSelectedResources().should('have.length', 0);
@@ -1,6 +1,8 @@
1
1
  import {ImportUserDataSteps} from "../../steps/import/import-user-data-steps";
2
2
  import {ImportServerFilesSteps} from "../../steps/import/import-server-files-steps";
3
3
  import {ImportSettingsDialogSteps} from "../../steps/import/import-settings-dialog-steps";
4
+ import {ImportResourceMessageDialog} from "../../steps/import/import-resource-message-dialog";
5
+ import {ApplicationSteps} from "../../steps/application-steps";
4
6
 
5
7
  describe('Import server files', () => {
6
8
 
@@ -12,7 +14,7 @@ describe('Import server files', () => {
12
14
  repositoryId = 'server-import-' + Date.now();
13
15
  cy.createRepository({id: repositoryId});
14
16
  ImportServerFilesSteps.visitServerImport(repositoryId);
15
- ImportServerFilesSteps.getResources().should('have.length', 17);
17
+ ImportServerFilesSteps.getResources().should('have.length', 18);
16
18
  });
17
19
 
18
20
  afterEach(() => {
@@ -64,7 +66,7 @@ describe('Import server files', () => {
64
66
  // When the server files tab is loaded
65
67
  // Then I should see all the files and folders by default
66
68
  ImportServerFilesSteps.getShowAllResourceTypesButton().should('have.class', 'active');
67
- ImportServerFilesSteps.getResources().should('have.length', 17);
69
+ ImportServerFilesSteps.getResources().should('have.length', 18);
68
70
  // When I select the folders only filter
69
71
  ImportServerFilesSteps.selectFoldersOnlyFilter();
70
72
  // Then I should see only the folders
@@ -73,7 +75,7 @@ describe('Import server files', () => {
73
75
  // When I select the files only filter
74
76
  ImportServerFilesSteps.selectFilesOnlyFilter();
75
77
  // Then I should see only the files
76
- ImportServerFilesSteps.getResources().should('have.length', 15);
78
+ ImportServerFilesSteps.getResources().should('have.length', 16);
77
79
  });
78
80
 
79
81
  it('should be able to import the whole directory', () => {
@@ -106,4 +108,38 @@ describe('Import server files', () => {
106
108
  // ImportServerFilesSteps.checkImportedStatusIsEmpty('jsonld-file.jsonld');
107
109
  // ImportServerFilesSteps.checkImportedStatusIsEmpty('rdfxml.rdf');
108
110
  });
111
+
112
+ it('should open error dialog', () => {
113
+ const importResourceName = 'import-resource-with-long-error.rdf';
114
+ // When I visited the server import tab,
115
+ // and try to import a file with wrong data that causes server to generate long error message.
116
+ ImportServerFilesSteps.importResourceByName(importResourceName);
117
+ ImportSettingsDialogSteps.import();
118
+
119
+ // I expect only part of the error be displayed,
120
+ ImportServerFilesSteps.checkImportedResource(0, importResourceName, 'RDF Parse Error: The element type ');
121
+ // and when click on that error
122
+ ImportServerFilesSteps.openErrorDialog(importResourceName);
123
+
124
+ // Then I expect to see dialog,
125
+ ImportSettingsDialogSteps.getDialog().should('be.visible');
126
+
127
+ // with full error message
128
+ ImportResourceMessageDialog.getMessage().should('have.value', 'RDF Parse Error: The element type "ex:looooooooooooooooooooooooooooooooongTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaame" must be terminated by the matching end-tag "</ex:looooooooooooooooooooooooooooooooongTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaame>". [line 9, column 6]');
129
+
130
+ // When I click on corner close button.
131
+ ImportResourceMessageDialog.clickOnCornerCloseButton();
132
+
133
+ // // Then I expect the dialog closed
134
+ ImportResourceMessageDialog.getDialog().should('not.exist');
135
+
136
+ // When error dialog is opened,
137
+ ImportServerFilesSteps.openErrorDialog(importResourceName);
138
+ ImportResourceMessageDialog.getDialog().should('be.visible');
139
+ // and I click one close button
140
+ ImportResourceMessageDialog.clickOnCloseButton();
141
+
142
+ // Then I expect the dialog closed
143
+ ImportResourceMessageDialog.getDialog().should('not.exist');
144
+ });
109
145
  });
@@ -37,7 +37,7 @@ describe('Import view', () => {
37
37
  // When I switch to the server files tab
38
38
  ImportUserDataSteps.openServerFilesTab();
39
39
  // Then I should see the server files only
40
- ImportServerFilesSteps.getResources().should('have.length', 17);
40
+ ImportServerFilesSteps.getResources().should('have.length', 18);
41
41
  // When I switch back to the user data tab
42
42
  ImportServerFilesSteps.openUserDataTab();
43
43
  // Then I should see the uploaded file
@@ -91,7 +91,7 @@ describe('Import view', () => {
91
91
  ImportUserDataSteps.getHelpMessage().should('exist');
92
92
 
93
93
  // When I go to server tab
94
- ImportSteps.openServerFilesTab()
94
+ ImportSteps.openServerFilesTab();
95
95
 
96
96
  // Then help message mustn't be displayed because the resources are not empty.
97
97
  ImportServerFilesSteps.getHelpMessage().should('not.exist');
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "graphdb-workbench-tests",
3
- "version": "2.7.0-TR17",
3
+ "version": "2.7.0-TR18",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "graphdb-workbench-tests",
9
- "version": "2.7.0-TR17",
9
+ "version": "2.7.0-TR18",
10
10
  "license": "Apache-2.0",
11
11
  "devDependencies": {
12
12
  "cypress": "^13.3.1",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "graphdb-workbench-tests",
3
- "version": "2.7.0-TR17",
3
+ "version": "2.7.0-TR18",
4
4
  "description": "Cypress tests for GraphDB workbench",
5
5
  "scripts": {
6
6
  "prepack": "npm shrinkwrap",
@@ -0,0 +1,46 @@
1
+ export class ImportResourceMessageDialog {
2
+
3
+ static getDialog() {
4
+ return cy.get('.import-resource-message-dialog');
5
+ }
6
+
7
+ static getDialogHeader() {
8
+ return ImportResourceMessageDialog.getDialog().find('.modal-header');
9
+ }
10
+
11
+ static getCornerCloseButton() {
12
+ return ImportResourceMessageDialog.getDialogHeader().find('.close');
13
+ }
14
+
15
+ static clickOnCornerCloseButton() {
16
+ ImportResourceMessageDialog.getCornerCloseButton().click();
17
+ }
18
+
19
+ static getDialogBody() {
20
+ return ImportResourceMessageDialog.getDialog().find('.modal-body');
21
+ }
22
+
23
+ static getDialogFooter() {
24
+ return ImportResourceMessageDialog.getDialog().find('.modal-footer');
25
+ }
26
+
27
+ static getCloseButton() {
28
+ return ImportResourceMessageDialog.getDialogFooter().find('.close-btn');
29
+ }
30
+
31
+ static clickOnCloseButton() {
32
+ ImportResourceMessageDialog.getCloseButton().click();
33
+ }
34
+
35
+ static getMessage() {
36
+ return this.getDialogBody().find('.message');
37
+ }
38
+
39
+ static getCopyToClipboard() {
40
+ return ImportResourceMessageDialog.getDialogFooter().find('.copy-to-clipboard-btn')
41
+ }
42
+
43
+ static copyToClipboard() {
44
+ ImportResourceMessageDialog.getCopyToClipboard().click();
45
+ }
46
+ }
@@ -189,6 +189,10 @@ class ImportSteps {
189
189
  return this.getResourceByName(name).next().find('import-resource-message');
190
190
  }
191
191
 
192
+ static openErrorDialog(name) {
193
+ this.getResourceStatus(name).find('.error-message .btn').click();
194
+ }
195
+
192
196
  static getImportedResourcesStates() {
193
197
  return this.getResources().find('.import-resource-message');
194
198
  }