graphdb-workbench-tests 2.4.1-TR1 → 2.4.1-TR3
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/Dockerfile
CHANGED
|
@@ -2,6 +2,8 @@ import HomeSteps from "../../steps/home-steps";
|
|
|
2
2
|
import ImportSteps from "../../steps/import-steps";
|
|
3
3
|
import {RepositorySteps} from "../../steps/repository-steps";
|
|
4
4
|
import {ToasterSteps} from "../../steps/toaster-steps";
|
|
5
|
+
import {GlobalOperationsStatusesStub} from "../../stubs/global-operations-statuses-stub";
|
|
6
|
+
import {ModalDialogSteps} from "../../steps/modal-dialog-steps";
|
|
5
7
|
|
|
6
8
|
describe('Repositories', () => {
|
|
7
9
|
|
|
@@ -449,6 +451,35 @@ describe('Repositories', () => {
|
|
|
449
451
|
.verifyImportStatus('Text snippet', 'org.eclipse.rdf4j.sail.shacl.GraphDBShaclSailValidationException: Failed SHACL validation');
|
|
450
452
|
});
|
|
451
453
|
|
|
454
|
+
it('should not allow editing of repository name if repository is in cluster', () => {
|
|
455
|
+
// When I create a repository,
|
|
456
|
+
cy.createRepository({id: repositoryId});
|
|
457
|
+
// set the repository be in a cluster.
|
|
458
|
+
GlobalOperationsStatusesStub.stubGlobalOperationsStatusesResponse(repositoryId);
|
|
459
|
+
// and go to the edit repository page.
|
|
460
|
+
RepositorySteps.visitEditPage(repositoryId);
|
|
461
|
+
|
|
462
|
+
// When I try to edit the repository id.
|
|
463
|
+
RepositorySteps.editRepositoryId();
|
|
464
|
+
|
|
465
|
+
// Then I expect the repository name can't be edited.
|
|
466
|
+
ModalDialogSteps.getDialog().should('not.exist');
|
|
467
|
+
RepositorySteps.getRepositoryIdEditElement().should('have.css', 'cursor').and('match', /not-allowed/);
|
|
468
|
+
});
|
|
469
|
+
|
|
470
|
+
it('should allow editing of repository name if repository is not in cluster', () => {
|
|
471
|
+
// When I create a repository,
|
|
472
|
+
cy.createRepository({id: repositoryId});
|
|
473
|
+
// and go to edit the repository page.
|
|
474
|
+
RepositorySteps.visitEditPage(repositoryId);
|
|
475
|
+
|
|
476
|
+
// When I try to edit the repository id.
|
|
477
|
+
RepositorySteps.editRepositoryId();
|
|
478
|
+
|
|
479
|
+
// Then I expect to see a confirmation dialog.
|
|
480
|
+
ModalDialogSteps.verifyDialogBody('Changing the repository ID is a dangerous operation since it renames the repository folder and enforces repository shutdown.');
|
|
481
|
+
});
|
|
482
|
+
|
|
452
483
|
function assertRepositoryStatus(repositoryId, status) {
|
|
453
484
|
cy.waitUntil(() =>
|
|
454
485
|
RepositorySteps.getRepositoryFromList(repositoryId)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "graphdb-workbench-tests",
|
|
3
|
-
"version": "2.4.1-
|
|
3
|
+
"version": "2.4.1-TR3",
|
|
4
4
|
"description": "Cypress tests for GraphDB workbench",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"start": "cypress open",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"url": "git+https://github.com/Ontotext-AD/graphdb-workbench.git"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"cypress": "^
|
|
26
|
+
"cypress": "^13.3.1",
|
|
27
27
|
"cypress-failed-log": "^2.10.0",
|
|
28
28
|
"cypress-localstorage-commands": "^1.4.4",
|
|
29
29
|
"cypress-terminal-report": "^5.2.0",
|
|
@@ -12,6 +12,10 @@ export class RepositorySteps {
|
|
|
12
12
|
RepositorySteps.waitUntilRepositoriesPageIsLoaded();
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
+
static visitEditPage(repositoryId) {
|
|
16
|
+
cy.visit(`repository/edit/${repositoryId}?location=`);
|
|
17
|
+
}
|
|
18
|
+
|
|
15
19
|
static getCreateRepositoryButton() {
|
|
16
20
|
return cy.get('#wb-repositories-addRepositoryLink');
|
|
17
21
|
}
|
|
@@ -109,6 +113,14 @@ export class RepositorySteps {
|
|
|
109
113
|
return RepositorySteps.getRepositoryCreateForm().find('#title');
|
|
110
114
|
}
|
|
111
115
|
|
|
116
|
+
static getRepositoryIdEditElement() {
|
|
117
|
+
return cy.get('.ot-edit-input');
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
static editRepositoryId() {
|
|
121
|
+
this.getRepositoryIdEditElement().click();
|
|
122
|
+
}
|
|
123
|
+
|
|
112
124
|
static typeRepositoryTitle(title) {
|
|
113
125
|
RepositorySteps.getRepositoryTitleField().clear().type(title);
|
|
114
126
|
}
|