graphdb-workbench-tests 2.7.0-TR16 → 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,8 @@
1
+ {
2
+ "@context": {
3
+ "ab": "http://learningsparql.com/ns/addressbook#"
4
+ },
5
+ "@id": "ab:richard",
6
+ "ab:homeTel": "(229)276-5135",
7
+ "ab:email": "richard491@hotmail.com"
8
+ }
@@ -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:editor>
9
+ </rdf:Description>
10
+ </ex:editor>
11
+ </rdf:Description>
12
+
13
+ </rdf:RDF>
@@ -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>
@@ -1011,9 +1011,9 @@
1011
1011
  },
1012
1012
  "on_file_size_limit": {
1013
1013
  "file_import_options_info_1": "Explore other file import options - ",
1014
- "file_import_options_info_2": "import (opens Server files tab) or ",
1014
+ "file_import_options_info_2": "import and the ",
1015
1015
  "server_files_link": "Server files",
1016
- "api_link": "API"
1016
+ "api_link": "GraphDB REST API."
1017
1017
  }
1018
1018
  },
1019
1019
  "import_resource_tree": {
@@ -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,24 +11,50 @@ 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', 14);
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', 14);
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
29
55
  ImportServerFilesSteps.getSelectedResources().should('have.length', 0);
30
56
  // precondition for the next step
31
- ImportServerFilesSteps.importFileByName(FILE_FOR_IMPORT);
57
+ ImportServerFilesSteps.importResourceByName(FILE_FOR_IMPORT);
32
58
  ImportSettingsDialogSteps.import();
33
59
  ImportServerFilesSteps.checkImportedResource(0, FILE_FOR_IMPORT);
34
60
  // When I select Imported from the menu
@@ -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,5 +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
+ 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";
3
6
 
4
7
  describe('Import server files', () => {
5
8
 
@@ -11,7 +14,7 @@ describe('Import server files', () => {
11
14
  repositoryId = 'server-import-' + Date.now();
12
15
  cy.createRepository({id: repositoryId});
13
16
  ImportServerFilesSteps.visitServerImport(repositoryId);
14
- ImportServerFilesSteps.getResources().should('have.length', 14);
17
+ ImportServerFilesSteps.getResources().should('have.length', 18);
15
18
  });
16
19
 
17
20
  afterEach(() => {
@@ -52,7 +55,6 @@ describe('Import server files', () => {
52
55
  it('Should be able to filter the files', () => {
53
56
  // When the server files tab is loaded
54
57
  // Then I should see all the files
55
- ImportServerFilesSteps.getResources().should('have.length', 14);
56
58
  // When I type in the filter filed
57
59
  ImportServerFilesSteps.typeInFilterField('007');
58
60
  // Then I should see only the files matching the filter
@@ -64,15 +66,80 @@ 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', 14);
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
71
73
  ImportServerFilesSteps.getShowOnlyFoldersButton().should('have.class', 'active');
72
- ImportServerFilesSteps.getResources().should('have.length', 1);
74
+ ImportServerFilesSteps.getResources().should('have.length', 2);
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', 13);
78
+ ImportServerFilesSteps.getResources().should('have.length', 16);
79
+ });
80
+
81
+ it('should be able to import the whole directory', () => {
82
+ // When the server files tab is loaded
83
+ // When I try to import a directory that contains resources with correct rdf data.
84
+ ImportServerFilesSteps.importResourceByName('more-files');
85
+ ImportSettingsDialogSteps.import();
86
+
87
+ // Then I expect all files to be successfully imported.
88
+ ImportServerFilesSteps.checkImportedResource(0, 'more-files', 'Imported successfully in');
89
+ ImportServerFilesSteps.checkImportedResource(1, 'jsonld-file.jsonld', 'Imported successfully in');
90
+ ImportServerFilesSteps.checkImportedResource(2, 'rdfxml.rdf', 'Imported successfully in');
91
+
92
+ // When I try to import a directory that contains resources with incorrect rdf data.
93
+ ImportServerFilesSteps.importResourceByName('more-files-with-error');
94
+ ImportSettingsDialogSteps.import();
95
+ // Then I expect no one file be imported.
96
+ ImportServerFilesSteps.checkImportedResource(0, 'more-files-with-error', 'RDF Parse Error: The element type "ex:editor" must be terminated by the matching end-ta');
97
+ ImportServerFilesSteps.checkImportedStatusIsEmpty('import-resource-with-correct-data.jsonld');
98
+ ImportServerFilesSteps.checkImportedStatusIsEmpty('import-resource-with-incorrect-data.rdf');
99
+
100
+ // When I click on a directory reset status button
101
+ ImportServerFilesSteps.resetResourceStatusByName('more-files');
102
+
103
+ // Then I expect all sub-resource statuses to be reset.
104
+ ImportServerFilesSteps.checkImportedStatusIsEmpty('more-files');
105
+ // TODO: When the status of a given folder is reset, all sub-folder/file statuses should be reset. This works correctly
106
+ // when the scenario is executed manually or if the test is run locally. For some reason, in the Jenkins environment, the status is cleared
107
+ // only for the folder. The next two lines are correct but are commented out to be tried again later.
108
+ // ImportServerFilesSteps.checkImportedStatusIsEmpty('jsonld-file.jsonld');
109
+ // ImportServerFilesSteps.checkImportedStatusIsEmpty('rdfxml.rdf');
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');
77
144
  });
78
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', 14);
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');
@@ -28,7 +28,7 @@ describe('Import server files - Operations', {retries: {runMode: 2}}, () => {
28
28
  it('Should import Server files successfully without changing settings', () => {
29
29
  // Given I have opened the server files tab
30
30
  // When I select to import a file
31
- ImportServerFilesSteps.importFileByName(FILE_FOR_IMPORT);
31
+ ImportServerFilesSteps.importResourceByName(FILE_FOR_IMPORT);
32
32
  ImportSettingsDialogSteps.import();
33
33
  // Then I should see the file imported successfully
34
34
  ImportServerFilesSteps.checkImportedResource(0, FILE_FOR_IMPORT);
@@ -39,7 +39,7 @@ describe('Import server files - Operations', {retries: {runMode: 2}}, () => {
39
39
  it('Should import files from directory successfully without changing settings', () => {
40
40
  // Given I have opened the server files tab
41
41
  // When I select to import a file
42
- ImportServerFilesSteps.importFileByName(FILE_FROM_DIRECTORY_FOR_IMPORT);
42
+ ImportServerFilesSteps.importResourceByName(FILE_FROM_DIRECTORY_FOR_IMPORT);
43
43
  ImportSettingsDialogSteps.import();
44
44
  // Then I should see the file imported successfully
45
45
  ImportServerFilesSteps.checkImportedResource(0, FILE_FROM_DIRECTORY_FOR_IMPORT);
@@ -48,7 +48,7 @@ describe('Import server files - Operations', {retries: {runMode: 2}}, () => {
48
48
  it('Should import Server files successfully with changing settings', () => {
49
49
  // Given I have opened the server files tab
50
50
  // When I select to import a file
51
- ImportServerFilesSteps.importFileByName(FILE_FOR_IMPORT);
51
+ ImportServerFilesSteps.importResourceByName(FILE_FOR_IMPORT);
52
52
  // And I change the settings
53
53
  ImportSettingsDialogSteps.expandAdvancedSettings();
54
54
  ImportSettingsDialogSteps.fillBaseURI(BASE_URI);
@@ -65,7 +65,7 @@ describe('Import server files - Operations', {retries: {runMode: 2}}, () => {
65
65
  it('Should import Server files successfully with JSONLD context link settings', () => {
66
66
  // Given I have opened the server files tab
67
67
  // When I select to import a file
68
- ImportServerFilesSteps.importFileByName(JSONLD_FILE_FOR_IMPORT);
68
+ ImportServerFilesSteps.importResourceByName(JSONLD_FILE_FOR_IMPORT);
69
69
  // And I change the settings
70
70
  ImportSettingsDialogSteps.expandAdvancedSettings();
71
71
  ImportSettingsDialogSteps.fillBaseURI(BASE_URI);
@@ -82,7 +82,7 @@ describe('Import server files - Operations', {retries: {runMode: 2}}, () => {
82
82
  it('Should import Server files successfully with JSONLD default settings', () => {
83
83
  // Given I have opened the server files tab
84
84
  // When I select to import a file
85
- ImportServerFilesSteps.importFileByName(JSONLD_FILE_FOR_IMPORT);
85
+ ImportServerFilesSteps.importResourceByName(JSONLD_FILE_FOR_IMPORT);
86
86
  // And I change the settings
87
87
  ImportSettingsDialogSteps.expandAdvancedSettings();
88
88
  ImportSettingsDialogSteps.fillBaseURI(BASE_URI);
@@ -99,11 +99,11 @@ describe('Import server files - Operations', {retries: {runMode: 2}}, () => {
99
99
  it('Should be able to reset status of imported file', () => {
100
100
  // Given I have opened the server files tab
101
101
  // And I have imported a file
102
- ImportServerFilesSteps.importFileByName(FILE_FOR_IMPORT);
102
+ ImportServerFilesSteps.importResourceByName(FILE_FOR_IMPORT);
103
103
  ImportSettingsDialogSteps.import();
104
104
  ImportServerFilesSteps.checkImportedResource(0, FILE_FOR_IMPORT);
105
105
  // When I reset the status of the imported file
106
- ImportServerFilesSteps.resetFileStatusByName(FILE_FOR_IMPORT);
106
+ ImportServerFilesSteps.resetResourceStatusByName(FILE_FOR_IMPORT);
107
107
  // Then Import status of the file should not be visible
108
108
  ImportServerFilesSteps.getResourceStatus(FILE_FOR_IMPORT).should('be.hidden');
109
109
  });
@@ -111,18 +111,18 @@ describe('Import server files - Operations', {retries: {runMode: 2}}, () => {
111
111
  it('Should be able to reset status of imported file from a directory', () => {
112
112
  // Given I have opened the server files tab
113
113
  // And I have imported a file
114
- ImportServerFilesSteps.importFileByName(FILE_FROM_DIRECTORY_FOR_IMPORT);
114
+ ImportServerFilesSteps.importResourceByName(FILE_FROM_DIRECTORY_FOR_IMPORT);
115
115
  ImportSettingsDialogSteps.import();
116
116
  ImportServerFilesSteps.checkImportedResource(0, FILE_FROM_DIRECTORY_FOR_IMPORT);
117
117
  // When I reset the status of the imported file
118
- ImportServerFilesSteps.resetFileStatusByName(FILE_FROM_DIRECTORY_FOR_IMPORT);
118
+ ImportServerFilesSteps.resetResourceStatusByName(FILE_FROM_DIRECTORY_FOR_IMPORT);
119
119
  // Then Import status of the file should not be visible
120
120
  ImportServerFilesSteps.getResourceStatus(FILE_FROM_DIRECTORY_FOR_IMPORT).should('be.hidden');
121
121
  });
122
122
 
123
123
  it('Should import turtlestar from Server files successfully without changing settings', () => {
124
124
  // Given I have opened the server files tab
125
- ImportServerFilesSteps.importFileByName(TTLS_FOR_IMPORT);
125
+ ImportServerFilesSteps.importResourceByName(TTLS_FOR_IMPORT);
126
126
  // When I select to import a ttl file without changing settings
127
127
  ImportSettingsDialogSteps.import();
128
128
  // Then I should see the file imported successfully
@@ -132,7 +132,7 @@ describe('Import server files - Operations', {retries: {runMode: 2}}, () => {
132
132
 
133
133
  it('Should import trigstar from Server files successfully without changing settings', () => {
134
134
  // Given I have opened the server files tab
135
- ImportServerFilesSteps.importFileByName(TRIGS_FOR_IMPORT);
135
+ ImportServerFilesSteps.importResourceByName(TRIGS_FOR_IMPORT);
136
136
  // When I select to import a trigstar file without changing settings
137
137
  ImportSettingsDialogSteps.import();
138
138
  // Then I should see the file imported successfully
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "graphdb-workbench-tests",
3
- "version": "2.7.0-TR16",
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-TR16",
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-TR16",
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,16 +189,25 @@ 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
  }
195
199
 
196
200
  static checkImportedResource(index, resourceName, expectedStatus) {
201
+ if (expectedStatus === undefined) {}
197
202
  const status = expectedStatus || 'Imported successfully';
198
203
  this.getResourceByName(resourceName).should('contain', resourceName);
199
204
  this.getResourceStatus(resourceName).should('contain', status);
200
205
  }
201
206
 
207
+ static checkImportedStatusIsEmpty(resourceName) {
208
+ this.getResourceStatus(resourceName).find('.import-resource-message').children().should('have.length', 0);
209
+ }
210
+
202
211
  static checkUserDataUploadedResource(index, resourceName) {
203
212
  // this.getResource(index).should('contain', resourceName);
204
213
  this.getResourceByName(resourceName).should('contain', resourceName);
@@ -266,7 +275,7 @@ class ImportSteps {
266
275
  this.getResource(index).find('.import-resource-action-import-btn').click();
267
276
  }
268
277
 
269
- static importFileByName(name) {
278
+ static importResourceByName(name) {
270
279
  this.getResourceByName(name).find('.import-resource-action-import-btn').click();
271
280
  }
272
281
 
@@ -274,7 +283,7 @@ class ImportSteps {
274
283
  this.getResource(index).find('.import-resource-action-reset-btn').click();
275
284
  }
276
285
 
277
- static resetFileStatusByName(name) {
286
+ static resetResourceStatusByName(name) {
278
287
  this.getResourceByName(name).find('.import-resource-action-reset-btn').click();
279
288
  }
280
289