graphdb-workbench-tests 3.1.0-WBM-8 → 3.1.0-plugins1
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/.nycrc +10 -0
- package/cypress-legacy.config.js +9 -1
- package/cypress-security.config.js +40 -0
- package/cypress.config.js +3 -1
- package/e2e-flaky/import/import-user-data-url.spec.js +63 -0
- package/e2e-legacy/cluster/edit-cluster-nodes-modal.spec.js +44 -0
- package/e2e-legacy/explore/class-hierarchy/class.hierarchy.spec.js +1 -2
- package/e2e-legacy/explore/graphs-overview/graphs.overview.spec.js +2 -3
- package/e2e-legacy/explore/visual-graph/graphs-config.spec.js +5 -18
- package/e2e-legacy/explore/visual-graph/visual.graph.spec.js +1 -2
- package/e2e-legacy/graphql/activate-deactivate-graphql-endpoint.spec.js +1 -1
- package/e2e-legacy/graphql/create-graphql-endpoint.spec.js +1 -3
- package/e2e-legacy/graphql/delete-graphql-endpoint.spec.js +1 -1
- package/e2e-legacy/graphql/edit-graphql-enpoint.spec.js +1 -1
- package/e2e-legacy/graphql/export-graphql-endpoint-definition.spec.js +1 -1
- package/e2e-legacy/graphql/filter-graphql-endpoints-on-management-view.spec.js +2 -2
- package/e2e-legacy/graphql/graphql-endpoint-management-view.spec.js +5 -5
- package/e2e-legacy/graphql/graphql-playground.spec.js +1 -1
- package/e2e-legacy/graphql/import-graphql-endpoint-definitions.spec.js +1 -7
- package/e2e-legacy/graphql/set-default-graphql-endpoint.spec.js +1 -1
- package/e2e-legacy/help/guides/guides-with-repository.spec.js +32 -0
- package/e2e-legacy/help/guides/guides-without-repository.spec.js +20 -0
- package/e2e-legacy/{guides → help/guides}/movies-interactive-guide.spec.js +2 -2
- package/e2e-legacy/{guides → help/guides}/star-wars-interactive-guide.js +2 -2
- package/e2e-legacy/help/rest-api-documentatio/rest-api-documentation-with-repository.spec.js +32 -0
- package/e2e-legacy/help/rest-api-documentatio/rest-api-documentation-without-repository.spec.js +20 -0
- package/e2e-legacy/help/system-information/system-information-with-repository.spec.js +32 -0
- package/e2e-legacy/help/system-information/system-information-without-repository.spec.js +20 -0
- package/e2e-legacy/home/cookie-policy.spec.js +78 -59
- package/e2e-legacy/home/create-repository.spec.js +2 -6
- package/e2e-legacy/home/documentation-link.spec.js +31 -33
- package/e2e-legacy/home/google-analytics.spec.js +4 -6
- package/e2e-legacy/home/rdf-resource-search.spec.js +106 -138
- package/e2e-legacy/home/view-resource-autocomplete.spec.js +30 -21
- package/e2e-legacy/import/import-server-files-batch-operations.spec.js +1 -2
- package/e2e-legacy/import/import-server-files.spec.js +1 -2
- package/e2e-legacy/import/import-user-data-url.spec.js +1 -25
- package/e2e-legacy/import/import-user-data.spec.js +4 -2
- package/e2e-legacy/import/import-view.spec.js +1 -2
- package/e2e-legacy/monitor/global-operation-statuses-component.spec.js +13 -9
- package/e2e-legacy/repository/attach-remote-location.spec.js +2 -5
- package/e2e-legacy/repository/ontop-repository.spec.js +3 -12
- package/e2e-legacy/repository/repositories.spec.js +35 -46
- package/e2e-legacy/setup/aclmanagement/create-rule.spec.js +1 -2
- package/e2e-legacy/setup/aclmanagement/edit-rule.spec.js +1 -2
- package/e2e-legacy/setup/aclmanagement/reorder-rules.spec.js +1 -2
- package/e2e-legacy/setup/aclmanagement/scopes.spec.js +1 -2
- package/e2e-legacy/setup/autocomplete/autocomplete-with-repository.spec.js +40 -0
- package/e2e-legacy/setup/autocomplete/autocomplete-without-repository.spec.js +27 -0
- package/e2e-legacy/setup/{autocomplete.spec.js → autocomplete/autocomplete.spec.js} +5 -6
- package/e2e-legacy/setup/cluster/cluster-initial-state-with-cluster.spec.js +34 -0
- package/e2e-legacy/setup/cluster/cluster-initial-state-without-cluster.spec.js +25 -0
- package/e2e-legacy/setup/connectors-lucene.spec.js +1 -2
- package/e2e-legacy/setup/jdbc/jdbc-create.spec.js +2 -2
- package/e2e-legacy/setup/namespaces/namespaces-with-repository.spec.js +44 -0
- package/e2e-legacy/setup/namespaces/namespaces-without-repository.spec.js +27 -0
- package/e2e-legacy/setup/{namespaces.spec.js → namespaces/namespaces.spec.js} +4 -4
- package/e2e-legacy/setup/plugins/plugins-with-repository.spec.js +38 -0
- package/e2e-legacy/setup/plugins/plugins-without-repository.spec.js +28 -0
- package/e2e-legacy/setup/{plugins.spec.js → plugins/plugins.spec.js} +3 -3
- package/e2e-legacy/setup/sparql-template/sparql-template-create.js +10 -3
- package/e2e-legacy/setup/users-and-access/user-and-access.spec.js +38 -9
- package/e2e-legacy/sparql-editor/saved-query/edit-query.spec.js +3 -6
- package/e2e-legacy/sparql-editor/saved-query/readonly-query.spec.js +7 -13
- package/e2e-legacy/sparql-editor/saved-query/share-query.spec.js +2 -4
- package/e2e-legacy/sparql-editor/sparql-editor.spec.js +1 -4
- package/e2e-legacy/ttyg/agent-list.spec.js +38 -6
- package/e2e-legacy/ttyg/chat-list.spec.js +1 -2
- package/e2e-legacy/ttyg/clone-agent.spec.js +1 -0
- package/e2e-legacy/ttyg/create-agent.spec.js +10 -16
- package/e2e-legacy/ttyg/edit-agent.spec.js +69 -9
- package/e2e-legacy/ttyg/ttyg-initial-state-with-configured-api-key.spec.js +46 -0
- package/e2e-legacy/ttyg/ttyg-initial-state-with-selected-repository.spec.js +45 -0
- package/e2e-legacy/ttyg/ttyg-initial-state-without-repositories.spec.js +21 -0
- package/e2e-legacy/ttyg/ttyg-permission.spec.js +28 -20
- package/e2e-legacy/ttyg/ttyg-view.spec.js +1 -1
- package/e2e-security/setup/home/cookie-policy.spec.js +64 -0
- package/e2e-security/setup/users-and-access/create-user-permissions.spec.js +184 -0
- package/e2e-security/setup/users-and-access/graphql-user.spec.js +123 -0
- package/e2e-security/setup/users-and-access/repo-admin-role.spec.js +69 -0
- package/e2e-security/setup/users-and-access/turn-on-security-and-password-change.spec.js +87 -0
- package/e2e-security/setup/users-and-access/user-and-access.spec.js +87 -0
- package/e2e-security/setup/users-and-access/users-and-access-initial-state.spec.js +38 -0
- package/fixtures/repositories/free-access.json +13 -0
- package/fixtures/repositories/get-remote-and-local-repositories.json +34 -0
- package/fixtures/ttyg/agent/get-agent-defaults-assistant-api.json +44 -0
- package/fixtures/ttyg/agent/get-agent-defaults.json +2 -0
- package/npm-shrinkwrap.json +7633 -1817
- package/package.json +13 -7
- package/plugins/index.js +3 -2
- package/steps/base-steps.js +4 -0
- package/steps/cluster/cluster-page-steps.js +12 -2
- package/steps/error-steps.js +4 -7
- package/steps/graphql/graphql-endpoint-management-steps.js +2 -2
- package/steps/guides/guide-steps.js +20 -1
- package/steps/home-steps.js +59 -37
- package/steps/import/import-steps.js +8 -3
- package/steps/login-steps.js +14 -3
- package/steps/main-menu-steps.js +76 -6
- package/steps/operations-statuses-component-steps.js +5 -10
- package/steps/rdf-resource-search-steps.js +55 -0
- package/steps/repository-steps.js +17 -17
- package/steps/rest-api-documentation-steps.js +15 -0
- package/steps/setup/autocomplete-steps.js +17 -3
- package/steps/setup/namespace-steps.js +8 -2
- package/steps/setup/plugins-steps.js +11 -1
- package/steps/setup/settings-steps.js +18 -0
- package/steps/setup/user-and-access-steps.js +28 -2
- package/steps/system-information-steps.js +70 -0
- package/steps/ttyg/ttyg-agent-settings-modal.steps.js +74 -11
- package/steps/ttyg/ttyg-view-steps.js +39 -6
- package/steps/widgets/active-repository-widget-steps.js +4 -0
- package/steps/yasgui/yasr-steps.js +4 -0
- package/stubs/browser-stubs.js +21 -0
- package/stubs/environment-stubs.js +9 -1
- package/stubs/repositories/repositories-stubs.js +4 -0
- package/stubs/security-stubs.js +4 -0
- package/stubs/ttyg/ttyg-stubs.js +18 -2
- package/support/e2e.js +2 -1
- package/support/repository-commands.js +14 -1
- package/e2e-flaky/setup/users-and-access/security-and-free-access.spec.js +0 -57
- package/e2e-flaky/ttyg/ttyg-permission.spec.js +0 -67
- package/fixtures/locale-en.json +0 -3361
- /package/e2e-legacy/help/{system-information.spec.js → system-information/system-information.spec.js} +0 -0
package/package.json
CHANGED
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "graphdb-workbench-tests",
|
|
3
|
-
"version": "3.1.0-
|
|
3
|
+
"version": "3.1.0-plugins1",
|
|
4
4
|
"description": "Cypress tests for GraphDB workbench",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"prepack": "npm shrinkwrap",
|
|
7
7
|
"postpack": "mv npm-shrinkwrap.json package-lock.json",
|
|
8
8
|
"cy:open": "cypress open",
|
|
9
9
|
"cy:open-legacy": "cypress open --config-file cypress-legacy.config.js",
|
|
10
|
+
"cy:open-security": "cypress open --config-file cypress-security.config.js",
|
|
10
11
|
"cy:open-flaky": "cypress open --config-file cypress-flaky.config.js",
|
|
11
12
|
"cy:run": "npm run cy:run-legacy && cypress run",
|
|
12
|
-
"cy:run:partial": "cypress run --config-file cypress-legacy.config.js --spec \"e2e-legacy
|
|
13
|
+
"cy:run:partial": "cypress run --config-file cypress-legacy.config.js --spec \"e2e-legacy/**/jdbc-create.spec.js\" --browser chrome",
|
|
13
14
|
"cy:run-legacy": "cypress run --config-file cypress-legacy.config.js --browser chrome",
|
|
15
|
+
"cy:run-security": "cypress run --config-file cypress-security.config.js --browser chrome",
|
|
16
|
+
"cy:run-legacy:coverage": "cypress run --config-file cypress-legacy.config.js --browser chrome",
|
|
14
17
|
"cy:run-flaky": "cypress run --config-file cypress-flaky.config.js --browser chrome",
|
|
15
18
|
"test": "npm run cy:run-legacy",
|
|
16
19
|
"test:core": "cypress run --spec e2e-legacy/repository/**,e2e-legacy/import/**,e2e-legacy/sparql-editor/**,e2e-legacy/monitor/**,e2e-legacy/cluster/**,e2e-legacy/ttyg/**"
|
|
@@ -29,15 +32,18 @@
|
|
|
29
32
|
"url": "git+https://github.com/Ontotext-AD/graphdb-workbench.git"
|
|
30
33
|
},
|
|
31
34
|
"devDependencies": {
|
|
32
|
-
"cypress": "^
|
|
35
|
+
"@bahmutov/cypress-code-coverage": "^2.7.2",
|
|
36
|
+
"babel-plugin-istanbul": "^7.0.0",
|
|
37
|
+
"cypress": "14.5.1",
|
|
33
38
|
"cypress-failed-log": "^2.10.0",
|
|
34
39
|
"cypress-file-upload": "^5.0.8",
|
|
35
40
|
"cypress-localstorage-commands": "^2.2.7",
|
|
36
|
-
"cypress-multi-reporters": "^2.0.
|
|
37
|
-
"cypress-real-events": "^1.
|
|
38
|
-
"cypress-terminal-report": "^7.
|
|
41
|
+
"cypress-multi-reporters": "^2.0.5",
|
|
42
|
+
"cypress-real-events": "^1.14.0",
|
|
43
|
+
"cypress-terminal-report": "^7.2.0",
|
|
39
44
|
"cypress-wait-until": "^3.0.2",
|
|
40
|
-
"del": "^
|
|
45
|
+
"del": "^8.0.0",
|
|
46
|
+
"dotenv": "^17.0.1",
|
|
41
47
|
"minimist": "^1.2.8",
|
|
42
48
|
"mocha-junit-reporter": "^2.2.1"
|
|
43
49
|
}
|
package/plugins/index.js
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
// This function is called when a project is opened or re-opened (e.g. due to
|
|
12
12
|
// the project's config changing)
|
|
13
13
|
|
|
14
|
-
const
|
|
14
|
+
const deleteSync = require('del').deleteSync;
|
|
15
15
|
const retryTracker = {};
|
|
16
16
|
|
|
17
17
|
module.exports = (on, config) => {
|
|
@@ -64,7 +64,7 @@ module.exports = (on, config) => {
|
|
|
64
64
|
test.attempts.some((attempt) => attempt.state === 'failed')
|
|
65
65
|
);
|
|
66
66
|
if (!failures) {
|
|
67
|
-
return
|
|
67
|
+
return deleteSync(results.video);
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
});
|
|
@@ -95,4 +95,5 @@ module.exports = (on, config) => {
|
|
|
95
95
|
printGroup('[FAIL] Broken tests', broken);
|
|
96
96
|
console.log('====================================================================================================\n');
|
|
97
97
|
});
|
|
98
|
+
return config;
|
|
98
99
|
};
|
package/steps/base-steps.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import {BaseSteps} from "../base-steps";
|
|
2
|
+
|
|
3
|
+
export class ClusterPageSteps extends BaseSteps {
|
|
2
4
|
static visit() {
|
|
3
5
|
cy.visit('/cluster');
|
|
4
6
|
}
|
|
@@ -7,6 +9,10 @@ export class ClusterPageSteps {
|
|
|
7
9
|
return cy.get('.cluster-view');
|
|
8
10
|
}
|
|
9
11
|
|
|
12
|
+
static getNoClusterImage() {
|
|
13
|
+
return this.getClusterPage().find('.no-cluster')
|
|
14
|
+
}
|
|
15
|
+
|
|
10
16
|
static getCreateClusterButton() {
|
|
11
17
|
return cy.get('.cluster-zone');
|
|
12
18
|
}
|
|
@@ -47,8 +53,12 @@ export class ClusterPageSteps {
|
|
|
47
53
|
this.getPreviewClusterConfigButton().click();
|
|
48
54
|
}
|
|
49
55
|
|
|
56
|
+
static getLegendButton() {
|
|
57
|
+
return this.getByTestId('toggle-legend-button');
|
|
58
|
+
}
|
|
59
|
+
|
|
50
60
|
static openLegend() {
|
|
51
|
-
return
|
|
61
|
+
return this.getLegendButton().click();
|
|
52
62
|
}
|
|
53
63
|
|
|
54
64
|
static getLegend() {
|
package/steps/error-steps.js
CHANGED
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
export class ErrorSteps {
|
|
2
|
-
static getErrorElement() {
|
|
3
|
-
return cy.get('.idError');
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
static verifyError(errorMessage) {
|
|
7
|
-
ErrorSteps.getErrorElement().contains(errorMessage);
|
|
8
|
-
}
|
|
9
2
|
|
|
10
3
|
static getRepositoryErrors() {
|
|
11
4
|
return cy.get('.card.repository-errors')
|
|
12
5
|
}
|
|
13
6
|
|
|
7
|
+
static verifyError(errorMessage) {
|
|
8
|
+
ErrorSteps.getRepositoryErrors().contains(errorMessage);
|
|
9
|
+
}
|
|
10
|
+
|
|
14
11
|
static getNoConnectedRepoMessage() {
|
|
15
12
|
return this.getRepositoryErrors().find('.alert.lead.alert-info');
|
|
16
13
|
}
|
|
@@ -35,7 +35,7 @@ export class GraphqlEndpointManagementSteps {
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
static getEndpointsInfo() {
|
|
38
|
-
|
|
38
|
+
return this.getEndpointTable().find('tbody tr');
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
static getEndpointLink(index) {
|
|
@@ -89,7 +89,7 @@ export class GraphqlEndpointManagementSteps {
|
|
|
89
89
|
const endpointInfo = data[index];
|
|
90
90
|
cy.wrap($row).within(() => {
|
|
91
91
|
const statusCheck = endpointInfo.status === 'deleted' ? 'not.exist' : 'be.visible';
|
|
92
|
-
cy.get('td').eq(
|
|
92
|
+
cy.get('td').eq(2).find('.endpoint-link').should(statusCheck);
|
|
93
93
|
cy.get('td').eq(2).should('contain', endpointInfo.id);
|
|
94
94
|
cy.get('td').eq(3).should('contain', endpointInfo.label);
|
|
95
95
|
const isDefaultCheck = endpointInfo.default ? 'be.checked' : 'not.be.checked'
|
|
@@ -4,8 +4,9 @@ import {RepositorySteps} from "../repository-steps";
|
|
|
4
4
|
import {RepositorySelectorSteps} from "../repository-selector-steps";
|
|
5
5
|
import {AutocompleteSteps} from "../setup/autocomplete-steps";
|
|
6
6
|
import ImportSteps from "../import/import-steps";
|
|
7
|
+
import {BaseSteps} from "../base-steps";
|
|
7
8
|
|
|
8
|
-
export class GuideSteps {
|
|
9
|
+
export class GuideSteps extends BaseSteps {
|
|
9
10
|
static visit() {
|
|
10
11
|
cy.visit('/guides');
|
|
11
12
|
}
|
|
@@ -261,4 +262,22 @@ export class GuideSteps {
|
|
|
261
262
|
|
|
262
263
|
GuideDialogSteps.assertDialogWithTitleIsVisible('End of guide');
|
|
263
264
|
}
|
|
265
|
+
|
|
266
|
+
static getGuidesPerPageBar() {
|
|
267
|
+
return this.getByTestId('guides-per-page-bar');
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
static getGuidesPaginator() {
|
|
271
|
+
return this.getByTestId('guides-paginator');
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
static getGuidesList() {
|
|
275
|
+
return this.getByTestId('guides-list');
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
static verifyInitialState() {
|
|
279
|
+
this.getGuidesPerPageBar().should('be.visible');
|
|
280
|
+
this.getGuidesPaginator().should('exist');
|
|
281
|
+
this.getGuidesList().should('be.visible');
|
|
282
|
+
}
|
|
264
283
|
}
|
package/steps/home-steps.js
CHANGED
|
@@ -2,28 +2,36 @@ import {LicenseWidgetSteps} from "./widgets/license-widget-steps";
|
|
|
2
2
|
import {RepositoryErrorsWidgetSteps} from "./widgets/repository-errors-widget-steps";
|
|
3
3
|
import {ActiveRepositoryWidgetSteps} from "./widgets/active-repository-widget-steps";
|
|
4
4
|
import {SavedSparqlQueriesWidgetSteps} from "./widgets/saved-sparql-queries-widget-steps";
|
|
5
|
+
import {RepositorySteps} from "./repository-steps";
|
|
6
|
+
import {BaseSteps} from "./base-steps";
|
|
7
|
+
import {EnvironmentStubs} from "../stubs/environment-stubs";
|
|
5
8
|
|
|
6
|
-
class HomeSteps {
|
|
9
|
+
class HomeSteps extends BaseSteps {
|
|
7
10
|
|
|
8
11
|
static visit() {
|
|
9
12
|
cy.visit('/');
|
|
10
13
|
HomeSteps.getTutorialPanel().should('be.visible');
|
|
11
14
|
}
|
|
12
15
|
|
|
13
|
-
static
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
} else {
|
|
21
|
-
cy.visit('/');
|
|
22
|
-
}
|
|
16
|
+
static visitInProdMode() {
|
|
17
|
+
cy.visit('/', {
|
|
18
|
+
onBeforeLoad: (win) => {
|
|
19
|
+
EnvironmentStubs.stubWbProdMode();
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
static visitInDevMode() {
|
|
25
|
+
cy.visit('/', {
|
|
26
|
+
onBeforeLoad: (win) => {
|
|
27
|
+
EnvironmentStubs.stubWbDevMode();
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
}
|
|
25
31
|
|
|
26
|
-
|
|
32
|
+
static visitAndWaitLoader() {
|
|
33
|
+
cy.visit('/');
|
|
34
|
+
return cy.get('.ot-loader-new-content').should('not.exist');
|
|
27
35
|
}
|
|
28
36
|
|
|
29
37
|
static getView() {
|
|
@@ -153,10 +161,7 @@ class HomeSteps {
|
|
|
153
161
|
}
|
|
154
162
|
|
|
155
163
|
static verifyRepositoryIsSelected(repositoryId) {
|
|
156
|
-
|
|
157
|
-
.contains(repositoryId).should('not.exist');
|
|
158
|
-
cy.get('#btnReposGroup')
|
|
159
|
-
.should('contain', repositoryId);
|
|
164
|
+
return RepositorySteps.getRepositorySelection().should('contain', repositoryId);
|
|
160
165
|
}
|
|
161
166
|
|
|
162
167
|
static hasRepositoryInfo(repositoryId) {
|
|
@@ -173,10 +178,14 @@ class HomeSteps {
|
|
|
173
178
|
});
|
|
174
179
|
}
|
|
175
180
|
|
|
181
|
+
static getCreateRepositoryLink() {
|
|
182
|
+
return cy.get('.create-repository-btn');
|
|
183
|
+
}
|
|
184
|
+
|
|
176
185
|
static verifyCreateRepositoryLink() {
|
|
177
186
|
cy.get('.card.repository-errors').should("be.visible")
|
|
178
187
|
.within(() => {
|
|
179
|
-
|
|
188
|
+
HomeSteps.getCreateRepositoryLink()
|
|
180
189
|
.click()
|
|
181
190
|
.url()
|
|
182
191
|
.should('eq', Cypress.config("baseUrl") + '/repository/create?previous=home');
|
|
@@ -236,19 +245,40 @@ class HomeSteps {
|
|
|
236
245
|
cy.wait('@getAutocompleteStatus').then(callback);
|
|
237
246
|
}
|
|
238
247
|
|
|
239
|
-
static
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
248
|
+
static getRdfResourceSearchComponent() {
|
|
249
|
+
return this.getByTestId('search-rdf-resource-component');
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
static getRdfResourceSearchInput() {
|
|
253
|
+
return this.getRdfResourceSearchComponent().getByTestId('rdf-resource-input');
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
static getAutocompleteResultsContainer() {
|
|
257
|
+
return this.getRdfResourceSearchComponent().getByTestId('auto-complete-results');
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
static getAutocompleteSuggestion() {
|
|
261
|
+
return this.getAutocompleteResultsContainer().getByTestId('autocomplete-suggestion');
|
|
244
262
|
}
|
|
245
263
|
|
|
246
|
-
static
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
264
|
+
static getAutocompleteSuggestionByPartialText(partialText) {
|
|
265
|
+
return this.getAutocompleteSuggestion().contains(partialText);
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
static getTableDisplayButton() {
|
|
269
|
+
return this.getRdfResourceSearchComponent().getByTestId('display-table-button');
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
static getVisualDisplayButton() {
|
|
273
|
+
return this.getRdfResourceSearchComponent().getByTestId('display-visual-button');
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
static getRdfResourceSearchCloseButton() {
|
|
277
|
+
return this.getRdfResourceSearchComponent().getByTestId('rdf-resource-clear-button');
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
static closeRdfResourceSearchBox() {
|
|
281
|
+
this.getRdfResourceSearchCloseButton().click();
|
|
252
282
|
}
|
|
253
283
|
|
|
254
284
|
static getViewResourceAsLabel() {
|
|
@@ -291,14 +321,6 @@ class HomeSteps {
|
|
|
291
321
|
return cy.get('.cookie-policy-modal');
|
|
292
322
|
}
|
|
293
323
|
|
|
294
|
-
static getHelpMenu() {
|
|
295
|
-
return cy.get('.main-menu .menu-element-root').eq(8);
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
static clickHelpMenu() {
|
|
299
|
-
return HomeSteps.getHelpMenu().click();
|
|
300
|
-
}
|
|
301
|
-
|
|
302
324
|
static getDocumentationLink() {
|
|
303
325
|
return cy.get('[guide-selector="sub-menu-documentation"]');
|
|
304
326
|
}
|
|
@@ -23,6 +23,7 @@ class ImportSteps {
|
|
|
23
23
|
static visit() {
|
|
24
24
|
cy.visit('/import');
|
|
25
25
|
cy.url().should('include', '/import');
|
|
26
|
+
cy.get('#wb-import h1').should('be.visible');
|
|
26
27
|
}
|
|
27
28
|
|
|
28
29
|
static getView() {
|
|
@@ -34,15 +35,19 @@ class ImportSteps {
|
|
|
34
35
|
}
|
|
35
36
|
|
|
36
37
|
static showPageInfoPopover() {
|
|
37
|
-
return this.getPageInfoIcon().
|
|
38
|
+
return this.getPageInfoIcon().trigger('mouseover');
|
|
38
39
|
}
|
|
39
40
|
|
|
40
41
|
static getPageInfoPopover() {
|
|
41
42
|
return cy.get('.help-info');
|
|
42
43
|
}
|
|
43
44
|
|
|
45
|
+
static getPageInfoPopoverTitle() {
|
|
46
|
+
return cy.get('.help-info h4');
|
|
47
|
+
}
|
|
48
|
+
|
|
44
49
|
static hidePageInfoPopover() {
|
|
45
|
-
return
|
|
50
|
+
return this.getPageInfoIcon().trigger('mouseleave');
|
|
46
51
|
}
|
|
47
52
|
|
|
48
53
|
static visitUserImport(repository) {
|
|
@@ -258,7 +263,7 @@ class ImportSteps {
|
|
|
258
263
|
}
|
|
259
264
|
|
|
260
265
|
static deleteUploadedFile(index) {
|
|
261
|
-
this.getResource(index).find('.import-resource-action-remove-btn').
|
|
266
|
+
this.getResource(index).find('.import-resource-action-remove-btn').invoke('show').trigger('click');
|
|
262
267
|
}
|
|
263
268
|
|
|
264
269
|
static importFile(index) {
|
package/steps/login-steps.js
CHANGED
|
@@ -1,19 +1,30 @@
|
|
|
1
|
+
import {EnvironmentStubs} from "../stubs/environment-stubs";
|
|
2
|
+
|
|
1
3
|
export class LoginSteps {
|
|
2
4
|
static visitLoginPage() {
|
|
3
5
|
cy.visit('/login');
|
|
4
6
|
}
|
|
5
7
|
|
|
8
|
+
static visitInProdMode() {
|
|
9
|
+
cy.visit('/login', {
|
|
10
|
+
onBeforeLoad: (win) => {
|
|
11
|
+
EnvironmentStubs.stubWbProdMode();
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
|
|
6
16
|
static loginWithUser(username, password) {
|
|
17
|
+
cy.get('.login-form').should('be.visible');
|
|
7
18
|
cy.get('#wb-login-username').type(username);
|
|
8
19
|
cy.get('#wb-login-password').type(password);
|
|
9
20
|
cy.get('#wb-login-submitLogin').click();
|
|
10
21
|
}
|
|
11
22
|
|
|
12
23
|
static logout() {
|
|
13
|
-
cy.get('
|
|
14
|
-
cy.get('.dropdown
|
|
24
|
+
cy.get('onto-user-menu').click();
|
|
25
|
+
cy.get('.onto-user-menu-dropdown')
|
|
15
26
|
.contains('Logout')
|
|
16
|
-
.
|
|
27
|
+
.first()
|
|
17
28
|
// Force the click because Cypress sometimes determines that the item has 0x0 dimensions
|
|
18
29
|
.click({force: true});
|
|
19
30
|
}
|
package/steps/main-menu-steps.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export class MainMenuSteps {
|
|
2
2
|
|
|
3
3
|
static getMainMenu() {
|
|
4
|
-
return cy.get('
|
|
4
|
+
return cy.get('onto-navbar');
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
static openHomePage() {
|
|
@@ -12,12 +12,12 @@ export class MainMenuSteps {
|
|
|
12
12
|
return MainMenuSteps.getMainMenu().find('.menu-element').contains(menuName);
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
static
|
|
16
|
-
return MainMenuSteps.
|
|
15
|
+
static getSubMenuButtonByName(menuName) {
|
|
16
|
+
return MainMenuSteps.getMainMenu().find('.sub-menu-link').contains(menuName);
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
static
|
|
20
|
-
return MainMenuSteps.getMenuButton('
|
|
19
|
+
static getMenuImport() {
|
|
20
|
+
return MainMenuSteps.getMenuButton('Import');
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
static getMenuSparql() {
|
|
@@ -58,7 +58,7 @@ export class MainMenuSteps {
|
|
|
58
58
|
// Forced it because some element as "Explore" for example has CSS pointer-events: none
|
|
59
59
|
MainMenuSteps.getMenuButton(menuName).click({force: true});
|
|
60
60
|
}
|
|
61
|
-
|
|
61
|
+
|
|
62
62
|
static clickOnSubmenuTriggerElement(menuName) {
|
|
63
63
|
MainMenuSteps.getMainMenu().find('.menu-element-root').contains(menuName).parent().click();
|
|
64
64
|
}
|
|
@@ -190,4 +190,74 @@ export class MainMenuSteps {
|
|
|
190
190
|
this.clickOnMenuSetup();
|
|
191
191
|
this.getSubMenuButton('sub-menu-my-settings').click();
|
|
192
192
|
}
|
|
193
|
+
|
|
194
|
+
static clickOnAutocomplete() {
|
|
195
|
+
this.clickOnMenuSetup();
|
|
196
|
+
this.getSubmenuAutocomplete().click();
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
static clickOnNamespaces() {
|
|
200
|
+
this.clickOnMenuSetup();
|
|
201
|
+
this.getSubMenuButton('sub-menu-namespaces').click();
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
static clickOnPlugins() {
|
|
205
|
+
this.clickOnMenuSetup();
|
|
206
|
+
this.getSubMenuButton('sub-menu-plugins').click();
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
// --------------------------
|
|
210
|
+
// -- Help menu --
|
|
211
|
+
// --------------------------
|
|
212
|
+
|
|
213
|
+
static getMenuHelp() {
|
|
214
|
+
return MainMenuSteps.getMainMenu().getByTestId('menu-help');
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
static clickOnMenuHelp() {
|
|
218
|
+
this.getMenuHelp().click();
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
static clickOnInteractiveGuides() {
|
|
222
|
+
this.clickOnMenuHelp();
|
|
223
|
+
this.getSubMenuButton('sub-menu-guide').click();
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
static clickOnRestApiDocumentation() {
|
|
227
|
+
this.clickOnMenuHelp();
|
|
228
|
+
this.getSubMenuButton('sub-menu-rest-api').click();
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
static clickOnSystemInformation() {
|
|
232
|
+
this.clickOnMenuHelp();
|
|
233
|
+
this.getSubMenuButton('sub-menu-system-information').click();
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
static clickOnCluster() {
|
|
237
|
+
this.clickOnMenuSetup();
|
|
238
|
+
this.getSubMenuButton('sub-menu-cluster').click();
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
// --------------------------
|
|
242
|
+
// -- Lab menu --
|
|
243
|
+
// --------------------------
|
|
244
|
+
static getMenuLab() {
|
|
245
|
+
return this.getMainMenu().getByTestId('menu-lab');
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
static clickOnMenuLab() {
|
|
249
|
+
return this.getMenuLab().click();
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
static clickOnTTYG() {
|
|
253
|
+
this.clickOnMenuLab();
|
|
254
|
+
this.getSubMenuButton('sub-menu-ttyg').click();
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
// --------------------------
|
|
258
|
+
// -- Explore menu --
|
|
259
|
+
// --------------------------
|
|
260
|
+
static getMenuExplore() {
|
|
261
|
+
return MainMenuSteps.getMainMenu().getByTestId('menu-explore');
|
|
262
|
+
}
|
|
193
263
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import {BrowserStubs} from "../stubs/browser-stubs";
|
|
2
|
+
|
|
1
3
|
export class OperationsStatusesComponentSteps {
|
|
2
4
|
|
|
3
5
|
static getOperationsStatusesComponent() {
|
|
@@ -13,15 +15,15 @@ export class OperationsStatusesComponentSteps {
|
|
|
13
15
|
}
|
|
14
16
|
|
|
15
17
|
static getQueriesOperationStatusHeaderElement() {
|
|
16
|
-
return OperationsStatusesComponentSteps.getOperationStatusHeader('.
|
|
18
|
+
return OperationsStatusesComponentSteps.getOperationStatusHeader('.fa-arrow-right-arrow-left');
|
|
17
19
|
}
|
|
18
20
|
|
|
19
21
|
static getBackupAndRestoreOperationStatusHeaderElement() {
|
|
20
|
-
return OperationsStatusesComponentSteps.getOperationStatusHeader('.fa
|
|
22
|
+
return OperationsStatusesComponentSteps.getOperationStatusHeader('.fa-archive');
|
|
21
23
|
}
|
|
22
24
|
|
|
23
25
|
static getClusterOperationStatusHeaderElement() {
|
|
24
|
-
return OperationsStatusesComponentSteps.getOperationStatusHeader('.fa
|
|
26
|
+
return OperationsStatusesComponentSteps.getOperationStatusHeader('.fa-sitemap');
|
|
25
27
|
}
|
|
26
28
|
|
|
27
29
|
static getOperationStatuses() {
|
|
@@ -31,11 +33,4 @@ export class OperationsStatusesComponentSteps {
|
|
|
31
33
|
static openOperationStatusesDialog() {
|
|
32
34
|
OperationsStatusesComponentSteps.getOperationsStatusesComponent().click();
|
|
33
35
|
}
|
|
34
|
-
|
|
35
|
-
static checkOperationElementUrl(expectedUrl, operationIndex = 0) {
|
|
36
|
-
OperationsStatusesComponentSteps.getOperationStatuses().eq(operationIndex).then(($operationElement) => {
|
|
37
|
-
expect($operationElement).to.have.attr('target', '_blank');
|
|
38
|
-
expect($operationElement).to.have.attr('href', expectedUrl);
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
36
|
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import {BaseSteps} from "./base-steps";
|
|
2
|
+
|
|
3
|
+
export class RdfResourceSearchSteps extends BaseSteps {
|
|
4
|
+
|
|
5
|
+
static getComponent() {
|
|
6
|
+
return this.getByTestId('onto-rdf-search-component');
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
static getShowViewResourceMessageButton() {
|
|
10
|
+
return this.getByTestId('onto-show-view-resource-message');
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
static clickOnShowViewResourceMessageButton() {
|
|
14
|
+
this.getShowViewResourceMessageButton().click();
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
static getOpenButton() {
|
|
18
|
+
return this.getByTestId('onto-open-rdf-search-button');
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
static clickOnRDFResourceSearch() {
|
|
22
|
+
this.getOpenButton().click();
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
static getRDFResourceSearchInput() {
|
|
26
|
+
return this.getComponent().getByTestId('rdfSearchContext');
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
static getCloseButton() {
|
|
30
|
+
return this.getComponent().getByTestId('onto-rdf-resource-search-close-btn');
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
static getAutocompleteResults() {
|
|
34
|
+
return this.getComponent().getByTestId('onto-autocomplete-results');
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
static getAutocompleteSuggestionByPartialText(partialText) {
|
|
38
|
+
return this.getAutocompleteResults().getByTestId('onto-autocomplete-suggestion').contains(partialText);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
static clickOnAutocompleteSuggestionByPartialText(partialText) {
|
|
42
|
+
return this.getAutocompleteSuggestionByPartialText(partialText).click();
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
static openRdfSearchBox() {
|
|
46
|
+
RdfResourceSearchSteps.clickOnRDFResourceSearch();
|
|
47
|
+
RdfResourceSearchSteps.getRDFResourceSearchInput()
|
|
48
|
+
.should('be.visible')
|
|
49
|
+
.and('be.focused');
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
static closeRDFSearchBox() {
|
|
53
|
+
this.getCloseButton().click();
|
|
54
|
+
}
|
|
55
|
+
}
|