graphdb-workbench-tests 2.7.0-TR6 → 2.7.0-TR7

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,15 @@
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 ex:fullName="Dave Beckett">
10
+ <ex:homePage rdf:resource="http://purl.org/net/dajobe/" />
11
+ </rdf:Description>
12
+ </ex:editor>
13
+ </rdf:Description>
14
+
15
+ </rdf:RDF>
@@ -927,14 +927,15 @@
927
927
  "show.files.only": "Show files only",
928
928
  "show.files.directories": "Show both files and directories",
929
929
  "show.directories.only": "Show directories only",
930
- "type.to.filter": "Type to filter",
930
+ "type.to.filter": "Type to filter by name",
931
931
  "selected.items": "Import the selected items",
932
932
  "without.changing.settings": "Import without changing settings",
933
933
  "reset.last.imported": "Reset the last imported status of the selected items",
934
934
  "reset.status": "Reset status",
935
935
  "remove.selected": "Remove the selected items from the list",
936
936
  "remove.btn": "Remove",
937
- "remove.confirm.msg": "Are you sure you want to remove selected files: '{{name}}'?",
937
+ "import.btn": "Import",
938
+ "remove.confirm.msg": "Are you sure you want to remove selected files: {{name}}",
938
939
  "mode.not.supported.constraint": "This mode is not supported when importing multiple items.",
939
940
  "enable.replace.option": "Enable this to replace the data in one or more graphs with the imported data.",
940
941
  "context.link": "JSON-LD context",
@@ -979,7 +980,7 @@
979
980
  "the_property": "property"
980
981
  },
981
982
  "on_file_size_limit": {
982
- "file_size_limit_info": "To import larger than {{fileSizeLimit}} MB, use the ",
983
+ "file_size_limit_info": "To import larger than {{fileSizeLimit}} MB files, use the ",
983
984
  "server_files_link": "Server files",
984
985
  "import_or_use": "import or use the",
985
986
  "api_link": "API"
@@ -1003,7 +1004,8 @@
1003
1004
  "interrupt_import": "Interrupt import",
1004
1005
  "abort": "Abort"
1005
1006
  }
