graphdb-workbench-tests 3.4.0-SPARQL12-TR1 → 3.4.0-SPARQL12-TR2
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/e2e-legacy/explore/visual-graph/visual-graph-links-limit.spec.js +30 -5
- package/e2e-legacy/graphql/graphql-in-remote-location.spec.js +49 -0
- package/e2e-legacy/repository/attach-remote-location.spec.js +47 -12
- package/npm-shrinkwrap.json +17 -17
- package/package.json +1 -1
- package/steps/graphql/create-graphql-endpoint-steps.js +8 -0
- package/steps/graphql/graphql-endpoint-management-steps.js +8 -0
- package/steps/graphql/graphql-playground-steps.js +8 -0
- package/steps/repositories/attach-repository-steps.js +16 -0
- package/steps/visual-graph-steps.js +4 -0
- package/steps/yasgui/yasr-steps.js +3 -1
- package/stubs/cluster/remote-location-stubs.js +4 -0
- package/support/repository-commands.js +22 -3
|
@@ -43,12 +43,14 @@ describe('Visual graph linksLimit URL parameter', () => {
|
|
|
43
43
|
|
|
44
44
|
// Then, I expect to see the visual graph with the default linksLimit
|
|
45
45
|
BaseSteps.getUrl().should('include', `linksLimit=${DEFAULT_LINKS_LIMIT}`);
|
|
46
|
-
|
|
46
|
+
// And the limit shown warning should not exist, since it is currently 100 (default) and we have less than that
|
|
47
|
+
VisualGraphSteps.getShownLimitMessage().should('not.exist');
|
|
47
48
|
|
|
48
49
|
// When, I update the link limit from the input field
|
|
49
50
|
VisualGraphSteps.updateLinksLimitField(5);
|
|
50
|
-
|
|
51
|
-
|
|
51
|
+
// Then I limit shown warning to exist,since we have more than 5 links
|
|
52
|
+
VisualGraphSteps.getShownLimitMessage().should('exist');
|
|
53
|
+
// And I expect the URL to include the updated linksLimit in the URL
|
|
52
54
|
BaseSteps.getUrl().should('include', 'linksLimit=5');
|
|
53
55
|
// And, I expect to see the visual graph with the updated linksLimit
|
|
54
56
|
VisualGraphSteps.getNodes().should('have.length', 6); // 5 links plus the main node
|
|
@@ -98,12 +100,18 @@ describe('Visual graph linksLimit URL parameter', () => {
|
|
|
98
100
|
VisualGraphSteps.openGraphConfig(configName);
|
|
99
101
|
|
|
100
102
|
// Then, I expect to see 10 nodes before changing the limit
|
|
101
|
-
BaseSteps.getUrl().should('include', 'linksLimit=
|
|
103
|
+
BaseSteps.getUrl().should('include', 'linksLimit=100');
|
|
102
104
|
VisualGraphSteps.getNodes().should('have.length', 10); // 10 nodes total, since we don't have a root node
|
|
103
105
|
|
|
106
|
+
// And the limit shown warning should not exist, since it is currently 100 (default) and we have a set ot 10 nodes
|
|
107
|
+
VisualGraphSteps.getShownLimitMessage().should('not.exist');
|
|
108
|
+
|
|
104
109
|
// When, I update the link limit from the input field
|
|
105
110
|
VisualGraphSteps.updateLinksLimitField(5);
|
|
106
111
|
|
|
112
|
+
// Then I limit shown warning to exist, since we have more than 5 links available
|
|
113
|
+
VisualGraphSteps.getShownLimitMessage().should('exist');
|
|
114
|
+
|
|
107
115
|
// Then I expect the URL to include the updated linksLimit in the URL
|
|
108
116
|
BaseSteps.getUrl().should('include', 'linksLimit=5');
|
|
109
117
|
// And, I expect to see the visual graph with the updated linksLimit
|
|
@@ -125,9 +133,12 @@ describe('Visual graph linksLimit URL parameter', () => {
|
|
|
125
133
|
VisualGraphSplitButtonSteps.clickOnVisualizeMainButton();
|
|
126
134
|
|
|
127
135
|
// Then, I expect to see 10 nodes before changing the limit
|
|
128
|
-
BaseSteps.getUrl().should('include', 'linksLimit=
|
|
136
|
+
BaseSteps.getUrl().should('include', 'linksLimit=100');
|
|
129
137
|
VisualGraphSteps.getNodes().should('have.length', 10); // 10 nodes total, since we don't have a root node
|
|
130
138
|
|
|
139
|
+
// And the limit shown warning should not exist, since it is currently 100 (default) and we have a set ot 10 nodes
|
|
140
|
+
VisualGraphSteps.getShownLimitMessage().should('not.exist');
|
|
141
|
+
|
|
131
142
|
// When, I update the link limit from the input field
|
|
132
143
|
VisualGraphSteps.updateLinksLimitField(5);
|
|
133
144
|
|
|
@@ -135,6 +146,20 @@ describe('Visual graph linksLimit URL parameter', () => {
|
|
|
135
146
|
BaseSteps.getUrl().should('include', 'linksLimit=5');
|
|
136
147
|
// And, I expect to see the visual graph with the updated linksLimit
|
|
137
148
|
VisualGraphSteps.getNodes().should('have.length', 5); // 5 nodes total, since we don't have a root node
|
|
149
|
+
|
|
150
|
+
// And, the limit shown warning should appear as we are showing the limit
|
|
151
|
+
VisualGraphSteps.getShownLimitMessage().should('exist');
|
|
152
|
+
|
|
153
|
+
// When, I set the limit to the number of nodes from the query
|
|
154
|
+
VisualGraphSteps.updateLinksLimitField(10);
|
|
155
|
+
|
|
156
|
+
// Then I expect limit shown warning to exist
|
|
157
|
+
VisualGraphSteps.getShownLimitMessage().should('exist');
|
|
158
|
+
|
|
159
|
+
// When I set it to 1 more than the number of nodes from the query
|
|
160
|
+
VisualGraphSteps.updateLinksLimitField(11);
|
|
161
|
+
// Then I expect the limit shown warning to not exist
|
|
162
|
+
VisualGraphSteps.getShownLimitMessage().should('not.exist');
|
|
138
163
|
});
|
|
139
164
|
});
|
|
140
165
|
});
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import {RepositoriesStubs} from '../../stubs/repositories/repositories-stubs.js';
|
|
2
|
+
import {GraphqlEndpointManagementSteps} from '../../steps/graphql/graphql-endpoint-management-steps.js';
|
|
3
|
+
import {NamespaceStubs} from '../../stubs/namespace-stubs.js';
|
|
4
|
+
import {CreateGraphqlEndpointSteps} from '../../steps/graphql/create-graphql-endpoint-steps.js';
|
|
5
|
+
import {GraphqlPlaygroundSteps} from '../../steps/graphql/graphql-playground-steps.js';
|
|
6
|
+
|
|
7
|
+
describe('Graphql: Remote Location', () => {
|
|
8
|
+
const REMOTE_REPOSITORY_ID = 'configurations';
|
|
9
|
+
const REMOTE_REPOSITORY_LOCATION = 'http://localhost:7202';
|
|
10
|
+
|
|
11
|
+
beforeEach(() => {
|
|
12
|
+
RepositoriesStubs.stubRepositories();
|
|
13
|
+
NamespaceStubs.stubGeneratedOntotextNamespacesResponse(REMOTE_REPOSITORY_ID);
|
|
14
|
+
cy.presetRepository(REMOTE_REPOSITORY_ID, REMOTE_REPOSITORY_LOCATION);
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
it('should inform users that GraphQL endpoints are not accessible when the selected repository is in a remote location', () => {
|
|
18
|
+
// GIVEN: The workbench is set up with a repository located in a remote location.
|
|
19
|
+
|
|
20
|
+
// WHEN: I visit the GraphQL endpoint management page.
|
|
21
|
+
GraphqlEndpointManagementSteps.visit();
|
|
22
|
+
// THEN: I expect the page content not to be visible.
|
|
23
|
+
GraphqlEndpointManagementSteps.getPageContainer().should('not.exist');
|
|
24
|
+
// AND: An info message is displayed to inform users to switch to a repository from the current location.
|
|
25
|
+
GraphqlEndpointManagementSteps.getRepositoryInRemoteLocation().should('contain.text', 'The selected repository is in a remote location, and its endpoints aren’t accessible here. Select a repository from the current location.');
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
it('should inform users that they cannot create a GraphQL endpoint when the selected repository is in a remote location', () => {
|
|
29
|
+
// GIVEN: The workbench is set up with a repository located in a remote location.
|
|
30
|
+
|
|
31
|
+
// WHEN: I visit the create GraphQL endpoint page.
|
|
32
|
+
CreateGraphqlEndpointSteps.visit();
|
|
33
|
+
// THEN: I expect the page content not to be visible.
|
|
34
|
+
CreateGraphqlEndpointSteps.getPageContainer().should('not.exist');
|
|
35
|
+
// AND: An info message is displayed to inform users to switch to a local repository.
|
|
36
|
+
CreateGraphqlEndpointSteps.getRepositoryInRemoteLocation().should('contain.text', 'Endpoints can only be created for repositories in the current location. Select a local repository to continue.');
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
it('should inform users that the GraphQL Playground is available only for local repositories', () => {
|
|
40
|
+
// GIVEN: The workbench is set up with a repository located in a remote location.
|
|
41
|
+
|
|
42
|
+
// WHEN: I visit the GraphQL Playground page.
|
|
43
|
+
GraphqlPlaygroundSteps.visit();
|
|
44
|
+
// THEN: I expect the page content not to be visible.
|
|
45
|
+
GraphqlPlaygroundSteps.getPageContainer().should('not.exist');
|
|
46
|
+
// AND: An info message is displayed to inform users to switch to a local repository.
|
|
47
|
+
GraphqlPlaygroundSteps.getRepositoryInRemoteLocation().should('contain.text', 'The active repository is in a remote location. Playground is only available for repositories in the current location.');
|
|
48
|
+
});
|
|
49
|
+
});
|
|
@@ -2,13 +2,21 @@ import {RepositorySteps} from "../../steps/repository-steps";
|
|
|
2
2
|
import {AttachRepositorySteps} from "../../steps/repositories/attach-repository-steps";
|
|
3
3
|
import {ModalDialogSteps} from "../../steps/modal-dialog-steps";
|
|
4
4
|
import {RepositoriesStubs} from "../../stubs/repositories/repositories-stubs";
|
|
5
|
+
import {RemoteLocationStubs} from '../../stubs/cluster/remote-location-stubs.js';
|
|
5
6
|
|
|
6
7
|
describe('Attach remote location', () => {
|
|
8
|
+
let remoteLocationName;
|
|
9
|
+
|
|
10
|
+
beforeEach(() => {
|
|
11
|
+
remoteLocationName = 'http://location-' + Date.now();
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
afterEach(() => {
|
|
15
|
+
cy.deleteRemoteLocation(remoteLocationName);
|
|
16
|
+
})
|
|
7
17
|
|
|
8
18
|
it('Should create and delete remote instance', () => {
|
|
9
|
-
|
|
10
|
-
RepositorySteps.waitLoader();
|
|
11
|
-
RepositorySteps.waitUntilRepositoriesPageIsLoaded();
|
|
19
|
+
RepositorySteps.visit();
|
|
12
20
|
|
|
13
21
|
// When I open the "Attach a remote instance" dialog.
|
|
14
22
|
AttachRepositorySteps.openAttachRemoteLocationDialog();
|
|
@@ -114,12 +122,43 @@ describe('Attach remote location', () => {
|
|
|
114
122
|
RepositorySteps.getSparqlOntopicTable().should('not.exist');
|
|
115
123
|
});
|
|
116
124
|
|
|
125
|
+
it('should be able to create a remote location with encrypted password', () => {
|
|
126
|
+
// Given I have a running GDB instance and I am on the Repositories view
|
|
127
|
+
RepositorySteps.visit();
|
|
128
|
+
// When I start the location creation
|
|
129
|
+
AttachRepositorySteps.openAttachRemoteLocationDialog();
|
|
130
|
+
AttachRepositorySteps.enterURL(remoteLocationName);
|
|
131
|
+
// And I select basic auth type
|
|
132
|
+
AttachRepositorySteps.selectBasicRadioBtn();
|
|
133
|
+
// Then I expect to see a security warning
|
|
134
|
+
AttachRepositorySteps.getUnencryptedPasswordWarning().should('be.visible');
|
|
135
|
+
// And I should not see the warning for the backward compatibility issues when encrypting the password
|
|
136
|
+
AttachRepositorySteps.getBackwardCompatibilityWarning().should('not.exist');
|
|
137
|
+
// When I select to encrypt the password
|
|
138
|
+
AttachRepositorySteps.encryptPassword();
|
|
139
|
+
// Then I should see the backward compatibility warning
|
|
140
|
+
AttachRepositorySteps.getBackwardCompatibilityWarning().should('be.visible');
|
|
141
|
+
// And the unencrypted password warning should not be visible
|
|
142
|
+
AttachRepositorySteps.getUnencryptedPasswordWarning().should('not.exist');
|
|
143
|
+
// When I fill in username and password
|
|
144
|
+
AttachRepositorySteps.enterUsername('locationadmin');
|
|
145
|
+
AttachRepositorySteps.enterPassword('admin123');
|
|
146
|
+
// And I save the location
|
|
147
|
+
RemoteLocationStubs.spyRemoteLocationCreate();
|
|
148
|
+
AttachRepositorySteps.attachRemoteLocation();
|
|
149
|
+
// Then encrypt password flag should be sent
|
|
150
|
+
cy.wait('@add-remote-location')
|
|
151
|
+
.its('request.body')
|
|
152
|
+
.should('include', {
|
|
153
|
+
encryptPassword: true,
|
|
154
|
+
username: 'locationadmin'
|
|
155
|
+
});
|
|
156
|
+
});
|
|
157
|
+
|
|
117
158
|
it('Should render different location types in separate tables: error, location with and without repositories', () => {
|
|
118
159
|
RepositoriesStubs.stubRepositories();
|
|
119
160
|
RepositoriesStubs.stubLocations();
|
|
120
|
-
|
|
121
|
-
RepositorySteps.waitLoader();
|
|
122
|
-
RepositorySteps.waitUntilRepositoriesPageIsLoaded();
|
|
161
|
+
RepositorySteps.visit();
|
|
123
162
|
cy.wait('@get-all-repositories');
|
|
124
163
|
|
|
125
164
|
// When I open the Repositories view that contains all possible kind of locations.
|
|
@@ -137,9 +176,7 @@ describe('Attach remote location', () => {
|
|
|
137
176
|
});
|
|
138
177
|
|
|
139
178
|
it('Should be able to open edit remote location dialog', () => {
|
|
140
|
-
|
|
141
|
-
RepositorySteps.waitLoader();
|
|
142
|
-
RepositorySteps.waitUntilRepositoriesPageIsLoaded();
|
|
179
|
+
RepositorySteps.visit();
|
|
143
180
|
|
|
144
181
|
const locationId = 'http://local';
|
|
145
182
|
addRemoteSPARQLLocation(locationId, 'username', 'password');
|
|
@@ -161,9 +198,7 @@ describe('Attach remote location', () => {
|
|
|
161
198
|
});
|
|
162
199
|
|
|
163
200
|
it('Should create and delete SPARQL endpoint instance', () => {
|
|
164
|
-
|
|
165
|
-
RepositorySteps.waitLoader();
|
|
166
|
-
RepositorySteps.waitUntilRepositoriesPageIsLoaded();
|
|
201
|
+
RepositorySteps.visit();
|
|
167
202
|
|
|
168
203
|
const locationId = 'http://endpoint/repo/ex';
|
|
169
204
|
addRemoteSPARQLLocation(locationId, 'username', 'password');
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "graphdb-workbench-tests",
|
|
3
|
-
"version": "3.4.0-SPARQL12-
|
|
3
|
+
"version": "3.4.0-SPARQL12-TR2",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "graphdb-workbench-tests",
|
|
9
|
-
"version": "3.4.0-SPARQL12-
|
|
9
|
+
"version": "3.4.0-SPARQL12-TR2",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"devDependencies": {
|
|
12
12
|
"@bahmutov/cypress-code-coverage": "^2.7.2",
|
|
@@ -1071,9 +1071,9 @@
|
|
|
1071
1071
|
}
|
|
1072
1072
|
},
|
|
1073
1073
|
"node_modules/@babel/plugin-transform-modules-systemjs": {
|
|
1074
|
-
"version": "7.29.
|
|
1075
|
-
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.29.
|
|
1076
|
-
"integrity": "sha512-
|
|
1074
|
+
"version": "7.29.4",
|
|
1075
|
+
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.29.4.tgz",
|
|
1076
|
+
"integrity": "sha512-N7QmZ0xRZfjHOfZeQLJjwgX2zS9pdGHSVl/cjSGlo4dXMqvurfxXDMKY4RqEKzPozV78VMcd0lxyG13mlbKc4w==",
|
|
1077
1077
|
"dev": true,
|
|
1078
1078
|
"license": "MIT",
|
|
1079
1079
|
"dependencies": {
|
|
@@ -5420,9 +5420,9 @@
|
|
|
5420
5420
|
"license": "MIT"
|
|
5421
5421
|
},
|
|
5422
5422
|
"node_modules/fast-uri": {
|
|
5423
|
-
"version": "3.1.
|
|
5424
|
-
"resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.
|
|
5425
|
-
"integrity": "sha512-
|
|
5423
|
+
"version": "3.1.2",
|
|
5424
|
+
"resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.2.tgz",
|
|
5425
|
+
"integrity": "sha512-rVjf7ArG3LTk+FS6Yw81V1DLuZl1bRbNrev6Tmd/9RaroeeRRJhAt7jg/6YFxbvAQXUCavSoZhPPj6oOx+5KjQ==",
|
|
5426
5426
|
"dev": true,
|
|
5427
5427
|
"funding": [
|
|
5428
5428
|
{
|
|
@@ -7606,9 +7606,9 @@
|
|
|
7606
7606
|
}
|
|
7607
7607
|
},
|
|
7608
7608
|
"node_modules/mocha/node_modules/brace-expansion": {
|
|
7609
|
-
"version": "5.0.
|
|
7610
|
-
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.
|
|
7611
|
-
"integrity": "sha512-
|
|
7609
|
+
"version": "5.0.6",
|
|
7610
|
+
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.6.tgz",
|
|
7611
|
+
"integrity": "sha512-kLpxurY4Z4r9sgMsyG0Z9uzsBlgiU/EFKhj/h91/8yHu0edo7XuixOIH3VcJ8kkxs6/jPzoI6U9Vj3WqbMQ94g==",
|
|
7612
7612
|
"dev": true,
|
|
7613
7613
|
"license": "MIT",
|
|
7614
7614
|
"peer": true,
|
|
@@ -8921,9 +8921,9 @@
|
|
|
8921
8921
|
}
|
|
8922
8922
|
},
|
|
8923
8923
|
"node_modules/rimraf/node_modules/brace-expansion": {
|
|
8924
|
-
"version": "5.0.
|
|
8925
|
-
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.
|
|
8926
|
-
"integrity": "sha512-
|
|
8924
|
+
"version": "5.0.6",
|
|
8925
|
+
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.6.tgz",
|
|
8926
|
+
"integrity": "sha512-kLpxurY4Z4r9sgMsyG0Z9uzsBlgiU/EFKhj/h91/8yHu0edo7XuixOIH3VcJ8kkxs6/jPzoI6U9Vj3WqbMQ94g==",
|
|
8927
8927
|
"dev": true,
|
|
8928
8928
|
"license": "MIT",
|
|
8929
8929
|
"dependencies": {
|
|
@@ -9794,9 +9794,9 @@
|
|
|
9794
9794
|
}
|
|
9795
9795
|
},
|
|
9796
9796
|
"node_modules/systeminformation": {
|
|
9797
|
-
"version": "5.31.
|
|
9798
|
-
"resolved": "https://registry.npmjs.org/systeminformation/-/systeminformation-5.31.
|
|
9799
|
-
"integrity": "sha512-
|
|
9797
|
+
"version": "5.31.6",
|
|
9798
|
+
"resolved": "https://registry.npmjs.org/systeminformation/-/systeminformation-5.31.6.tgz",
|
|
9799
|
+
"integrity": "sha512-Uv2b2uGGM6ns+26czgW2cYRabYdnswM0ddSOOlryHOaelzsmDSet1iM/NT7VOYxW8x/BW+HkY+b1Ve2pLTSGSA==",
|
|
9800
9800
|
"dev": true,
|
|
9801
9801
|
"license": "MIT",
|
|
9802
9802
|
"os": [
|
package/package.json
CHANGED
|
@@ -7,6 +7,14 @@ export class CreateGraphqlEndpointSteps {
|
|
|
7
7
|
return cy.get('.create-graphql-endpoint-view');
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
+
static getPageContainer() {
|
|
11
|
+
return CreateGraphqlEndpointSteps.getView().find('.content');
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
static getRepositoryInRemoteLocation() {
|
|
15
|
+
return CreateGraphqlEndpointSteps.getView().find('.unexpected-remote-repository-warning');
|
|
16
|
+
}
|
|
17
|
+
|
|
10
18
|
static getSourceRepositorySelector() {
|
|
11
19
|
return this.getView().find('.source-repository-selector');
|
|
12
20
|
}
|
|
@@ -10,6 +10,14 @@ export class GraphqlEndpointManagementSteps {
|
|
|
10
10
|
return cy.get('.graphql-endpoint-management-view');
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
+
static getPageContainer() {
|
|
14
|
+
return GraphqlEndpointManagementSteps.getView().find('.endpoint-management-container');
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
static getRepositoryInRemoteLocation() {
|
|
18
|
+
return GraphqlEndpointManagementSteps.getView().find('.unexpected-remote-repository-warning');
|
|
19
|
+
}
|
|
20
|
+
|
|
13
21
|
static getEndpointFilterField() {
|
|
14
22
|
return this.getView().find('.endpoints-filter-field');
|
|
15
23
|
}
|
|
@@ -10,6 +10,14 @@ export class GraphqlPlaygroundSteps {
|
|
|
10
10
|
return cy.get('.graphql-playground-view');
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
+
static getPageContainer() {
|
|
14
|
+
return GraphqlPlaygroundSteps.getView().find('.content');
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
static getRepositoryInRemoteLocation() {
|
|
18
|
+
return GraphqlPlaygroundSteps.getView().find('.unexpected-remote-repository-warning');
|
|
19
|
+
}
|
|
20
|
+
|
|
13
21
|
static getNoSchemasAlert() {
|
|
14
22
|
return this.getView().find('.no-endpoints-view');
|
|
15
23
|
}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
export class AttachRepositorySteps {
|
|
2
2
|
|
|
3
|
+
static getRemoteLocationSettingsForm() {
|
|
4
|
+
return cy.get('#remoteLocationForm');
|
|
5
|
+
}
|
|
6
|
+
|
|
3
7
|
static getAttachRemoteLocationBtn() {
|
|
4
8
|
return cy.get('#addAttachRemoteLocation');
|
|
5
9
|
}
|
|
@@ -115,4 +119,16 @@ export class AttachRepositorySteps {
|
|
|
115
119
|
static clearPassword() {
|
|
116
120
|
AttachRepositorySteps.getPasswordInput().clear();
|
|
117
121
|
}
|
|
122
|
+
|
|
123
|
+
static getUnencryptedPasswordWarning() {
|
|
124
|
+
return this.getRemoteLocationSettingsForm().find('.unencrypted-password-warning');
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
static getBackwardCompatibilityWarning() {
|
|
128
|
+
return this.getRemoteLocationSettingsForm().find('.backward-compatibility-warning');
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
static encryptPassword() {
|
|
132
|
+
this.getRemoteLocationSettingsForm().find('#encryptPassword').check();
|
|
133
|
+
}
|
|
118
134
|
}
|
|
@@ -411,6 +411,10 @@ export class VisualGraphSteps extends BaseSteps {
|
|
|
411
411
|
return this.getByTestId('invalid-links-limit');
|
|
412
412
|
}
|
|
413
413
|
|
|
414
|
+
static getShownLimitMessage() {
|
|
415
|
+
return this.getByTestId('shown-links-limit');
|
|
416
|
+
}
|
|
417
|
+
|
|
414
418
|
static openVisualGraphHome() {
|
|
415
419
|
cy.get('.toolbar-holder').should('be.visible')
|
|
416
420
|
.find('.return-home-btn').should('be.visible').click();
|
|
@@ -34,7 +34,8 @@ export class YasrSteps extends BaseSteps {
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
static getResults() {
|
|
37
|
-
|
|
37
|
+
this.getYasrResultsContainer().should('not.have.class', 'rendering_result')
|
|
38
|
+
return this.getYasrResultsContainer().find('tbody').find('tr');
|
|
38
39
|
}
|
|
39
40
|
|
|
40
41
|
static getResultTableHeader() {
|
|
@@ -114,6 +115,7 @@ export class YasrSteps extends BaseSteps {
|
|
|
114
115
|
}
|
|
115
116
|
|
|
116
117
|
static getNoDataElement() {
|
|
118
|
+
this.getYasrResultsContainer().should('not.have.class', 'rendering_result')
|
|
117
119
|
return cy.get('.dataTables_empty');
|
|
118
120
|
}
|
|
119
121
|
|
|
@@ -7,6 +7,10 @@ export class RemoteLocationStubs extends Stubs {
|
|
|
7
7
|
}).as('add-remote-location');
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
+
static spyRemoteLocationCreate() {
|
|
11
|
+
cy.intercept('POST', '/rest/locations').as('add-remote-location');
|
|
12
|
+
}
|
|
13
|
+
|
|
10
14
|
static stubGetRemoteLocations(count = 'no') {
|
|
11
15
|
cy.intercept('GET', '/rest/locations', {
|
|
12
16
|
fixture: `/remote-location/get-${count}-remote-locations.json`,
|
|
@@ -47,13 +47,13 @@ Cypress.Commands.add('deleteRepository', (id, secured = false) => {
|
|
|
47
47
|
});
|
|
48
48
|
});
|
|
49
49
|
|
|
50
|
-
Cypress.Commands.add('presetRepository', (id) => {
|
|
51
|
-
cy.setLocalStorage(PRESET_REPO, JSON.stringify({id: id, location
|
|
50
|
+
Cypress.Commands.add('presetRepository', (id, location = '') => {
|
|
51
|
+
cy.setLocalStorage(PRESET_REPO, JSON.stringify({id: id, location}));
|
|
52
52
|
cy.waitUntil(() =>
|
|
53
53
|
cy.getLocalStorage(PRESET_REPO)
|
|
54
54
|
.then((preset) => {
|
|
55
55
|
const presetRepo = JSON.parse(preset);
|
|
56
|
-
return presetRepo && presetRepo.id === id
|
|
56
|
+
return presetRepo && presetRepo.id === id && presetRepo.location === location;
|
|
57
57
|
}));
|
|
58
58
|
cy.log('Pre-set repository:', id);
|
|
59
59
|
});
|
|
@@ -78,6 +78,25 @@ Cypress.Commands.add('initializeRepository', (id) => {
|
|
|
78
78
|
});
|
|
79
79
|
});
|
|
80
80
|
|
|
81
|
+
/**
|
|
82
|
+
* A command for deleting remote locations by URI. It sends a DELETE request to the appropriate endpoint and waits until
|
|
83
|
+
* the response is received.
|
|
84
|
+
*
|
|
85
|
+
* @param {string} uri - The URI of the remote location to be deleted.
|
|
86
|
+
*/
|
|
87
|
+
Cypress.Commands.add('deleteRemoteLocation', (uri) => {
|
|
88
|
+
cy.request({
|
|
89
|
+
method: 'DELETE',
|
|
90
|
+
url: '/rest/locations?uri=' + encodeURIComponent(uri),
|
|
91
|
+
headers: {
|
|
92
|
+
'Content-Type': 'application/json'
|
|
93
|
+
},
|
|
94
|
+
failOnStatusCode: false
|
|
95
|
+
}).then((response) => {
|
|
96
|
+
cy.waitUntil(() => response);
|
|
97
|
+
});
|
|
98
|
+
});
|
|
99
|
+
|
|
81
100
|
Cypress.Commands.add('enableAutocomplete', (repositoryId) => {
|
|
82
101
|
toggleAutocomplete(repositoryId, true);
|
|
83
102
|
});
|