graphdb-workbench-tests 4.0.0-TR24 → 4.0.0-TR25
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/monitor/query-and-updates/queries-and-updates-with-repository.spec.js +16 -0
- package/fixtures/monitoring/get-active-queries-cluster-replicating.json +15 -0
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/steps/application-steps.js +4 -0
- package/steps/monitoring/queries-and-updates-steps.js +9 -0
- package/stubs/monitoring/queries-and-updates-stubs.js +5 -0
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import HomeSteps from "../../../steps/home-steps";
|
|
2
2
|
import {MainMenuSteps} from "../../../steps/main-menu-steps";
|
|
3
3
|
import {QueriesAndUpdatesSteps} from "../../../steps/monitoring/queries-and-updates-steps";
|
|
4
|
+
import {ApplicationSteps} from "../../../steps/application-steps";
|
|
5
|
+
import {QueriesAndUpdatesStubs} from "../../../stubs/monitoring/queries-and-updates-stubs";
|
|
4
6
|
|
|
5
7
|
describe('Queries and Updates with selected repository', () => {
|
|
6
8
|
let repositoryId;
|
|
@@ -30,6 +32,20 @@ describe('Queries and Updates with selected repository', () => {
|
|
|
30
32
|
verifyInitialStateWithSelectedRepository();
|
|
31
33
|
});
|
|
32
34
|
|
|
35
|
+
it('should not allow aborting an update while it is replicated to the cluster', () => {
|
|
36
|
+
// Given an update is being replicated to the cluster
|
|
37
|
+
QueriesAndUpdatesStubs.stubGetActiveQueries(repositoryId, '/monitoring/get-active-queries-cluster-replicating.json');
|
|
38
|
+
// When I open the Queries and Updates page
|
|
39
|
+
QueriesAndUpdatesSteps.visit();
|
|
40
|
+
cy.wait('@getActiveQueries');
|
|
41
|
+
|
|
42
|
+
// Then I expect Abort to be disabled
|
|
43
|
+
QueriesAndUpdatesSteps.getAbortButtons().eq(0).should('be.disabled');
|
|
44
|
+
// And its popover to say why
|
|
45
|
+
QueriesAndUpdatesSteps.hoverAbortButton(0);
|
|
46
|
+
ApplicationSteps.getPopover().should('contain.text', 'Update cannot be aborted while being replicated to the cluster');
|
|
47
|
+
});
|
|
48
|
+
|
|
33
49
|
const verifyInitialStateWithSelectedRepository = () => {
|
|
34
50
|
QueriesAndUpdatesSteps.getQueryAndUpdatePage().should('be.visible');
|
|
35
51
|
QueriesAndUpdatesSteps.getPauseButton().should('be.visible');
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"trackId": "42",
|
|
4
|
+
"trackAlias": "",
|
|
5
|
+
"username": "admin",
|
|
6
|
+
"node": "http://localhost:7200/repositories/cluster-repository#42",
|
|
7
|
+
"isRequestedToStop": false,
|
|
8
|
+
"sparqlString": "INSERT DATA { <urn:a> <urn:b> <urn:c> }",
|
|
9
|
+
"state": "FOLLOWER_COMMIT",
|
|
10
|
+
"type": "UPDATE",
|
|
11
|
+
"numberOfOperations": 3,
|
|
12
|
+
"msSinceCreated": 1200,
|
|
13
|
+
"humanLifetime": "1s"
|
|
14
|
+
}
|
|
15
|
+
]
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "graphdb-workbench-tests",
|
|
3
|
-
"version": "4.0.0-
|
|
3
|
+
"version": "4.0.0-TR25",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "graphdb-workbench-tests",
|
|
9
|
-
"version": "4.0.0-
|
|
9
|
+
"version": "4.0.0-TR25",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"devDependencies": {
|
|
12
12
|
"@bahmutov/cypress-code-coverage": "^2.7.2",
|
package/package.json
CHANGED
|
@@ -23,6 +23,10 @@ export class ApplicationSteps {
|
|
|
23
23
|
return this.getNotifications().filter('.toast-warning');
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
+
static getPopover() {
|
|
27
|
+
return cy.get('.popover');
|
|
28
|
+
}
|
|
29
|
+
|
|
26
30
|
// navigation via main menu
|
|
27
31
|
static openImportPage() {
|
|
28
32
|
cy.get('onto-navbar .menu-element').eq(0).click();
|
|
@@ -14,6 +14,15 @@ export class QueriesAndUpdatesSteps extends BaseSteps {
|
|
|
14
14
|
return this.getQueryAndUpdatePage().getByTestId('pause-button');
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
+
static getAbortButtons() {
|
|
18
|
+
return this.getQueryAndUpdatePage().getByTestId('monitoring-queries-abort-button');
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// A real hover: the popover's jQuery mouseenter handler ignores a synthetic mouseenter.
|
|
22
|
+
static hoverAbortButton(index) {
|
|
23
|
+
this.getQueryAndUpdatePage().getByTestId('monitoring-queries-abort-popover-trigger').eq(index).realHover();
|
|
24
|
+
}
|
|
25
|
+
|
|
17
26
|
static getNoRunningQueriesOrUpdates() {
|
|
18
27
|
return this.getQueryAndUpdatePage().getByTestId('no-running-queries-or-updates-alert');
|
|
19
28
|
}
|