graphdb-workbench-tests 3.0.0-TR8 → 3.0.0-TR9
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/fixtures/locale-en.json +101 -6
- package/fixtures/ttyg/agent/get-agent-list-autocomplete-query.json +23 -0
- package/fixtures/ttyg/autocomplete-response.json +154 -0
- package/integration/graphql/edit-graphql-enpoint.spec.js +0 -5
- package/integration/graphql/graphql-set-default-endpoint.spec.js +42 -0
- package/integration/sparql-editor/saved-query/readonly-query.spec.js +7 -1
- package/integration/ttyg/edit-agent.spec.js +45 -0
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/steps/graphql/graphql-endpoint-management-steps.js +10 -1
- package/steps/ttyg/ttyg-agent-settings-modal.steps.js +44 -0
- package/stubs/ttyg/ttyg-stubs.js +7 -0
package/fixtures/locale-en.json
CHANGED
|
@@ -589,8 +589,28 @@
|
|
|
589
589
|
"method": {
|
|
590
590
|
"iri_discovery_search": {
|
|
591
591
|
"label": "Full-text search in labels for IRI discovery",
|
|
592
|
-
"tooltip": "Helps the model discover the IRIs for a particular incomplete query, for example the name Michael in
|
|
592
|
+
"tooltip": "Helps the model discover the IRIs (using FTS) for a particular incomplete query, for example the name Michael in \"What's Michael's phone number?\""
|
|
593
|
+
},
|
|
594
|
+
"autocomplete_iri_discovery_search": {
|
|
595
|
+
"label": "Autocomplete for IRI discovery",
|
|
596
|
+
"tooltip": "Helps the model discover the IRIs (using autocomplete) for a particular incomplete query, for example the name Michael in \"What's Michael's phone number?\"",
|
|
597
|
+
"btn": {
|
|
598
|
+
"reload": {
|
|
599
|
+
"tooltip": "Refresh the autocomplete index"
|
|
600
|
+
}
|
|
601
|
+
}
|
|
593
602
|
}
|
|
603
|
+
},
|
|
604
|
+
"autocomplete_disabled_message": "You must <a href=\"{{autocompleteIndexPage}}\" target=\"_blank\">enable the Autocomplete index</a> on chosen repository to use this method",
|
|
605
|
+
"autocomplete_max_number_of_results_per_call": {
|
|
606
|
+
"label": "Max number of results (IRIs) per call",
|
|
607
|
+
"placeholder": "Automatic value",
|
|
608
|
+
"tooltip": "Limit the maximum number of IRIs. The default value is automatic and determined at runtime. If not sure, leave the default value."
|
|
609
|
+
},
|
|
610
|
+
"autocomplete_search_predicates": {
|
|
611
|
+
"label": "Search predicates",
|
|
612
|
+
"placeholder": "Search labels",
|
|
613
|
+
"tooltip": "Enter one or more predicates to use for label search with autocomplete."
|
|
594
614
|
}
|
|
595
615
|
}
|
|
596
616
|
},
|
|
@@ -787,6 +807,9 @@
|
|
|
787
807
|
"export_schema": {
|
|
788
808
|
"label": "Export schema definition",
|
|
789
809
|
"tooltip": "Export the GraphQL endpoint schema definition"
|
|
810
|
+
},
|
|
811
|
+
"set_as_default": {
|
|
812
|
+
"success": "Successfully set \"{{endpointId}}\" endpoint as default"
|
|
790
813
|
}
|
|
791
814
|
},
|
|
792
815
|
"messages": {
|
|
@@ -796,6 +819,13 @@
|
|
|
796
819
|
"labels": {
|
|
797
820
|
"description": "Description"
|
|
798
821
|
}
|
|
822
|
+
},
|
|
823
|
+
"endpoint_configuration_modal": {
|
|
824
|
+
"title": "Configure GraphQL endpoint",
|
|
825
|
+
"messages": {
|
|
826
|
+
"error_saving_configuration": "Error saving endpoint configuration",
|
|
827
|
+
"success_saving_configuration": "Endpoint configuration saved"
|
|
828
|
+
}
|
|
799
829
|
}
|
|
800
830
|
},
|
|
801
831
|
"create_endpoint": {
|
|
@@ -806,7 +836,7 @@
|
|
|
806
836
|
}
|
|
807
837
|
},
|
|
808
838
|
"wizard_steps": {
|
|
809
|
-
"
|
|
839
|
+
"select_schema_sources": {
|
|
810
840
|
"title": "Select schema source",
|
|
811
841
|
"source_type": {
|
|
812
842
|
"graphql_schema_shapes": {
|
|
@@ -819,7 +849,8 @@
|
|
|
819
849
|
"graphql_schema_shapes": {
|
|
820
850
|
"title": "GraphQL schema shapes",
|
|
821
851
|
"messages": {
|
|
822
|
-
"
|
|
852
|
+
"loading_graphql_shapes": "Loading GraphQL schema shapes...",
|
|
853
|
+
"no_schemas": "No GraphQL schema shapes were found in the selected repository. You can browse other repositories or change the source.",
|
|
823
854
|
"endpoint_per_shape": "Each GraphQL schema shape results in one endpoint"
|
|
824
855
|
}
|
|
825
856
|
},
|
|
@@ -846,17 +877,22 @@
|
|
|
846
877
|
"use_all_graphs": {
|
|
847
878
|
"label": "Use all graphs",
|
|
848
879
|
"messages": {
|
|
849
|
-
"all_graphs": "All {{count}} graphs are included for endpoint creation"
|
|
880
|
+
"all_graphs": "All {{count}} graphs are included for endpoint creation",
|
|
881
|
+
"no_graphs": "No graphs were found in the selected repository."
|
|
850
882
|
}
|
|
851
883
|
},
|
|
852
884
|
"use_shacl_shape_graph": {
|
|
853
885
|
"label": "Use SHACL shape graph",
|
|
854
886
|
"messages": {
|
|
855
|
-
"all_shacl_shape_graphs": "All {{count}} SHACL shape graphs are included for endpoint creation"
|
|
887
|
+
"all_shacl_shape_graphs": "All {{count}} SHACL shape graphs are included for endpoint creation",
|
|
888
|
+
"no_graphs": "No SHACL shape graphs were found in the selected repository."
|
|
856
889
|
}
|
|
857
890
|
},
|
|
858
891
|
"pick_graphs": {
|
|
859
|
-
"label": "Select one or more graphs"
|
|
892
|
+
"label": "Select one or more graphs",
|
|
893
|
+
"messages": {
|
|
894
|
+
"no_graphs": "No graphs were found in the selected repository."
|
|
895
|
+
}
|
|
860
896
|
}
|
|
861
897
|
},
|
|
862
898
|
"messages": {
|
|
@@ -871,6 +907,58 @@
|
|
|
871
907
|
"form": {}
|
|
872
908
|
}
|
|
873
909
|
},
|
|
910
|
+
"shapes_multiselect": {
|
|
911
|
+
"available_options": {
|
|
912
|
+
"title": "Available (not included)",
|
|
913
|
+
"filter_placeholder": "Filter to select specific shapes"
|
|
914
|
+
},
|
|
915
|
+
"selected_options": {
|
|
916
|
+
"title": "Included for generation",
|
|
917
|
+
"count": "{{count}} GraphQL schema shapes included"
|
|
918
|
+
},
|
|
919
|
+
"actions": {
|
|
920
|
+
"add": {
|
|
921
|
+
"tooltip": "Add the shape to the list of included shapes"
|
|
922
|
+
},
|
|
923
|
+
"add_all": {
|
|
924
|
+
"label": "Add all",
|
|
925
|
+
"tooltip": "Add all shapes to the list of included shapes"
|
|
926
|
+
},
|
|
927
|
+
"remove": {
|
|
928
|
+
"tooltip": "Remove the shape from the list of included shapes"
|
|
929
|
+
},
|
|
930
|
+
"remove_all": {
|
|
931
|
+
"label": "Remove all",
|
|
932
|
+
"tooltip": "Remove all shapes from the list of included shapes"
|
|
933
|
+
}
|
|
934
|
+
}
|
|
935
|
+
},
|
|
936
|
+
"graphs_multiselect": {
|
|
937
|
+
"available_options": {
|
|
938
|
+
"title": "Available (not included)",
|
|
939
|
+
"filter_placeholder": "Filter to select specific graphs"
|
|
940
|
+
},
|
|
941
|
+
"selected_options": {
|
|
942
|
+
"title": "Included for generation",
|
|
943
|
+
"count": "{{count}} SHACL shape graphs are included"
|
|
944
|
+
},
|
|
945
|
+
"actions": {
|
|
946
|
+
"add": {
|
|
947
|
+
"tooltip": "Add the graph to the list of included graphs"
|
|
948
|
+
},
|
|
949
|
+
"add_all": {
|
|
950
|
+
"label": "Add all",
|
|
951
|
+
"tooltip": "Add all graphs to the list of included graphs"
|
|
952
|
+
},
|
|
953
|
+
"remove": {
|
|
954
|
+
"tooltip": "Remove the graph from the list of included graphs"
|
|
955
|
+
},
|
|
956
|
+
"remove_all": {
|
|
957
|
+
"label": "Remove all",
|
|
958
|
+
"tooltip": "Remove all graphs from the list of included graphs"
|
|
959
|
+
}
|
|
960
|
+
}
|
|
961
|
+
},
|
|
874
962
|
"actions": {
|
|
875
963
|
"next": {
|
|
876
964
|
"label": "Next"
|
|
@@ -890,6 +978,12 @@
|
|
|
890
978
|
"label": "Generate"
|
|
891
979
|
}
|
|
892
980
|
}
|
|
981
|
+
},
|
|
982
|
+
"messages": {
|
|
983
|
+
"source_repository_changed": {
|
|
984
|
+
"title": "Confirm source repository change",
|
|
985
|
+
"body": "Changing the source repository may affect your current setup and data. Are you sure you want to proceed?"
|
|
986
|
+
}
|
|
893
987
|
}
|
|
894
988
|
}
|
|
895
989
|
},
|
|
@@ -2064,6 +2158,7 @@
|
|
|
2064
2158
|
"common.error": "Error",
|
|
2065
2159
|
"common.warning": "Warning",
|
|
2066
2160
|
"common.loading": "Loading...",
|
|
2161
|
+
"common.select": "Select...",
|
|
2067
2162
|
"common.on.btn": "ON",
|
|
2068
2163
|
"common.off.btn": "OFF",
|
|
2069
2164
|
"common.search.btn": "Search",
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"id": "asst_G8EtHyT8kAGeDmCa3Nh6y74v",
|
|
4
|
+
"name": "Test autocomplete extraction agent",
|
|
5
|
+
"model": "gpt-4o",
|
|
6
|
+
"temperature": 0.7,
|
|
7
|
+
"topP": 1.0,
|
|
8
|
+
"repositoryId": "starwars",
|
|
9
|
+
"instructions": {
|
|
10
|
+
"systemInstruction": null,
|
|
11
|
+
"userInstruction": null
|
|
12
|
+
},
|
|
13
|
+
"assistantExtractionMethods": [
|
|
14
|
+
{
|
|
15
|
+
"method": "sparql_search",
|
|
16
|
+
"ontologyGraph": null,
|
|
17
|
+
"sparqlQuery": "CONSTRUCT {\n ?s ?p ?o\n} WHERE {\n GRAPH <http://example.com/sw-ont> {\n ?s ?p ?o\n }\n}",
|
|
18
|
+
"addMissingNamespaces": false
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"additionalExtractionMethods": []
|
|
22
|
+
}
|
|
23
|
+
]
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
{
|
|
2
|
+
"suggestions": [
|
|
3
|
+
{
|
|
4
|
+
"type": "prefix",
|
|
5
|
+
"value": "rep",
|
|
6
|
+
"description": "PREFIX <b>re</b>p: <http://www.openrdf.org/config/repository#>"
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"type": "uri",
|
|
10
|
+
"value": "http://www.w3.org/2006/vcard/ns#rev",
|
|
11
|
+
"description": "http://www.w3.org/2006/vcard/ns#<b>re</b>v"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"type": "uri",
|
|
15
|
+
"value": "https://swapi.co/resource/human/85",
|
|
16
|
+
"description": "<b>Re</b>y <https://swapi.co/resource/human/85>"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"type": "uri",
|
|
20
|
+
"value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#rest",
|
|
21
|
+
"description": "http://www.w3.org/1999/02/22-rdf-syntax-ns#<b>re</b>st"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"type": "uri",
|
|
25
|
+
"value": "http://www.w3.org/ns/odrl/2/read",
|
|
26
|
+
"description": "http://www.w3.org/ns/odrl/2/<b>re</b>ad"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"type": "uri",
|
|
30
|
+
"value": "http://spinrdf.org/sp#regex",
|
|
31
|
+
"description": "http://spinrdf.org/sp#<b>re</b>gex"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"type": "uri",
|
|
35
|
+
"value": "http://www.w3.org/ns/shacl#result",
|
|
36
|
+
"description": "http://www.w3.org/ns/shacl#<b>re</b>sult"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"type": "uri",
|
|
40
|
+
"value": "http://www.w3.org/ns/earl#result",
|
|
41
|
+
"description": "http://www.w3.org/ns/earl#<b>re</b>sult"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"type": "uri",
|
|
45
|
+
"value": "http://www.w3.org/ns/odrl/2/remedy",
|
|
46
|
+
"description": "http://www.w3.org/ns/odrl/2/<b>re</b>medy"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"type": "uri",
|
|
50
|
+
"value": "http://www.opengis.net/def/function/geosparql/relate",
|
|
51
|
+
"description": "http://www.opengis.net/def/function/geosparql/<b>re</b>late"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"type": "uri",
|
|
55
|
+
"value": "http://www.w3.org/2006/vcard/ns#region",
|
|
56
|
+
"description": "http://www.w3.org/2006/vcard/ns#<b>re</b>gion"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"type": "uri",
|
|
60
|
+
"value": "http://www.w3.org/ns/dcat#record",
|
|
61
|
+
"description": "http://www.w3.org/ns/dcat#<b>re</b>cord"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"type": "uri",
|
|
65
|
+
"value": "http://www.w3.org/ns/hydra/core#returns",
|
|
66
|
+
"description": "http://www.w3.org/ns/hydra/core#<b>re</b>turns"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"type": "uri",
|
|
70
|
+
"value": "http://www.w3.org/2005/xpath-functions#replace",
|
|
71
|
+
"description": "http://www.w3.org/2005/xpath-functions#<b>re</b>place"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"type": "uri",
|
|
75
|
+
"value": "http://usefulinc.com/ns/doap#release",
|
|
76
|
+
"description": "http://usefulinc.com/ns/doap#<b>re</b>lease"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"type": "uri",
|
|
80
|
+
"value": "http://www.w3.org/2004/02/skos/core#related",
|
|
81
|
+
"description": "http://www.w3.org/2004/02/skos/core#<b>re</b>lated"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"type": "uri",
|
|
85
|
+
"value": "http://spinrdf.org/sp#reduced",
|
|
86
|
+
"description": "http://spinrdf.org/sp#<b>re</b>duced"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"type": "uri",
|
|
90
|
+
"value": "http://www.w3.org/ns/odrl/2/Request",
|
|
91
|
+
"description": "http://www.w3.org/ns/odrl/2/<b>Re</b>quest"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"type": "uri",
|
|
95
|
+
"value": "https://swapi.co/vocabulary/Reptile",
|
|
96
|
+
"description": "https://swapi.co/vocabulary/<b>Re</b>ptile"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"type": "uri",
|
|
100
|
+
"value": "http://www.w3.org/ns/prov#Replace",
|
|
101
|
+
"description": "http://www.w3.org/ns/prov#<b>Re</b>place"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"type": "uri",
|
|
105
|
+
"value": "http://www.w3.org/ns/prov#Removal",
|
|
106
|
+
"description": "http://www.w3.org/ns/prov#<b>Re</b>moval"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"type": "uri",
|
|
110
|
+
"value": "http://usefulinc.com/ns/doap#revision",
|
|
111
|
+
"description": "http://usefulinc.com/ns/doap#<b>re</b>vision"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"type": "uri",
|
|
115
|
+
"value": "https://swapi.co/vocabulary/resident",
|
|
116
|
+
"description": "https://swapi.co/vocabulary/<b>re</b>sident"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"type": "uri",
|
|
120
|
+
"value": "http://purl.org/dc/terms/requires",
|
|
121
|
+
"description": "http://purl.org/dc/terms/<b>re</b>quires"
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"type": "uri",
|
|
125
|
+
"value": "http://www.w3.org/ns/hydra/core#required",
|
|
126
|
+
"description": "http://www.w3.org/ns/hydra/core#<b>re</b>quired"
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"type": "uri",
|
|
130
|
+
"value": "http://purl.org/dc/terms/replaces",
|
|
131
|
+
"description": "http://purl.org/dc/terms/<b>re</b>places"
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"type": "uri",
|
|
135
|
+
"value": "http://www.w3.org/ns/odrl/2/relation",
|
|
136
|
+
"description": "http://www.w3.org/ns/odrl/2/<b>re</b>lation"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"type": "uri",
|
|
140
|
+
"value": "http://purl.org/dc/terms/relation",
|
|
141
|
+
"description": "http://purl.org/dc/terms/<b>re</b>lation"
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"type": "uri",
|
|
145
|
+
"value": "http://purl.org/dc/elements/1.1/relation",
|
|
146
|
+
"description": "http://purl.org/dc/elements/1.1/<b>re</b>lation"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"type": "uri",
|
|
150
|
+
"value": "http://www.w3.org/ns/hydra/core#readable",
|
|
151
|
+
"description": "http://www.w3.org/ns/hydra/core#<b>re</b>adable"
|
|
152
|
+
}
|
|
153
|
+
]
|
|
154
|
+
}
|
|
@@ -68,11 +68,6 @@ describe('Graphql: edit endpoint settings', () => {
|
|
|
68
68
|
EditGraphqlEndpointSteps.getSavingLoader().should('be.visible');
|
|
69
69
|
cy.wait('@save-endpoint-configuration').then((interception) => {
|
|
70
70
|
expect(interception.request.body).to.deep.equal({
|
|
71
|
-
"id": "swapi",
|
|
72
|
-
"label": "Ontotext Star Wars Ontology",
|
|
73
|
-
"description": "",
|
|
74
|
-
"active": true,
|
|
75
|
-
"default": true,
|
|
76
71
|
"options": {
|
|
77
72
|
"enableTypeCount": true,
|
|
78
73
|
"enableCollectionCount": false,
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import {GraphqlEndpointManagementSteps} from "../../steps/graphql/graphql-endpoint-management-steps";
|
|
2
|
+
import {ApplicationSteps} from "../../steps/application-steps";
|
|
3
|
+
import {GraphqlPlaygroundSteps} from "../../steps/graphql/graphql-playground-steps";
|
|
4
|
+
|
|
5
|
+
describe('Graphql: set default endpoint', () => {
|
|
6
|
+
let repositoryId;
|
|
7
|
+
|
|
8
|
+
beforeEach(() => {
|
|
9
|
+
repositoryId = 'graphql-endpoint-management-' + Date.now();
|
|
10
|
+
cy.createRepository({id: repositoryId});
|
|
11
|
+
cy.presetRepository(repositoryId);
|
|
12
|
+
cy.importServerFile(repositoryId, 'swapi-dataset.ttl');
|
|
13
|
+
cy.uploadGraphqlSchema(repositoryId, 'graphql/soml/swapi-schema.yaml', 'swapi');
|
|
14
|
+
cy.uploadGraphqlSchema(repositoryId, 'graphql/soml/swapi-schema-film-restricted.yaml', 'swapi');
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
afterEach(() => {
|
|
18
|
+
cy.deleteRepository(repositoryId);
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
it('should be able to change the default endpoint', () => {
|
|
22
|
+
// Given I have a repository with active GraphQL endpoint
|
|
23
|
+
// And I have visited the endpoint management view
|
|
24
|
+
GraphqlEndpointManagementSteps.visit();
|
|
25
|
+
GraphqlEndpointManagementSteps.getView().should('be.visible');
|
|
26
|
+
GraphqlEndpointManagementSteps.getEndpointsInfo().should('have.length', 2);
|
|
27
|
+
// And there is a default endpoint
|
|
28
|
+
GraphqlEndpointManagementSteps.getEndpointDefaultStatusRadio(0).should('be.checked');
|
|
29
|
+
// When I click on the second endpoint to set it as default
|
|
30
|
+
GraphqlEndpointManagementSteps.setEndpointAsDefault(1);
|
|
31
|
+
// Then I should see a success toast
|
|
32
|
+
ApplicationSteps.getSuccessNotifications().should('be.visible');
|
|
33
|
+
// And the default endpoint should be changed
|
|
34
|
+
GraphqlEndpointManagementSteps.getEndpointDefaultStatusRadio(1).should('be.checked');
|
|
35
|
+
GraphqlEndpointManagementSteps.getEndpointDefaultStatusRadio(0).should('not.be.checked');
|
|
36
|
+
// When I open the GraphQL Playground
|
|
37
|
+
GraphqlEndpointManagementSteps.exploreEndpoint(1);
|
|
38
|
+
// Then the default endpoint should be selected by default in the playground
|
|
39
|
+
GraphqlPlaygroundSteps.getView().should('be.visible');
|
|
40
|
+
GraphqlPlaygroundSteps.getSelectedEndpoint().should('contain', 'film-restricted');
|
|
41
|
+
});
|
|
42
|
+
});
|
|
@@ -9,7 +9,13 @@ const USER_NAME = 'saved_query_user';
|
|
|
9
9
|
const USER_ADMINISTRATOR = 'admin';
|
|
10
10
|
const PASSWORD = 'root';
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
/**
|
|
13
|
+
* Skipped because this type of implementation is not ideal. If the test fails and the `afterEach` hook
|
|
14
|
+
* fails to toggle security, all remaining tests will fail because security remains enabled.
|
|
15
|
+
*
|
|
16
|
+
* Tests like this should be refactored to use stubs or other alternative implementations.
|
|
17
|
+
*/
|
|
18
|
+
describe.skip('Readonly saved query', () => {
|
|
13
19
|
|
|
14
20
|
let repositoryId;
|
|
15
21
|
|
|
@@ -51,4 +51,49 @@ describe('TTYG edit an agent', () => {
|
|
|
51
51
|
TtygAgentSettingsModalSteps.getIriDiscoverySearchCheckbox().should('be.checked');
|
|
52
52
|
});
|
|
53
53
|
|
|
54
|
+
|
|
55
|
+
it('should be able to edit Autocomplete extraction method option', {
|
|
56
|
+
retries: {
|
|
57
|
+
runMode: 1,
|
|
58
|
+
openMode: 0
|
|
59
|
+
}
|
|
60
|
+
}, () => {
|
|
61
|
+
TTYGStubs.stubAgentListGet('/ttyg/agent/get-agent-list-autocomplete-query.json');
|
|
62
|
+
TTYGStubs.stubAutocompleteResponse();
|
|
63
|
+
// Given I have opened the ttyg page
|
|
64
|
+
TTYGViewSteps.visit();
|
|
65
|
+
cy.wait('@get-agent-list');
|
|
66
|
+
// When I select an agent that don't have activated additional extraction method
|
|
67
|
+
TTYGViewSteps.expandAgentsSidebar();
|
|
68
|
+
TTYGViewSteps.openAgentsMenu();
|
|
69
|
+
TTYGViewSteps.selectAgent(0);
|
|
70
|
+
TTYGViewSteps.editCurrentAgent();
|
|
71
|
+
|
|
72
|
+
// Then I expect that the autocomplete iri discovery checkbox is not checked
|
|
73
|
+
TtygAgentSettingsModalSteps.getAutocompleteSearchCheckbox().should('not.be.checked');
|
|
74
|
+
|
|
75
|
+
// When I check the autocomplete iri discovery checkbox
|
|
76
|
+
TtygAgentSettingsModalSteps.checkAutocompleteSearchCheckbox();
|
|
77
|
+
|
|
78
|
+
// Then I can set a value for the max results
|
|
79
|
+
TtygAgentSettingsModalSteps.setAutocompleteMaxResults(2);
|
|
80
|
+
|
|
81
|
+
// Then I can select predicates with the autocomplete
|
|
82
|
+
TtygAgentSettingsModalSteps.enterSearchPredicate('rest');
|
|
83
|
+
cy.wait('@autocomplete-suggestions');
|
|
84
|
+
TtygAgentSettingsModalSteps.selectAutocompleteOption(3);
|
|
85
|
+
|
|
86
|
+
// When I save the agent
|
|
87
|
+
TTYGStubs.stubAgentEdit();
|
|
88
|
+
TtygAgentSettingsModalSteps.saveAgent();
|
|
89
|
+
cy.wait('@edit-agent');
|
|
90
|
+
// Then I expect the agent to be saved
|
|
91
|
+
ToasterSteps.verifySuccess('The agent \'Test autocomplete extraction agent\' was saved successfully.');
|
|
92
|
+
TTYGViewSteps.editCurrentAgent();
|
|
93
|
+
TtygAgentSettingsModalSteps.getAutocompleteSearchCheckbox().should('be.checked');
|
|
94
|
+
TtygAgentSettingsModalSteps.toggleAutocompleteSearchPanel();
|
|
95
|
+
TtygAgentSettingsModalSteps.getAutocompleteMaxResults().should('have.value', '2');
|
|
96
|
+
TtygAgentSettingsModalSteps.getSearchPredicateTags().should('have.length', '1');
|
|
97
|
+
TtygAgentSettingsModalSteps.getSearchPredicateTags().should('contain.text', 'http://www.w3.org/1999/02/22-rdf-syntax-ns#rest');
|
|
98
|
+
});
|
|
54
99
|
});
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "graphdb-workbench-tests",
|
|
3
|
-
"version": "3.0.0-
|
|
3
|
+
"version": "3.0.0-TR9",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "graphdb-workbench-tests",
|
|
9
|
-
"version": "3.0.0-
|
|
9
|
+
"version": "3.0.0-TR9",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"devDependencies": {
|
|
12
12
|
"cypress": "^13.3.1",
|
package/package.json
CHANGED
|
@@ -81,7 +81,8 @@ export class GraphqlEndpointManagementSteps {
|
|
|
81
81
|
cy.wrap($row).within(() => {
|
|
82
82
|
cy.get('td').eq(1).should('contain', endpointInfo.id);
|
|
83
83
|
cy.get('td').eq(2).should('contain', endpointInfo.label);
|
|
84
|
-
|
|
84
|
+
const isDefaultCheck = endpointInfo.default ? 'be.checked' : 'not.be.checked'
|
|
85
|
+
cy.get('td').eq(3).find('.endpoint-default-state input[type="radio"]').should(isDefaultCheck);
|
|
85
86
|
cy.get('td').eq(4).should('contain', endpointInfo.active ? 'yes' : 'no');
|
|
86
87
|
cy.get('td').eq(5).should('contain', endpointInfo.modified);
|
|
87
88
|
cy.get('td').eq(6).should('contain', endpointInfo.types);
|
|
@@ -111,4 +112,12 @@ export class GraphqlEndpointManagementSteps {
|
|
|
111
112
|
this.openEndpointActionMenu(index);
|
|
112
113
|
return cy.get('.configure-endpoint-btn').eq(index).click();
|
|
113
114
|
}
|
|
115
|
+
|
|
116
|
+
static getEndpointDefaultStatusRadio(index) {
|
|
117
|
+
return this.getEndpointInfo(index).find('.endpoint-default-state input[type="radio"]');
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
static setEndpointAsDefault(index) {
|
|
121
|
+
this.getEndpointDefaultStatusRadio(index).check();
|
|
122
|
+
}
|
|
114
123
|
}
|
|
@@ -412,6 +412,50 @@ export class TtygAgentSettingsModalSteps extends ModalDialogSteps {
|
|
|
412
412
|
this.getIriDiscoverySearchCheckbox().uncheck({force: true});
|
|
413
413
|
}
|
|
414
414
|
|
|
415
|
+
static getAutocompleteSearchCheckbox() {
|
|
416
|
+
return cy.get('#autocomplete_iri_discovery_search_checkbox');
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
static checkAutocompleteSearchCheckbox() {
|
|
420
|
+
this.getAutocompleteSearchCheckbox().check({force: true});
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
static uncheckAutocompleteSearchCheckbox() {
|
|
424
|
+
this.getAutocompleteSearchCheckbox().uncheck({force: true});
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
static getAutocompleteMaxResults() {
|
|
428
|
+
return cy.get('#autocomplete_iri_discovery_search_maxNumberOfResultsPerCall');
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
static setAutocompleteMaxResults(number) {
|
|
432
|
+
this.getAutocompleteMaxResults().type(number);
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
static getSearchPredicateInput() {
|
|
436
|
+
return cy.get('#autocompletePredicateField');
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
static enterSearchPredicate(text) {
|
|
440
|
+
this.getSearchPredicateInput().type(text);
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
static getSearchPredicateTags() {
|
|
444
|
+
return this.getSearchPredicateInput().find('.tag-item');
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
static toggleAutocompleteSearchPanel() {
|
|
448
|
+
cy.get('.extraction-method-toggle .panel-toggle-link .toggle-icon').click();
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
static getSuggestionsList() {
|
|
452
|
+
return cy.get('ul.suggestion-list li.suggestion-item');
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
static selectAutocompleteOption(index) {
|
|
456
|
+
this.getSuggestionsList().eq(index).click();
|
|
457
|
+
}
|
|
458
|
+
|
|
415
459
|
// System instructions
|
|
416
460
|
|
|
417
461
|
static getSystemInstructionsFormGroup() {
|
package/stubs/ttyg/ttyg-stubs.js
CHANGED
|
@@ -163,4 +163,11 @@ export class TTYGStubs extends Stubs {
|
|
|
163
163
|
statusCode: 200
|
|
164
164
|
}).as('explain-response');
|
|
165
165
|
}
|
|
166
|
+
|
|
167
|
+
static stubAutocompleteResponse(fixture = '/ttyg/autocomplete-response.json') {
|
|
168
|
+
cy.intercept('GET', '/rest/autocomplete/query?*', {
|
|
169
|
+
fixture,
|
|
170
|
+
statusCode: 200,
|
|
171
|
+
}).as('autocomplete-suggestions');
|
|
172
|
+
}
|
|
166
173
|
}
|