graphdb-workbench-tests 3.2.1 → 3.3.0-RC1
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/cypress-security.config.js +12 -5
- package/e2e-flaky/import/import-user-data-batch-operations.spec.js +2 -2
- package/e2e-legacy/explore/class-relationships/class-relationships.spec.js +2 -0
- package/e2e-legacy/explore/visual-graph/graphs-config.spec.js +4 -4
- package/e2e-legacy/explore/visual-graph/visual-graph-node-labels.spec.js +14 -2
- package/e2e-legacy/explore/visual-graph/visual.graph.spec.js +23 -11
- package/e2e-legacy/guides/autocomplete/enable-autocomplete-guide.spec.js +49 -0
- package/e2e-legacy/guides/class-hierarcy/class-hierarchy-guide.spec.js +89 -0
- package/e2e-legacy/guides/class-relations/class-relations-guide.spec.js +76 -0
- package/e2e-legacy/guides/connectors/connectors-guide.spec.js +152 -0
- package/e2e-legacy/guides/create-similarity-index/create-similarity-index-guide.spec.js +74 -0
- package/e2e-legacy/guides/download-guide-resource/download-guide-resource-guide.js +55 -0
- package/e2e-legacy/guides/repositories/create-repository-guide.spec.js +69 -0
- package/e2e-legacy/guides/ttyg/configure-agent/configure-agent-guide.spec.js +150 -0
- package/e2e-legacy/guides/ttyg/conversation/ttyg-conversation-guide.spec.js +86 -0
- package/e2e-legacy/home/cookie-policy.spec.js +8 -8
- package/e2e-legacy/home/rdf-resource-search.spec.js +12 -0
- package/e2e-legacy/import/import-server-files.spec.js +2 -2
- package/e2e-legacy/import/import-user-data-file-upload.spec.js +3 -3
- package/e2e-legacy/import/import-user-data.spec.js +2 -2
- package/e2e-legacy/repository/ontop-repository.spec.js +1 -1
- package/e2e-legacy/repository/repositories.spec.js +1 -1
- package/e2e-legacy/repository/url-with-repository-id-parameter.spec.js +155 -0
- package/e2e-legacy/setup/autocomplete/autocomplete.spec.js +1 -1
- package/e2e-legacy/setup/connectors-lucene.spec.js +2 -2
- package/e2e-legacy/setup/jdbc/jdbc-create.spec.js +4 -4
- package/e2e-legacy/setup/rdf-rank/rdf-rank.spec.js +2 -4
- package/e2e-legacy/setup/settings/my-settings.spec.js +48 -60
- package/e2e-legacy/setup/users-and-access/user-and-access.spec.js +28 -12
- package/e2e-legacy/sparql-editor/actions/expand-results-over-sameas.spec.js +11 -11
- package/e2e-legacy/sparql-editor/actions/include-inferred-statements.spec.js +6 -6
- package/e2e-legacy/sparql-editor/actions/inferred-sameas.spec.js +7 -7
- package/e2e-legacy/sparql-editor/saved-query/abort-query.spec.js +1 -1
- package/e2e-legacy/sparql-editor/saved-query/readonly-query.spec.js +13 -16
- package/e2e-legacy/sparql-editor/saved-query/share-query.spec.js +30 -1
- package/e2e-legacy/ttyg/agent-list.spec.js +1 -2
- package/e2e-legacy/ttyg/agent-select-menu.spec.js +1 -2
- package/e2e-legacy/ttyg/chat-list.spec.js +1 -2
- package/e2e-legacy/ttyg/chat-panel.spec.js +6 -3
- package/e2e-legacy/ttyg/clone-agent.spec.js +1 -2
- package/e2e-legacy/ttyg/create-agent.spec.js +2 -3
- package/e2e-legacy/ttyg/create-chat.spec.js +1 -2
- package/e2e-legacy/ttyg/delete-agent.spec.js +1 -2
- package/e2e-legacy/ttyg/edit-agent.spec.js +1 -2
- package/e2e-legacy/ttyg/ttyg-permission.spec.js +2 -6
- package/e2e-legacy/ttyg/ttyg-view.spec.js +1 -2
- package/e2e-security/setup/users-and-access/create-user-permissions.spec.js +16 -7
- package/e2e-security/setup/users-and-access/graphql-user.spec.js +6 -3
- package/e2e-security/setup/users-and-access/repo-admin-role.spec.js +1 -0
- package/e2e-security/setup/users-and-access/turn-on-security-and-password-change.spec.js +3 -3
- package/e2e-security/setup/users-and-access/user-and-access.spec.js +8 -8
- package/fixtures/guides/autocomplete/enable-autocomplete-guide.json +12 -0
- package/fixtures/guides/class-hierarchy/class-hierarchy-guide.json +35 -0
- package/fixtures/guides/class-relations/class-relations-guide.json +33 -0
- package/fixtures/guides/connectors/connectors-guide.json +66 -0
- package/fixtures/guides/connectors/lucene-connector-guide.json +106 -0
- package/fixtures/guides/create-repository/create-repository-guide.json +25 -0
- package/fixtures/guides/create-similarity-index/create-similarity-index-guide.json +36 -0
- package/fixtures/guides/download-guide-resource/download-guide-resource-guide.json +25 -0
- package/fixtures/guides/download-resource.ttl +629 -0
- package/fixtures/guides/ttyg/configure-agent/configure-ttyg-agent-guide.json +69 -0
- package/fixtures/guides/ttyg/conversation/ttyg-conversation-guide.json +26 -0
- package/fixtures/similarity/get-ttyg-similarity-instances.json +10 -0
- package/fixtures/ttyg/agent/get-similarity-indexes-for-another-repo.json +5 -3
- package/fixtures/ttyg/agent/get-similarity-indexes.json +17 -8
- package/fixtures/ttyg/chats/explain-response-3.json +13 -0
- package/npm-shrinkwrap.json +439 -444
- package/package.json +4 -3
- package/steps/application-steps.js +7 -5
- package/steps/class-views-steps.js +19 -7
- package/steps/explore/similarity-index-create-steps.js +5 -3
- package/steps/explore/similarity-indexes-steps.js +4 -0
- package/steps/guides/guide-dialog-steps.js +16 -0
- package/steps/guides/guide-steps.js +26 -1
- package/steps/header-steps.js +9 -0
- package/steps/home-steps.js +42 -30
- package/steps/import/import-steps.js +1 -1
- package/steps/import/import-user-data-steps.js +1 -1
- package/steps/login-steps.js +13 -4
- package/steps/main-menu-steps.js +24 -4
- package/steps/modal-dialog-steps.js +12 -1
- package/steps/repository-steps.js +54 -14
- package/steps/resource/resource-steps.js +2 -2
- package/steps/setup/acl-management-steps.js +2 -2
- package/steps/setup/autocomplete-steps.js +6 -2
- package/steps/setup/connectors-steps.js +13 -0
- package/steps/setup/namespace-steps.js +1 -1
- package/steps/setup/plugins-steps.js +1 -1
- package/steps/setup/rdf-rank-steps.js +1 -5
- package/steps/setup/user-and-access-steps.js +9 -13
- package/steps/sparql-editor-steps.js +5 -0
- package/steps/toaster-steps.js +18 -6
- package/steps/ttyg/chat-panel-steps.js +19 -1
- package/steps/ttyg/ttyg-agent-settings-modal.steps.js +42 -8
- package/steps/ttyg/ttyg-view-steps.js +6 -2
- package/steps/visual-graph-steps.js +23 -9
- package/steps/yasgui/yasgui-loader.js +3 -3
- package/steps/yasgui/yasgui-steps.js +1 -1
- package/stubs/guides/guides-stubs.js +55 -0
- package/stubs/repositories/repositories-stubs.js +151 -76
- package/stubs/similarity-index-stubs.js +4 -0
- package/stubs/yasgui/query-stubs.js +5 -1
- package/support/commands.js +2 -1
- package/support/connector-commands.js +13 -0
- package/support/e2e.js +3 -0
- package/support/repository-commands.js +9 -0
- package/support/settings-commands.js +16 -0
- package/utils/html-util.js +24 -4
- package/stubs/repositories-stub.js +0 -73
- /package/e2e-legacy/graphql/{graphql-endpoint-management-with-selected-repository.spec.jsx → graphql-endpoint-management-with-selected-repository.spec.js} +0 -0
- /package/e2e-legacy/help/guides/{star-wars-interactive-guide.js → star-wars-interactive-guide.spec.js} +0 -0
- /package/e2e-legacy/setup/sparql-template/{sparql-template-create.js → sparql-template-create.spec.js} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "graphdb-workbench-tests",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.0-RC1",
|
|
4
4
|
"description": "Cypress tests for GraphDB workbench",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"cy:open-legacy": "cypress open --config-file cypress-legacy.config.js",
|
|
11
11
|
"cy:open-security": "cypress open --config-file cypress-security.config.js",
|
|
12
12
|
"cy:open-flaky": "cypress open --config-file cypress-flaky.config.js",
|
|
13
|
+
"cy:guides": "cypress run --config-file cypress-legacy.config.js --spec \"e2e-legacy/guides/**/*.spec.js\" --browser chrome",
|
|
13
14
|
"cy:run": "npm run cy:run-legacy && cypress run",
|
|
14
15
|
"cy:run:partial": "cypress run --config-file cypress-legacy.config.js --spec \"e2e-legacy/**/jdbc-create.spec.js\" --browser chrome",
|
|
15
16
|
"cy:run-legacy": "cypress run --config-file cypress-legacy.config.js --browser chrome",
|
|
@@ -39,7 +40,7 @@
|
|
|
39
40
|
"@eslint/js": "^9.33.0",
|
|
40
41
|
"babel-loader": "^10.0.0",
|
|
41
42
|
"babel-plugin-istanbul": "^7.0.0",
|
|
42
|
-
"cypress": "
|
|
43
|
+
"cypress": "15.9.0",
|
|
43
44
|
"cypress-failed-log": "^2.10.0",
|
|
44
45
|
"cypress-file-upload": "^5.0.8",
|
|
45
46
|
"cypress-localstorage-commands": "^2.2.7",
|
|
@@ -51,7 +52,7 @@
|
|
|
51
52
|
"dotenv": "^17.0.1",
|
|
52
53
|
"eslint": "^9.33.0",
|
|
53
54
|
"eslint-plugin-cypress": "^5.1.0",
|
|
54
|
-
"globals": "^
|
|
55
|
+
"globals": "^17.1.0",
|
|
55
56
|
"minimist": "^1.2.8",
|
|
56
57
|
"mocha-junit-reporter": "^2.2.1",
|
|
57
58
|
"path-browserify": "^1.0.1"
|
|
@@ -1,24 +1,26 @@
|
|
|
1
|
+
import {ToasterSteps} from "./toaster-steps";
|
|
2
|
+
|
|
1
3
|
export class ApplicationSteps {
|
|
2
4
|
|
|
3
5
|
// notifications
|
|
4
6
|
static getNotifications() {
|
|
5
|
-
return
|
|
7
|
+
return ToasterSteps.getToast()
|
|
6
8
|
}
|
|
7
9
|
|
|
8
10
|
static getSuccessNotifications() {
|
|
9
|
-
return this.getNotifications().
|
|
11
|
+
return this.getNotifications().filter('.toast-success');
|
|
10
12
|
}
|
|
11
13
|
|
|
12
14
|
static getErrorNotifications() {
|
|
13
|
-
return this.getNotifications().
|
|
15
|
+
return this.getNotifications().filter('.toast-error');
|
|
14
16
|
}
|
|
15
17
|
|
|
16
18
|
static getInfoNotification() {
|
|
17
|
-
return this.getNotifications().
|
|
19
|
+
return this.getNotifications().filter('.toast-info');
|
|
18
20
|
}
|
|
19
21
|
|
|
20
22
|
static getWarningNotification() {
|
|
21
|
-
return this.getNotifications().
|
|
23
|
+
return this.getNotifications().filter('.toast-warning');
|
|
22
24
|
}
|
|
23
25
|
|
|
24
26
|
// navigation via main menu
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Reusable functions for interacting with graph dropdown on Class hierarchy and relationships pages.
|
|
3
3
|
*/
|
|
4
|
+
import {ToasterSteps} from "./toaster-steps";
|
|
5
|
+
import {BaseSteps} from './base-steps.js';
|
|
4
6
|
|
|
5
7
|
export const GRAPH_FILE = 'graphdb-news-dataset.zip';
|
|
6
8
|
export const ALL_GRAPHS = 'All graphs';
|
|
7
9
|
export const NEWS_GRAPH = 'http://example.org/news';
|
|
8
10
|
|
|
9
|
-
class ClassViewsSteps {
|
|
11
|
+
class ClassViewsSteps extends BaseSteps {
|
|
10
12
|
static visit() {
|
|
11
13
|
cy.visit('/hierarchy');
|
|
12
14
|
cy.window();
|
|
@@ -114,7 +116,7 @@ class ClassViewsSteps {
|
|
|
114
116
|
}
|
|
115
117
|
|
|
116
118
|
static getReturnButton() {
|
|
117
|
-
return cy.get('.
|
|
119
|
+
return cy.get('.ri-arrow-left-circle-line');
|
|
118
120
|
}
|
|
119
121
|
|
|
120
122
|
static goBack() {
|
|
@@ -130,7 +132,7 @@ class ClassViewsSteps {
|
|
|
130
132
|
}
|
|
131
133
|
|
|
132
134
|
static searchForClass() {
|
|
133
|
-
return cy.get('.toolbar-holder .icon
|
|
135
|
+
return cy.get('.toolbar-holder .search-icon').click();
|
|
134
136
|
}
|
|
135
137
|
|
|
136
138
|
static getSearchInput() {
|
|
@@ -157,7 +159,7 @@ class ClassViewsSteps {
|
|
|
157
159
|
|
|
158
160
|
static selectGraphFromDropDown(graph) {
|
|
159
161
|
cy.get('#selectGraphDropdown .dropdown-item')
|
|
160
|
-
.each(($el
|
|
162
|
+
.each(($el) => {
|
|
161
163
|
if ($el.text().trim() === graph) {
|
|
162
164
|
cy.wrap($el).click();
|
|
163
165
|
}
|
|
@@ -181,9 +183,7 @@ class ClassViewsSteps {
|
|
|
181
183
|
}
|
|
182
184
|
|
|
183
185
|
static verifyDataChangedWarning() {
|
|
184
|
-
|
|
185
|
-
.should('be.visible')
|
|
186
|
-
.and('contain', 'Repository data has changed');
|
|
186
|
+
ToasterSteps.verifyTitle('Repository data has changed');
|
|
187
187
|
}
|
|
188
188
|
|
|
189
189
|
static confirmReload() {
|
|
@@ -202,6 +202,18 @@ class ClassViewsSteps {
|
|
|
202
202
|
static getRDFClassHierarchy() {
|
|
203
203
|
return this.getExploreResults().find('.rdf-class-hierarchy');
|
|
204
204
|
}
|
|
205
|
+
|
|
206
|
+
static getClassElement(className) {
|
|
207
|
+
return this.getByTestId(`class-${className}`)
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
static selectClassElement(className) {
|
|
211
|
+
this.getClassElement(className).click({force: true});
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
static clickInstanceCountLink() {
|
|
215
|
+
this.getByTestId('instances-count-link').click();
|
|
216
|
+
}
|
|
205
217
|
}
|
|
206
218
|
|
|
207
219
|
export default ClassViewsSteps;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import {BaseSteps} from '../base-steps.js';
|
|
2
|
+
|
|
3
|
+
export class SimilarityIndexCreateSteps extends BaseSteps {
|
|
2
4
|
|
|
3
5
|
static visit() {
|
|
4
6
|
cy.visit('/similarity/index/create');
|
|
@@ -17,7 +19,7 @@ export class SimilarityIndexCreateSteps {
|
|
|
17
19
|
}
|
|
18
20
|
|
|
19
21
|
static getCreateButton() {
|
|
20
|
-
return
|
|
22
|
+
return this.getByTestId('create-similarity-index-btn');
|
|
21
23
|
}
|
|
22
24
|
|
|
23
25
|
static create() {
|
|
@@ -33,7 +35,7 @@ export class SimilarityIndexCreateSteps {
|
|
|
33
35
|
}
|
|
34
36
|
|
|
35
37
|
static getSimilarityIndexNameInput() {
|
|
36
|
-
return
|
|
38
|
+
return this.getByTestId('similarity-index-name');
|
|
37
39
|
}
|
|
38
40
|
|
|
39
41
|
static typeSimilarityIndexName(similarityIndexName) {
|
|
@@ -24,6 +24,10 @@ export class GuideDialogSteps {
|
|
|
24
24
|
return GuideDialogSteps.getFooter().find('.shepherd-button').contains('Previous');
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
+
static getCloseButton() {
|
|
28
|
+
return GuideDialogSteps.getFooter().find('.shepherd-button').contains('Close');
|
|
29
|
+
}
|
|
30
|
+
|
|
27
31
|
static clickOnNextButton(forceVisible = false) {
|
|
28
32
|
GuideDialogSteps.getNextButton().scrollIntoView().click({force: forceVisible});
|
|
29
33
|
}
|
|
@@ -32,7 +36,19 @@ export class GuideDialogSteps {
|
|
|
32
36
|
GuideDialogSteps.getPreviousButton().scrollIntoView().click({force: forceVisible});
|
|
33
37
|
}
|
|
34
38
|
|
|
39
|
+
static clickOnCloseButton() {
|
|
40
|
+
GuideDialogSteps.getCloseButton().scrollIntoView().click();
|
|
41
|
+
}
|
|
42
|
+
|
|
35
43
|
static assertDialogWithTitleIsVisible(text) {
|
|
36
44
|
GuideDialogSteps.getHeader().contains(text);
|
|
37
45
|
}
|
|
46
|
+
|
|
47
|
+
static assertDialogWithContentIsVisible(text) {
|
|
48
|
+
GuideDialogSteps.getContent().should('contain.text', text);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
static assertDialogIsClosed() {
|
|
52
|
+
GuideDialogSteps.getModalDialog().should('not.exist');
|
|
53
|
+
}
|
|
38
54
|
}
|
|
@@ -14,7 +14,15 @@ export class GuideSteps extends BaseSteps {
|
|
|
14
14
|
static runGuide(guideName) {
|
|
15
15
|
cy.contains('td', guideName)
|
|
16
16
|
.parent()
|
|
17
|
-
.within(
|
|
17
|
+
.within(() => {
|
|
18
|
+
cy.get('.btn').click();
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
static runFirstGuide() {
|
|
23
|
+
cy.get('tbody tr')
|
|
24
|
+
.first()
|
|
25
|
+
.within(() => {
|
|
18
26
|
cy.get('.btn').click();
|
|
19
27
|
});
|
|
20
28
|
}
|
|
@@ -31,6 +39,10 @@ export class GuideSteps extends BaseSteps {
|
|
|
31
39
|
cy.get('.shepherd-modal-is-visible');
|
|
32
40
|
}
|
|
33
41
|
|
|
42
|
+
static getModalOverlay() {
|
|
43
|
+
return cy.get('.shepherd-modal-overlay-container');
|
|
44
|
+
}
|
|
45
|
+
|
|
34
46
|
static assertWelcomePage(guideName) {
|
|
35
47
|
GuideDialogSteps.assertDialogWithTitleIsVisible(`Welcome to ${guideName} — 2/2`);
|
|
36
48
|
GuideSteps.assertPageNotInteractive();
|
|
@@ -278,6 +290,19 @@ export class GuideSteps extends BaseSteps {
|
|
|
278
290
|
static verifyInitialState() {
|
|
279
291
|
this.getGuidesPerPageBar().should('be.visible');
|
|
280
292
|
this.getGuidesPaginator().should('exist');
|
|
293
|
+
this.verifyGuidesListExists('be.visible');
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
static verifyGuidesListExists() {
|
|
281
297
|
this.getGuidesList().should('be.visible');
|
|
282
298
|
}
|
|
299
|
+
|
|
300
|
+
static getDownloadResourceLink(guideRepositoryId) {
|
|
301
|
+
const downloadButtonClass = guideRepositoryId ? `.guide-${guideRepositoryId}-download-resource-link` : '.guide-download-resource-link';
|
|
302
|
+
return cy.get(downloadButtonClass);
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
static downloadResource(guideRepositoryId) {
|
|
306
|
+
GuideSteps.getDownloadResourceLink(guideRepositoryId).click();
|
|
307
|
+
}
|
|
283
308
|
}
|
package/steps/home-steps.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {LicenseWidgetSteps} from
|
|
2
|
-
import {RepositoryErrorsWidgetSteps} from
|
|
3
|
-
import {ActiveRepositoryWidgetSteps} from
|
|
4
|
-
import {SavedSparqlQueriesWidgetSteps} from
|
|
5
|
-
import {RepositorySteps} from
|
|
6
|
-
import {BaseSteps} from
|
|
7
|
-
import {EnvironmentStubs} from
|
|
1
|
+
import {LicenseWidgetSteps} from './widgets/license-widget-steps';
|
|
2
|
+
import {RepositoryErrorsWidgetSteps} from './widgets/repository-errors-widget-steps';
|
|
3
|
+
import {ActiveRepositoryWidgetSteps} from './widgets/active-repository-widget-steps';
|
|
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';
|
|
8
8
|
|
|
9
9
|
class HomeSteps extends BaseSteps {
|
|
10
10
|
|
|
@@ -34,8 +34,16 @@ class HomeSteps extends BaseSteps {
|
|
|
34
34
|
return cy.get('.ot-loader-new-content').should('not.exist');
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
+
static visitWithRepositoryInUrl(repositoryId) {
|
|
38
|
+
cy.visit(`/?repositoryId=${repositoryId}`);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
static getLayout() {
|
|
42
|
+
return cy.get('.wb-layout');
|
|
43
|
+
}
|
|
44
|
+
|
|
37
45
|
static getView() {
|
|
38
|
-
|
|
46
|
+
return cy.get('#wb-home');
|
|
39
47
|
}
|
|
40
48
|
|
|
41
49
|
static getTutorialPanel() {
|
|
@@ -43,19 +51,19 @@ class HomeSteps extends BaseSteps {
|
|
|
43
51
|
}
|
|
44
52
|
|
|
45
53
|
static hideTutorial() {
|
|
46
|
-
|
|
54
|
+
this.getTutorialPanel().find('.decline-tutorial').click();
|
|
47
55
|
}
|
|
48
56
|
|
|
49
57
|
static showTutorialPanel() {
|
|
50
|
-
|
|
58
|
+
this.getView().find('.show-tutorial').click();
|
|
51
59
|
}
|
|
52
60
|
|
|
53
61
|
static getNavigationMenu() {
|
|
54
|
-
|
|
62
|
+
return this.getLayout().find('.wb-navbar');
|
|
55
63
|
}
|
|
56
64
|
|
|
57
65
|
static getPageHeader() {
|
|
58
|
-
|
|
66
|
+
return this.getLayout().find('.wb-header');
|
|
59
67
|
}
|
|
60
68
|
|
|
61
69
|
// ===========================
|
|
@@ -63,7 +71,7 @@ class HomeSteps extends BaseSteps {
|
|
|
63
71
|
// ===========================
|
|
64
72
|
|
|
65
73
|
static getRDFSearchButton() {
|
|
66
|
-
|
|
74
|
+
return this.getPageHeader().find('.rdf-search-button i');
|
|
67
75
|
}
|
|
68
76
|
|
|
69
77
|
// ===========================
|
|
@@ -71,11 +79,11 @@ class HomeSteps extends BaseSteps {
|
|
|
71
79
|
// ===========================
|
|
72
80
|
|
|
73
81
|
static getRepositorySelector() {
|
|
74
|
-
|
|
82
|
+
return this.getPageHeader().find('onto-repository-selector');
|
|
75
83
|
}
|
|
76
84
|
|
|
77
85
|
static getSelectedRepository() {
|
|
78
|
-
|
|
86
|
+
return this.getRepositorySelector().find('.onto-dropdown-button');
|
|
79
87
|
}
|
|
80
88
|
|
|
81
89
|
// ===========================
|
|
@@ -83,11 +91,11 @@ class HomeSteps extends BaseSteps {
|
|
|
83
91
|
// ===========================
|
|
84
92
|
|
|
85
93
|
static getLanguageSelector() {
|
|
86
|
-
|
|
94
|
+
return this.getPageHeader().find('onto-language-selector');
|
|
87
95
|
}
|
|
88
96
|
|
|
89
97
|
static getSelectedLanguage() {
|
|
90
|
-
|
|
98
|
+
return this.getLanguageSelector().find('.onto-dropdown-button');
|
|
91
99
|
}
|
|
92
100
|
|
|
93
101
|
// ===========================
|
|
@@ -95,7 +103,7 @@ class HomeSteps extends BaseSteps {
|
|
|
95
103
|
// ===========================
|
|
96
104
|
|
|
97
105
|
static getActiveRepositoryWidget() {
|
|
98
|
-
|
|
106
|
+
return ActiveRepositoryWidgetSteps.getWidget();
|
|
99
107
|
}
|
|
100
108
|
|
|
101
109
|
// ===========================
|
|
@@ -103,7 +111,7 @@ class HomeSteps extends BaseSteps {
|
|
|
103
111
|
// ===========================
|
|
104
112
|
|
|
105
113
|
static getLicenseWidget() {
|
|
106
|
-
|
|
114
|
+
return LicenseWidgetSteps.getWidget();
|
|
107
115
|
}
|
|
108
116
|
|
|
109
117
|
// ===========================
|
|
@@ -111,7 +119,7 @@ class HomeSteps extends BaseSteps {
|
|
|
111
119
|
// ===========================
|
|
112
120
|
|
|
113
121
|
static getRepositoryErrorsWidget() {
|
|
114
|
-
|
|
122
|
+
return RepositoryErrorsWidgetSteps.getWidget();
|
|
115
123
|
}
|
|
116
124
|
|
|
117
125
|
// ===========================
|
|
@@ -119,7 +127,7 @@ class HomeSteps extends BaseSteps {
|
|
|
119
127
|
// ===========================
|
|
120
128
|
|
|
121
129
|
static getSavedSparqlQueriesWidget() {
|
|
122
|
-
|
|
130
|
+
return SavedSparqlQueriesWidgetSteps.getWidget();
|
|
123
131
|
}
|
|
124
132
|
|
|
125
133
|
// ===========================
|
|
@@ -127,22 +135,25 @@ class HomeSteps extends BaseSteps {
|
|
|
127
135
|
// ===========================
|
|
128
136
|
|
|
129
137
|
static getPageFooter() {
|
|
130
|
-
|
|
138
|
+
return cy.get('.footer-component');
|
|
131
139
|
}
|
|
132
140
|
|
|
133
141
|
// ==========================
|
|
134
142
|
|
|
135
143
|
static selectSPARQLQueryToExecute(query) {
|
|
136
144
|
cy.contains('ul.saved-queries li', query)
|
|
137
|
-
.
|
|
138
|
-
.
|
|
145
|
+
.as('savedQueryItem')
|
|
146
|
+
.scrollIntoView();
|
|
147
|
+
|
|
148
|
+
cy.get('@savedQueryItem')
|
|
149
|
+
.should('be.visible');
|
|
139
150
|
|
|
140
151
|
cy.get('@savedQueryItem')
|
|
141
152
|
.trigger('hover');
|
|
142
153
|
|
|
143
154
|
cy.get('@savedQueryItem')
|
|
144
155
|
.find('.execute-saved-query')
|
|
145
|
-
.click({
|
|
156
|
+
.click({force: true});
|
|
146
157
|
}
|
|
147
158
|
|
|
148
159
|
|
|
@@ -189,12 +200,12 @@ class HomeSteps extends BaseSteps {
|
|
|
189
200
|
}
|
|
190
201
|
|
|
191
202
|
static verifyCreateRepositoryLink() {
|
|
192
|
-
cy.get('.card.repository-errors').should(
|
|
203
|
+
cy.get('.card.repository-errors').should('be.visible')
|
|
193
204
|
.within(() => {
|
|
194
205
|
HomeSteps.getCreateRepositoryLink()
|
|
195
206
|
.click()
|
|
196
207
|
.url()
|
|
197
|
-
.should('eq', Cypress.config(
|
|
208
|
+
.should('eq', Cypress.config('baseUrl') + '/repository/create?previous=%2F');
|
|
198
209
|
});
|
|
199
210
|
cy.get('.big-logo').click();
|
|
200
211
|
}
|
|
@@ -216,7 +227,7 @@ class HomeSteps extends BaseSteps {
|
|
|
216
227
|
}
|
|
217
228
|
|
|
218
229
|
static shouldHaveAutocompleteResult(uri) {
|
|
219
|
-
return HomeSteps.getAutocompleteResultElement(uri).should(
|
|
230
|
+
return HomeSteps.getAutocompleteResultElement(uri).should('be.visible');
|
|
220
231
|
}
|
|
221
232
|
|
|
222
233
|
static autocompleteText(text, uri) {
|
|
@@ -231,8 +242,8 @@ class HomeSteps extends BaseSteps {
|
|
|
231
242
|
}
|
|
232
243
|
|
|
233
244
|
static verifyAutocompleteResourceLink(uri) {
|
|
234
|
-
cy.get('#results-loader.ot-loader').should('not.exist');
|
|
235
|
-
cy.get('.resource-info').should('be.visible').and(
|
|
245
|
+
cy.get('#results-loader.ot-loader-new-content').should('not.exist');
|
|
246
|
+
cy.get('.resource-info').should('be.visible').and('contain', uri);
|
|
236
247
|
}
|
|
237
248
|
|
|
238
249
|
static getAutocompleteButton(type) {
|
|
@@ -338,4 +349,5 @@ class HomeSteps extends BaseSteps {
|
|
|
338
349
|
return cy.get('[guide-selector="sub-menu-support"]');
|
|
339
350
|
}
|
|
340
351
|
}
|
|
352
|
+
|
|
341
353
|
export default HomeSteps;
|
package/steps/login-steps.js
CHANGED
|
@@ -7,17 +7,26 @@ export class LoginSteps {
|
|
|
7
7
|
|
|
8
8
|
static visitInProdMode() {
|
|
9
9
|
cy.visit('/login', {
|
|
10
|
-
onBeforeLoad: (
|
|
10
|
+
onBeforeLoad: () => {
|
|
11
11
|
EnvironmentStubs.stubWbProdMode();
|
|
12
12
|
}
|
|
13
13
|
});
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
+
static visitLoginPageWithReturnUrl(returnURL) {
|
|
17
|
+
const returnURLEncoded = encodeURIComponent(returnURL);
|
|
18
|
+
cy.visit(`/login?r=${returnURLEncoded}`);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
static navigateToLoginPage() {
|
|
22
|
+
cy.get('onto-user-login').click();
|
|
23
|
+
}
|
|
24
|
+
|
|
16
25
|
static loginWithUser(username, password) {
|
|
17
26
|
cy.get('.login-form').should('be.visible');
|
|
18
|
-
cy.
|
|
19
|
-
cy.
|
|
20
|
-
cy.
|
|
27
|
+
cy.getByTestId('username-input').type(username);
|
|
28
|
+
cy.getByTestId('password-input').type(password);
|
|
29
|
+
cy.getByTestId('submit-btn').click();
|
|
21
30
|
}
|
|
22
31
|
|
|
23
32
|
static logout() {
|
package/steps/main-menu-steps.js
CHANGED
|
@@ -4,10 +4,6 @@ export class MainMenuSteps {
|
|
|
4
4
|
return cy.get('onto-navbar');
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
static openHomePage() {
|
|
8
|
-
MainMenuSteps.getMainMenu().find('.home-page').click();
|
|
9
|
-
}
|
|
10
|
-
|
|
11
7
|
static getMenuButton(menuName) {
|
|
12
8
|
return MainMenuSteps.getMainMenu().find('.menu-element').contains(menuName);
|
|
13
9
|
}
|
|
@@ -90,6 +86,10 @@ export class MainMenuSteps {
|
|
|
90
86
|
|
|
91
87
|
static clickOnClassHierarchy() {
|
|
92
88
|
this.clickOnExplore();
|
|
89
|
+
this.clickOnSubmenuClassHierarchy();
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
static clickOnSubmenuClassHierarchy() {
|
|
93
93
|
this.getSubMenuButton('menu-class-hierarchy').click();
|
|
94
94
|
}
|
|
95
95
|
|
|
@@ -100,6 +100,10 @@ export class MainMenuSteps {
|
|
|
100
100
|
|
|
101
101
|
static clickOnClassRelationships() {
|
|
102
102
|
this.clickOnExplore();
|
|
103
|
+
this.clickOnSubmenuClassRelationships();
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
static clickOnSubmenuClassRelationships() {
|
|
103
107
|
this.getSubMenuButton('sub-menu-class-relationships').click();
|
|
104
108
|
}
|
|
105
109
|
|
|
@@ -108,6 +112,10 @@ export class MainMenuSteps {
|
|
|
108
112
|
this.getSubMenuButton('sub-menu-similarity').click();
|
|
109
113
|
}
|
|
110
114
|
|
|
115
|
+
static clickOnSubmenuSimilarity() {
|
|
116
|
+
this.getSubMenuButton('sub-menu-similarity').click();
|
|
117
|
+
}
|
|
118
|
+
|
|
111
119
|
// --------------------------
|
|
112
120
|
// -- Monitoring menu --
|
|
113
121
|
// --------------------------
|
|
@@ -148,6 +156,10 @@ export class MainMenuSteps {
|
|
|
148
156
|
|
|
149
157
|
static clickOnRepositories() {
|
|
150
158
|
this.clickOnMenuSetup();
|
|
159
|
+
this.clickOnRepositoriesSubmenu();
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
static clickOnRepositoriesSubmenu() {
|
|
151
163
|
this.getSubMenuButton('sub-menu-repositories').click();
|
|
152
164
|
}
|
|
153
165
|
|
|
@@ -193,6 +205,10 @@ export class MainMenuSteps {
|
|
|
193
205
|
|
|
194
206
|
static clickOnAutocomplete() {
|
|
195
207
|
this.clickOnMenuSetup();
|
|
208
|
+
this.clickOnSubmenuAutocomplete();
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
static clickOnSubmenuAutocomplete() {
|
|
196
212
|
this.getSubmenuAutocomplete().click();
|
|
197
213
|
}
|
|
198
214
|
|
|
@@ -251,6 +267,10 @@ export class MainMenuSteps {
|
|
|
251
267
|
|
|
252
268
|
static clickOnTTYG() {
|
|
253
269
|
this.clickOnMenuLab();
|
|
270
|
+
this.clickOnTTYGSubmenu()
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
static clickOnTTYGSubmenu() {
|
|
254
274
|
this.getSubMenuButton('sub-menu-ttyg').click();
|
|
255
275
|
}
|
|
256
276
|
|
|
@@ -1,8 +1,19 @@
|
|
|
1
|
-
|
|
1
|
+
import {BaseSteps} from "./base-steps.js";
|
|
2
|
+
|
|
3
|
+
export class ModalDialogSteps extends BaseSteps {
|
|
2
4
|
static getDialog(cssClass = '.modal-dialog') {
|
|
3
5
|
return cy.get(cssClass);
|
|
4
6
|
}
|
|
5
7
|
|
|
8
|
+
/**
|
|
9
|
+
* Get the modal alert element. Modal alerts is also a modal dialog, but it has a modal-alert class on the main div
|
|
10
|
+
* which is parent of modal-dialog.
|
|
11
|
+
* @returns {Cypress.Chainable<JQuery<HTMLElement>>}
|
|
12
|
+
*/
|
|
13
|
+
static getModalAlert() {
|
|
14
|
+
return cy.get('.modal-alert');
|
|
15
|
+
}
|
|
16
|
+
|
|
6
17
|
static getDialogHeader() {
|
|
7
18
|
return ModalDialogSteps.getDialog().find('.modal-header');
|
|
8
19
|
}
|