1006
- },"status-info": {
1007
+ },
1008
+ "status-info": {
1007
1009
  "last_import_settings": "Last import settings",
1008
1010
  "context": "Context",
1009
1011
  "replaced_graphs": "Replaced graphs",
@@ -1,107 +1,78 @@
1
- import ImportSteps from "../../steps/import/import-steps";
1
+ import {ImportUserDataSteps} from "../../steps/import/import-user-data-steps";
2
+ import {ImportServerFilesSteps} from "../../steps/import/import-server-files-steps";
2
3
 
3
- // the suite will be fixed with the next MR
4
- describe.skip('Import server files', () => {
4
+ describe('Import server files', () => {
5
5
 
6
6
  let repositoryId;
7
7
 
8
- const BASE_URI = 'http://purl.org/dc/elements/1.1/';
9
- const CONTEXT = 'http://example.org/context';
10
- const SUCCESS_MESSAGE = 'Imported successfully';
11
- const FILE_FOR_IMPORT = 'italian_public_schools_links.nt.gz';
12
- const TTLS_FOR_IMPORT = 'test_turtlestar.ttls';
13
- const TRIGS_FOR_IMPORT = 'test-trigstar.trigs';
14
8
  const JSONLD_FILE_FOR_IMPORT = '0007-import-file.jsonld';
15
- const JSONLD_CONTEXT = 'https://w3c.github.io/json-ld-api/tests/compact/0007-context.jsonld';
16
9
 
17
10
  beforeEach(() => {
18
11
  repositoryId = 'server-import-' + Date.now();
19
12
  cy.createRepository({id: repositoryId});
20
- ImportSteps.visitServerImport(repositoryId);
13
+ ImportServerFilesSteps.visitServerImport(repositoryId);
14
+ ImportServerFilesSteps.getResources().should('have.length', 14);
21
15
  });
22
16
 
23
17
  afterEach(() => {
24
18
  cy.deleteRepository(repositoryId);
25
19
  });
26
20
 
27
- it('Test import Server files successfully without changing settings', () => {
28
- ImportSteps.selectServerFile(FILE_FOR_IMPORT);
29
- ImportSteps.importServerFiles();
30
- ImportSteps.verifyImportStatus(FILE_FOR_IMPORT, SUCCESS_MESSAGE);
31
- ImportSteps.verifyImportStatusDetails(FILE_FOR_IMPORT, '"preserveBNodeIds": false,');
21
+ it('Should be able to open the server files tab through a click on the tab', () => {
22
+ // Given I have visited the import page
23
+ ImportUserDataSteps.visit();
24
+ ImportUserDataSteps.getActiveTab().should('have.text', 'User data');
25
+ // When I switch to the server files tab
26
+ ImportUserDataSteps.openServerFilesTab();
27
+ // Then Server files tab should be active
28
+ cy.url().should('include', '/import#server');
29
+ ImportServerFilesSteps.getActiveTab().should('have.text', 'Server files');
30
+ ImportServerFilesSteps.getResourcesTable().should('be.visible');
32
31
  });
33
32
 
34
- it('Test import Server files successfully with changing settings', () => {
35
- ImportSteps.selectServerFile(FILE_FOR_IMPORT);
36
- ImportSteps.importServerFiles(true);
37
- ImportSteps.expandAdvancedSettings();
38
- ImportSteps.fillBaseURI(BASE_URI);
39
- ImportSteps.selectNamedGraph();
40
- ImportSteps.fillNamedGraph(CONTEXT);
41
- ImportSteps.enablePreserveBNodes();
42
- ImportSteps.importFromSettingsDialog();
43
- ImportSteps.verifyImportStatus(FILE_FOR_IMPORT, SUCCESS_MESSAGE);
44
- ImportSteps.verifyImportStatusDetails(FILE_FOR_IMPORT, [CONTEXT, BASE_URI, '"preserveBNodeIds": true,']);
33
+ it('Should be able to open the server files tab through a link', () => {
34
+ // When I visit the import page through a direct link to the server files tab
35
+ cy.visit('/import#server');
36
+ // Then Server files tab should be active
37
+ cy.url().should('include', '/import#server');
38
+ ImportServerFilesSteps.getActiveTab().should('have.text', 'Server files');
39
+ ImportServerFilesSteps.getResourcesTable().should('be.visible');
45
40
  });
46
41
 
47
- // for this test it is necessary to set up a whitelist to GraphDB in this way: -Dgraphdb.jsonld.whitelist=https://w3c.github.io/json-ld-api/tests/*
48
- it('Test import Server files successfully with JSONLD context link settings', () => {
49
- ImportSteps.selectServerFile(JSONLD_FILE_FOR_IMPORT);
50
- ImportSteps.importServerFiles(true);
51
- ImportSteps.expandAdvancedSettings();
52
- ImportSteps.fillBaseURI(BASE_URI);
53
- ImportSteps.fillContextLink(JSONLD_CONTEXT);
54
- ImportSteps.selectNamedGraph();
55
- ImportSteps.fillNamedGraph(CONTEXT);
56
- ImportSteps.enablePreserveBNodes();
57
- ImportSteps.importFromSettingsDialog();
58
- ImportSteps.verifyImportStatus(JSONLD_FILE_FOR_IMPORT, SUCCESS_MESSAGE);
59
- ImportSteps.verifyImportStatusDetails(JSONLD_FILE_FOR_IMPORT, [CONTEXT, BASE_URI, '"preserveBNodeIds": true,', JSONLD_CONTEXT]);
42
+ it('Should be able to toggle the server file import help', () => {
43
+ // When the page is loaded
44
+ // Then I should see the server files import help
45
+ ImportServerFilesSteps.getHelpMessage().should('be.visible');
46
+ // When I close the help
47
+ ImportServerFilesSteps.closeHelpMessage();
48
+ // Then the help should disappear
49
+ ImportServerFilesSteps.getHelpMessage().should('not.exist');
60
50
  });
61
51
 
62
- it('Test import Server files successfully with JSONLD default settings', () => {
63
- ImportSteps.selectServerFile(JSONLD_FILE_FOR_IMPORT);
64
- ImportSteps.importServerFiles(true);
65
- ImportSteps.expandAdvancedSettings();
66
- ImportSteps.fillBaseURI(BASE_URI);
67
- ImportSteps.selectNamedGraph();
68
- ImportSteps.fillNamedGraph(CONTEXT);
69
- ImportSteps.setContextLinkToBeVisible();
70
- ImportSteps.enablePreserveBNodes();
71
- ImportSteps.importFromSettingsDialog();
72
- ImportSteps.verifyImportStatus(JSONLD_FILE_FOR_IMPORT, SUCCESS_MESSAGE);
73
- ImportSteps.verifyImportStatusDetails(JSONLD_FILE_FOR_IMPORT, [CONTEXT, BASE_URI, '"preserveBNodeIds": true,']);
52
+ it('Should be able to filter the files', () => {
53
+ // When the server files tab is loaded
54
+ // Then I should see all the files
55
+ ImportServerFilesSteps.getResources().should('have.length', 14);
56
+ // When I type in the filter filed
57
+ ImportServerFilesSteps.typeInFilterField('007');
58
+ // Then I should see only the files matching the filter
59
+ ImportServerFilesSteps.getResources().should('have.length', 1);
60
+ ImportServerFilesSteps.getResourceByName(JSONLD_FILE_FOR_IMPORT).should('be.visible');
74
61
  });
75
62
 
76
- it('Test import Server file successfully with JSONLD, button on row, with settings', () => {
77
- ImportSteps.clickImportOnRow(0);
78
- ImportSteps.expandAdvancedSettings();
79
- ImportSteps.fillBaseURI(BASE_URI);
80
- ImportSteps.fillContextLink(JSONLD_CONTEXT);
81
- ImportSteps.importFromSettingsDialog();
82
- ImportSteps.verifyImportStatus(JSONLD_FILE_FOR_IMPORT, SUCCESS_MESSAGE);
83
- ImportSteps.verifyImportStatusDetails(JSONLD_FILE_FOR_IMPORT, [BASE_URI, '"preserveBNodeIds": false,', JSONLD_CONTEXT]);
84
- });
85
-
86
- it('Test import with resetting status of imported file', () => {
87
- ImportSteps.selectServerFile(FILE_FOR_IMPORT);
88
- ImportSteps.importServerFiles();
89
- ImportSteps.verifyImportStatus(FILE_FOR_IMPORT, SUCCESS_MESSAGE);
90
- ImportSteps.resetStatusOfUploadedFile(FILE_FOR_IMPORT);
91
- ImportSteps.verifyNoImportStatus(FILE_FOR_IMPORT);
92
- });
93
-
94
- it('Test import turtlestar from Server files successfully without changing settings', () => {
95
- ImportSteps.selectServerFile(TTLS_FOR_IMPORT);
96
- ImportSteps.importServerFiles();
97
- ImportSteps.verifyImportStatus(TTLS_FOR_IMPORT, SUCCESS_MESSAGE);
98
- ImportSteps.verifyImportStatusDetails(TTLS_FOR_IMPORT, '"preserveBNodeIds": false,');
99
- });
100
-
101
- it('Test import trigstar from Server files successfully without changing settings', () => {
102
- ImportSteps.selectServerFile(TRIGS_FOR_IMPORT);
103
- ImportSteps.importServerFiles();
104
- ImportSteps.verifyImportStatus(TRIGS_FOR_IMPORT, SUCCESS_MESSAGE);
105
- ImportSteps.verifyImportStatusDetails(TRIGS_FOR_IMPORT, '"preserveBNodeIds": false,');
63
+ it('Should be able to switch between files, folders and mixed list', () => {
64
+ // When the server files tab is loaded
65
+ // Then I should see all the files and folders by default
66
+ ImportServerFilesSteps.getShowAllResourceTypesButton().should('have.class', 'active');
67
+ ImportServerFilesSteps.getResources().should('have.length', 14);
68
+ // When I select the folders only filter
69
+ ImportServerFilesSteps.selectFoldersOnlyFilter();
70
+ // Then I should see only the folders
71
+ ImportServerFilesSteps.getShowOnlyFoldersButton().should('have.class', 'active');
72
+ ImportServerFilesSteps.getResources().should('have.length', 1);
73
+ // When I select the files only filter
74
+ ImportServerFilesSteps.selectFilesOnlyFilter();
75
+ // Then I should see only the files
76
+ ImportServerFilesSteps.getResources().should('have.length', 13);
106
77
  });
107
78
  });
@@ -1,7 +1,7 @@
1
- import ImportSteps from "../../steps/import/import-steps";
2
1
  import {ModalDialogSteps} from "../../steps/modal-dialog-steps";
3
2
  import {ImportSettingsDialogSteps} from "../../steps/import/import-settings-dialog-steps";
4
3
  import {MainMenuSteps} from "../../steps/main-menu-steps";
4
+ import {ImportUserDataSteps} from "../../steps/import/import-user-data-steps";
5
5
 
6
6
  const bnodes = `_:node0 <http://purl.org/dc/elements/1.1/title> "A new book" ;
7
7
  \t<http://purl.org/dc/elements/1.1/creator> "A.N.Other" .`;
@@ -27,7 +27,7 @@ describe('Import user data: File upload', () => {
27
27
  repositoryId = 'user-import-' + Date.now();
28
28
  cy.createRepository({id: repositoryId});
29
29
  cy.presetRepository(repositoryId);
30
- ImportSteps.visitImport('user', repositoryId);
30
+ ImportUserDataSteps.visitImport('user', repositoryId);
31
31
  });
32
32
 
33
33
  afterEach(() => {
@@ -37,94 +37,94 @@ describe('Import user data: File upload', () => {
37
37
 
38
38
  it('Should be able to upload and import a single unique file', () => {
39
39
  // Given there are no files uploaded yet
40
- ImportSteps.getUserDataUploadedFilesTable().should('be.hidden');
40
+ ImportUserDataSteps.getResourcesTable().should('be.hidden');
41
41
  // When I start to upload a file
42
- ImportSteps.selectFile(ImportSteps.createFile(testFiles[0], bnodes));
42
+ ImportUserDataSteps.selectFile(ImportUserDataSteps.createFile(testFiles[0], bnodes));
43
43
  // Then the import settings dialog should open automatically
44
44
  ImportSettingsDialogSteps.getDialog().should('be.visible');
45
45
  ImportSettingsDialogSteps.import();
46
46
  ImportSettingsDialogSteps.getDialog().should('not.exist');
47
47
  // Then I should see the uploaded file
48
- ImportSteps.getUserDataUploadedFiles().should('have.length', 1);
49
- ImportSteps.checkUserDataImportedResource(0, 'bnodes.ttl');
48
+ ImportUserDataSteps.getResources().should('have.length', 1);
49
+ ImportUserDataSteps.checkImportedResource(0, 'bnodes.ttl');
50
50
  });
51
51
 
52
52
  it('Should be able to upload and import files one after the other and then override them', () => {
53
53
  // Given there are no files uploaded yet
54
- ImportSteps.getUserDataUploadedFilesTable().should('be.hidden');
54
+ ImportUserDataSteps.getResourcesTable().should('be.hidden');
55
55
  // When I upload a file
56
- ImportSteps.selectFile(ImportSteps.createFile(testFiles[0], bnodes));
56
+ ImportUserDataSteps.selectFile(ImportUserDataSteps.createFile(testFiles[0], bnodes));
57
57
  ImportSettingsDialogSteps.import();
58
58
  // Then I should see the uploaded file
59
- ImportSteps.checkUserDataImportedResource(0, 'bnodes.ttl');
59
+ ImportUserDataSteps.checkImportedResource(0, 'bnodes.ttl');
60
60
  // When I upload another file
61
- ImportSteps.selectFile(ImportSteps.createFile(testFiles[1], jsonld));
61
+ ImportUserDataSteps.selectFile(ImportUserDataSteps.createFile(testFiles[1], jsonld));
62
62
  ImportSettingsDialogSteps.import();
63
63
  // Then I should see the uploaded file - it becomes first in the list
64
- ImportSteps.checkUserDataImportedResource(0, 'jsonld.jsonld');
65
- ImportSteps.checkUserDataImportedResource(1, 'bnodes.ttl');
64
+ ImportUserDataSteps.checkImportedResource(0, 'jsonld.jsonld');
65
+ ImportUserDataSteps.checkImportedResource(1, 'bnodes.ttl');
66
66
  // When I override the first file
67
- ImportSteps.selectFile(ImportSteps.createFile(testFiles[0], bnodes));
67
+ ImportUserDataSteps.selectFile(ImportUserDataSteps.createFile(testFiles[0], bnodes));
68
68
  ModalDialogSteps.clickOnConfirmButton();
69
69
  ImportSettingsDialogSteps.import();
70
70
  // Then I should see the uploaded file - it becomes first in the list
71
71
  // TODO: timestamps currently seems to not be changed on reimport
72
- ImportSteps.checkUserDataImportedResource(0, 'jsonld.jsonld');
73
- ImportSteps.checkUserDataImportedResource(1, 'bnodes.ttl');
72
+ ImportUserDataSteps.checkImportedResource(0, 'jsonld.jsonld');
73
+ ImportUserDataSteps.checkImportedResource(1, 'bnodes.ttl');
74
74
  // When I override the second file
75
- ImportSteps.selectFile(ImportSteps.createFile(testFiles[1], jsonld));
75
+ ImportUserDataSteps.selectFile(ImportUserDataSteps.createFile(testFiles[1], jsonld));
76
76
  ModalDialogSteps.clickOnConfirmButton();
77
77
  ImportSettingsDialogSteps.import();
78
78
  // Then I should see the uploaded file - it becomes first in the list
79
- ImportSteps.checkUserDataImportedResource(0, 'jsonld.jsonld');
80
- ImportSteps.checkUserDataImportedResource(1, 'bnodes.ttl');
79
+ ImportUserDataSteps.checkImportedResource(0, 'jsonld.jsonld');
80
+ ImportUserDataSteps.checkImportedResource(1, 'bnodes.ttl');
81
81
  });
82
82
 
83
83
  it('should be able to only upload a single file without importing it', () => {
84
84
  // Given there are no files uploaded yet
85
- ImportSteps.getUserDataUploadedFilesTable().should('be.hidden');
85
+ ImportUserDataSteps.getResourcesTable().should('be.hidden');
86
86
  // When I start to upload a file
87
- ImportSteps.selectFile(ImportSteps.createFile(testFiles[0], bnodes));
87
+ ImportUserDataSteps.selectFile(ImportUserDataSteps.createFile(testFiles[0], bnodes));
88
88
  // Then the import settings dialog should open automatically
89
89
  ImportSettingsDialogSteps.cancelImport();
90
90
  // Then I should see the uploaded file
91
- ImportSteps.getUserDataUploadedFiles().should('have.length', 1);
92
- ImportSteps.checkUserDataUploadedResource(0, 'bnodes.ttl');
91
+ ImportUserDataSteps.getResources().should('have.length', 1);
92
+ ImportUserDataSteps.checkUserDataUploadedResource(0, 'bnodes.ttl');
93
93
  // And the file should really be there
94
94
  MainMenuSteps.openHomePage();
95
- ImportSteps.visit();
96
- ImportSteps.getUserDataUploadedFiles().should('have.length', 1);
95
+ ImportUserDataSteps.visit();
96
+ ImportUserDataSteps.getResources().should('have.length', 1);
97
97
  });
98
98
 
99
99
  it('Should be able to upload multiple unique files', () => {
100
100
  // Given there are no files uploaded yet
101
- ImportSteps.getUserDataUploadedFilesTable().should('be.hidden');
101
+ ImportUserDataSteps.getResourcesTable().should('be.hidden');
102
102
  // When I upload a file
103
- const file1 = ImportSteps.createFile(testFiles[0], bnodes);
104
- const file2 = ImportSteps.createFile(testFiles[1], jsonld);
105
- ImportSteps.selectFile([file1, file2]);
103
+ const file1 = ImportUserDataSteps.createFile(testFiles[0], bnodes);
104
+ const file2 = ImportUserDataSteps.createFile(testFiles[1], jsonld);
105
+ ImportUserDataSteps.selectFile([file1, file2]);
106
106
  // Then the import settings dialog should open automatically
107
107
  ImportSettingsDialogSteps.import();
108
108
  // Then I should see the uploaded file
109
- ImportSteps.getUserDataUploadedFiles().should('have.length', 2);
110
- ImportSteps.checkUserDataImportedResource(0, 'jsonld.jsonld');
111
- ImportSteps.checkUserDataImportedResource(1, 'bnodes.ttl');
109
+ ImportUserDataSteps.getResources().should('have.length', 2);
110
+ ImportUserDataSteps.checkImportedResource(0, 'jsonld.jsonld');
111
+ ImportUserDataSteps.checkImportedResource(1, 'bnodes.ttl');
112
112
  // And the files should really be there
113
113
  MainMenuSteps.openHomePage();
114
- ImportSteps.visit();
115
- ImportSteps.getUserDataUploadedFiles().should('have.length', 2);
114
+ ImportUserDataSteps.visit();
115
+ ImportUserDataSteps.getResources().should('have.length', 2);
116
116
  });
117
117
 
118
118
  it('Should be able to override a single file', () => {
119
119
  // Given I have uploaded a file
120
- ImportSteps.getUserDataUploadedFilesTable().should('be.hidden');
121
- const file1 = ImportSteps.createFile(testFiles[0], bnodes);
122
- ImportSteps.selectFile(file1);
120
+ ImportUserDataSteps.getResourcesTable().should('be.hidden');
121
+ const file1 = ImportUserDataSteps.createFile(testFiles[0], bnodes);
122
+ ImportUserDataSteps.selectFile(file1);
123
123
  ImportSettingsDialogSteps.import();
124
- ImportSteps.getUserDataUploadedFiles().should('have.length', 1);
125
- ImportSteps.checkUserDataImportedResource(0, 'bnodes.ttl');
124
+ ImportUserDataSteps.getResources().should('have.length', 1);
125
+ ImportUserDataSteps.checkImportedResource(0, 'bnodes.ttl');
126
126
  // When I upload a file with the same name
127
- ImportSteps.selectFile(file1);
127
+ ImportUserDataSteps.selectFile(file1);
128
128
  // Then I should see a file override confirmation dialog
129
129
  ModalDialogSteps.getDialog().should('be.visible');
130
130
  // When I confirm the file override
@@ -132,52 +132,52 @@ describe('Import user data: File upload', () => {
132
132
  // Then the import settings dialog should open automatically
133
133
  ImportSettingsDialogSteps.import();
134
134
  // Then The file should be overridden
135
- ImportSteps.getUserDataUploadedFiles().should('have.length', 1);
136
- ImportSteps.checkUserDataImportedResource(0, 'bnodes.ttl');
135
+ ImportUserDataSteps.getResources().should('have.length', 1);
136
+ ImportUserDataSteps.checkImportedResource(0, 'bnodes.ttl');
137
137
  });
138
138
 
139
139
  it('Should be able to upload file with same name and preserve the existing file', () => {
140
140
  // Given I have uploaded a file
141
- ImportSteps.getUserDataUploadedFilesTable().should('be.hidden');
142
- const file1 = ImportSteps.createFile(testFiles[0], bnodes);
143
- ImportSteps.selectFile(file1);
141
+ ImportUserDataSteps.getResourcesTable().should('be.hidden');
142
+ const file1 = ImportUserDataSteps.createFile(testFiles[0], bnodes);
143
+ ImportUserDataSteps.selectFile(file1);
144
144
  ImportSettingsDialogSteps.import();
145
- ImportSteps.getUserDataUploadedFiles().should('have.length', 1);
146
- ImportSteps.checkUserDataImportedResource(0, 'bnodes.ttl');
145
+ ImportUserDataSteps.getResources().should('have.length', 1);
146
+ ImportUserDataSteps.checkImportedResource(0, 'bnodes.ttl');
147
147
  // When I upload a file with the same name
148
- ImportSteps.selectFile(file1);
148
+ ImportUserDataSteps.selectFile(file1);
149
149
  // Then I should see a file override confirmation dialog
150
150
  ModalDialogSteps.getDialog().should('be.visible');
151
151
  // When I cancel the file override
152
152
  ModalDialogSteps.clickOnCancelButton();
153
153
  ImportSettingsDialogSteps.import();
154
154
  // Then The file should not be overridden but prefixed instead
155
- ImportSteps.getUserDataUploadedFiles().should('have.length', 2);
156
- ImportSteps.checkUserDataImportedResource(0, 'bnodes-0.ttl');
157
- ImportSteps.checkUserDataImportedResource(1, 'bnodes.ttl');
155
+ ImportUserDataSteps.getResources().should('have.length', 2);
156
+ ImportUserDataSteps.checkImportedResource(0, 'bnodes-0.ttl');
157
+ ImportUserDataSteps.checkImportedResource(1, 'bnodes.ttl');
158
158
  // When I upload two files, one with the same name and second new one
159
- const file2 = ImportSteps.createFile(testFiles[1], jsonld);
160
- ImportSteps.selectFile([file1, file2]);
159
+ const file2 = ImportUserDataSteps.createFile(testFiles[1], jsonld);
160
+ ImportUserDataSteps.selectFile([file1, file2]);
161
161
  ModalDialogSteps.getDialog().should('be.visible');
162
162
  ModalDialogSteps.clickOnCancelButton();
163
163
  ImportSettingsDialogSteps.import();
164
164
  // Then The file should not be overridden but prefixed with increased index instead
165
- ImportSteps.getUserDataUploadedFiles().should('have.length', 4);
166
- ImportSteps.checkUserDataImportedResource(0, 'jsonld.jsonld');
167
- ImportSteps.checkUserDataImportedResource(1, 'bnodes-1.ttl');
168
- ImportSteps.checkUserDataImportedResource(2, 'bnodes-0.ttl');
169
- ImportSteps.checkUserDataImportedResource(3, 'bnodes.ttl');
165
+ ImportUserDataSteps.getResources().should('have.length', 4);
166
+ ImportUserDataSteps.checkImportedResource(0, 'jsonld.jsonld');
167
+ ImportUserDataSteps.checkImportedResource(1, 'bnodes-1.ttl');
168
+ ImportUserDataSteps.checkImportedResource(2, 'bnodes-0.ttl');
169
+ ImportUserDataSteps.checkImportedResource(3, 'bnodes.ttl');
170
170
  });
171
171
 
172
172
  it('should see error message when uploaded file has invalid format', () => {
173
173
  // Given I don't have any files uploaded yet
174
174
 
175
175
  // When I upload a file with invalid format
176
- const file1 = ImportSteps.createFile(testFiles[2], jsonld);
177
- ImportSteps.selectFile(file1);
176
+ const file1 = ImportUserDataSteps.createFile(testFiles[2], jsonld);
177
+ ImportUserDataSteps.selectFile(file1);
178
178
  ImportSettingsDialogSteps.import();
179
179
  // Then I should see an error message
180
- ImportSteps.getUserDataUploadedFiles().should('have.length', 1);
181
- ImportSteps.checkUserDataImportedResource(0, 'invalid-format.json', 'RDF Parse Error: Invalid file format');
180
+ ImportUserDataSteps.getResources().should('have.length', 1);
181
+ ImportUserDataSteps.checkImportedResource(0, 'invalid-format.json', 'RDF Parse Error: Invalid file format');
182
182
  });
183
183
  });
@@ -1,5 +1,4 @@
1
- import ImportSteps from "../../steps/import/import-steps";
2
- import {ModalDialogSteps} from "../../steps/modal-dialog-steps";
1
+ import {ImportUserDataSteps} from "../../steps/import/import-user-data-steps";
3
2
 
4
3
  const bnodes = `_:node0 <http://purl.org/dc/elements/1.1/title> "A new book" ;
5
4
  \t<http://purl.org/dc/elements/1.1/creator> "A.N.Other" .`;
@@ -24,7 +23,7 @@ describe('Import user data: Import settings dialog', () => {
24
23
  repositoryId = 'user-import-' + Date.now();
25
24
  cy.createRepository({id: repositoryId});
26
25
  cy.presetRepository(repositoryId);
27
- ImportSteps.visitImport('user', repositoryId);
26
+ ImportUserDataSteps.visitImport('user', repositoryId);
28
27
  });
29
28
 
30
29
  afterEach(() => {