Skip to content

Commit 4323b6f

Browse files
authored
Generic query examples and extra icons (#148)
Added a group of generic query examples and some custom icons for well known query groups
1 parent cdd40a2 commit 4323b6f

23 files changed

+376
-153
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Added
11+
12+
- A group of generic query examples was added (#135).
13+
- Some icons for well known query groups were added (#146).
14+
1015
## [1.2.2] - 2024-06-27
1116

1217
### Added

cypress/e2e/custom-query-editor.cy.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ PREFIX oo: <http://purl.org/openorg/>
4343
PREFIX ao: <http://purl.org/ontology/ao/core#>
4444
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
4545
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
46-
PREFIX d: <http://www/example.com/data/>
47-
PREFIX o: <http://www/example.com/ont/>
46+
PREFIX d: <https://www.example.com/data/>
47+
PREFIX o: <https://www.example.com/ont/>
4848
4949
SELECT DISTINCT ?component ?componentName ?recycledContentPercentage
5050
WHERE {
@@ -60,7 +60,7 @@ ORDER BY ?componentName
6060
cy.get('button[type="submit"]').click();
6161

6262
// Checking if the query works
63-
cy.contains("http://www/example.com/data/component-c01").should('exist');
63+
cy.contains("https://www.example.com/data/component-c01").should('exist');
6464
});
6565

6666
it("Check if all possible parameters are filled in with parameterized URL", () => {
@@ -227,8 +227,8 @@ PREFIX oo: <http://purl.org/openorg/>
227227
PREFIX ao: <http://purl.org/ontology/ao/core#>
228228
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
229229
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
230-
PREFIX d: <http://www/example.com/data/>
231-
PREFIX o: <http://www/example.com/ont/>
230+
PREFIX d: <https://www.example.com/data/>
231+
PREFIX o: <https://www.example.com/ont/>
232232
233233
SELECT ?component ?componentName ?material ?materialName ?percentage
234234
WHERE {
@@ -263,7 +263,7 @@ WHERE {
263263
)
264264
cy.get('button[type="submit"]').click();
265265

266-
cy.contains("http://www/example.com/data/component-c01").should('exist');
266+
cy.contains("https://www.example.com/data/component-c01").should('exist');
267267

268268
})
269269

cypress/e2e/fetch-status.cy.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,12 @@ describe("Fetch Status", () => {
4242
cy.get('input[name="idp"]').type("http://localhost:8080");
4343
cy.contains("Login").click();
4444

45-
cy.get("input#email").type("[email protected]");
46-
cy.get("input#password").type("abc123");
47-
cy.contains("button", "Log in").click();
48-
cy.contains("button", "Authorize").click();
45+
cy.origin('http://localhost:8080', () => {
46+
cy.get("input#email").type("[email protected]");
47+
cy.get("input#password").type("abc123");
48+
cy.contains("button", "Log in").click();
49+
cy.contains("button", "Authorize").click();
50+
});
4951

5052
cy.url().should("eq", "http://localhost:5173/");
5153

cypress/e2e/log-in.cy.js

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,12 @@ describe("Log in", () => {
4141
.type("http://localhost:8080/example/profile/card#me");
4242
cy.contains("Login").click();
4343

44-
cy.get("input#email").type("[email protected]");
45-
cy.get("input#password").type("abc123");
46-
cy.contains("button", "Log in").click();
47-
cy.contains("button", "Authorize").click();
44+
cy.origin('http://localhost:8080', () => {
45+
cy.get("input#email").type("[email protected]");
46+
cy.get("input#password").type("abc123");
47+
cy.contains("button", "Log in").click();
48+
cy.contains("button", "Authorize").click();
49+
});
4850

4951
cy.url().should("eq", "http://localhost:5173/");
5052
});
@@ -74,11 +76,13 @@ describe("Log in", () => {
7476
cy.get('input[name="idp"]').type("http://localhost:8080");
7577
cy.contains("Login").click();
7678

77-
cy.get("input#email").type("[email protected]");
78-
cy.get("input#password").type("abc123");
79-
cy.contains("button", "Log in").click();
80-
cy.contains("button", "Authorize").click();
81-
79+
cy.origin('http://localhost:8080', () => {
80+
cy.get("input#email").type("[email protected]");
81+
cy.get("input#password").type("abc123");
82+
cy.contains("button", "Log in").click();
83+
cy.contains("button", "Authorize").click();
84+
});
85+
8286
cy.url().should("eq", "http://localhost:5173/");
8387

8488
cy.contains("General examples").click();

cypress/e2e/sources-from-indexfile.cy.js

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ describe("Sources from index file", () => {
1414
cy.get('.information-box').contains('Sources: 3');
1515

1616
// Check if correct data is displayed
17-
cy.contains("http://www/example.com/data/component-c01");
17+
cy.contains("https://www.example.com/data/component-c01");
1818
cy.contains("Component 1");
1919
cy.contains("Material 1");
2020
});
@@ -33,7 +33,7 @@ describe("Sources from index file", () => {
3333
cy.get('.information-box').contains('Sources: 4');
3434

3535
// Check if correct data is still displayed even if one source was unauthorized
36-
cy.contains("http://www/example.com/data/component-c01");
36+
cy.contains("https://www.example.com/data/component-c01");
3737
cy.contains("Component 1");
3838
cy.contains("Material 1");
3939
});
@@ -52,7 +52,7 @@ describe("Sources from index file", () => {
5252
cy.get('.information-box').contains('Sources: 4');
5353

5454
// Check if correct data is still displayed even if one source was unauthorized and different sources were merged
55-
cy.contains("http://www/example.com/data/component-c01");
55+
cy.contains("https://www.example.com/data/component-c01");
5656
cy.contains("Component 1");
5757
cy.contains("Material 1");
5858
});
@@ -72,7 +72,7 @@ describe("Sources from index file", () => {
7272
});
7373

7474

75-
cy.contains("http://www/example.com/data/component-c01").should("not.exist");
75+
cy.contains("https://www.example.com/data/component-c01").should("not.exist");
7676
cy.contains("Component 1").should("not.exist");
7777
cy.contains("Material 1").should("not.exist");
7878

@@ -86,18 +86,20 @@ describe("Sources from index file", () => {
8686
.type("http://localhost:8080/example/profile/card#me");
8787
cy.contains("Login").click();
8888

89-
cy.get("input#email").type("[email protected]");
90-
cy.get("input#password").type("abc123");
91-
cy.contains("button", "Log in").click();
92-
cy.contains("button", "Authorize").click();
93-
89+
cy.origin('http://localhost:8080', () => {
90+
cy.get("input#email").type("[email protected]");
91+
cy.get("input#password").type("abc123");
92+
cy.contains("button", "Log in").click();
93+
cy.contains("button", "Authorize").click();
94+
});
95+
9496
cy.url().should("eq", "http://localhost:5173/");
9597

9698
//now try again
9799
cy.contains("For testing only").click();
98100
cy.contains("Sources from an index file (requiring authentication)").click();
99101

100-
cy.contains("http://www/example.com/data/component-c01").should("not.exist");
102+
cy.contains("https://www.example.com/data/component-c01").should("not.exist");
101103
cy.contains("Component 1").should("exist");
102104
cy.contains("Material 1").should("exist");
103105
})

cypress/e2e/sources-info.cy.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,12 @@ describe("Sources info", () => {
5656
cy.get('input[name="idp"]').type("http://localhost:8080");
5757
cy.contains("Login").click();
5858

59-
cy.get("input#email").type("[email protected]");
60-
cy.get("input#password").type("abc123");
61-
cy.contains("button", "Log in").click();
62-
cy.contains("button", "Authorize").click();
59+
cy.origin('http://localhost:8080', () => {
60+
cy.get("input#email").type("[email protected]");
61+
cy.get("input#password").type("abc123");
62+
cy.contains("button", "Log in").click();
63+
cy.contains("button", "Authorize").click();
64+
});
6365

6466
cy.url().should("eq", "http://localhost:5173/");
6567

initial-pod-data/boms$.ttl

Lines changed: 57 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,58 @@
11

2-
<http://www/example.com/data/component-bom-b01> a <http://www/example.com/ont/component-bom>;
3-
<http://www/example.com/ont/has-component-material-assoc> <http://www/example.com/data/component-material-assoc-b01-m01>,
4-
<http://www/example.com/data/component-material-assoc-b01-m02>, <http://www/example.com/data/component-material-assoc-b01-m03> .
5-
6-
<http://www/example.com/data/component-bom-b02> a <http://www/example.com/ont/component-bom>;
7-
<http://www/example.com/ont/has-component-material-assoc> <http://www/example.com/data/component-material-assoc-b02-m04>,
8-
<http://www/example.com/data/component-material-assoc-b02-m05>, <http://www/example.com/data/component-material-assoc-b02-m06>,
9-
<http://www/example.com/data/component-material-assoc-b02-m07>, <http://www/example.com/data/component-material-assoc-b02-m08>,
10-
<http://www/example.com/data/component-material-assoc-b02-m09> .
11-
12-
<http://www/example.com/data/component-bom-b03> a <http://www/example.com/ont/component-bom>;
13-
<http://www/example.com/ont/has-component-material-assoc> <http://www/example.com/data/component-material-assoc-b03-m10>,
14-
<http://www/example.com/data/component-material-assoc-b03-m11> .
15-
16-
<http://www/example.com/data/component-material-assoc-b01-m01> a <http://www/example.com/ont/component-material-assoc>;
17-
<http://www/example.com/ont/has-material> <http://www/example.com/data/material-m01>;
18-
<http://www/example.com/ont/percentage> 60 .
19-
20-
<http://www/example.com/data/component-material-assoc-b01-m02> a <http://www/example.com/ont/component-material-assoc>;
21-
<http://www/example.com/ont/has-material> <http://www/example.com/data/material-m02>;
22-
<http://www/example.com/ont/percentage> 30 .
23-
24-
<http://www/example.com/data/component-material-assoc-b01-m03> a <http://www/example.com/ont/component-material-assoc>;
25-
<http://www/example.com/ont/has-material> <http://www/example.com/data/material-m03>;
26-
<http://www/example.com/ont/percentage> 10 .
27-
28-
<http://www/example.com/data/component-material-assoc-b02-m04> a <http://www/example.com/ont/component-material-assoc>;
29-
<http://www/example.com/ont/has-material> <http://www/example.com/data/material-m04>;
30-
<http://www/example.com/ont/percentage> 40 .
31-
32-
<http://www/example.com/data/component-material-assoc-b02-m05> a <http://www/example.com/ont/component-material-assoc>;
33-
<http://www/example.com/ont/has-material> <http://www/example.com/data/material-m05>;
34-
<http://www/example.com/ont/percentage> 20 .
35-
36-
<http://www/example.com/data/component-material-assoc-b02-m06> a <http://www/example.com/ont/component-material-assoc>;
37-
<http://www/example.com/ont/has-material> <http://www/example.com/data/material-m06>;
38-
<http://www/example.com/ont/percentage> 25 .
39-
40-
<http://www/example.com/data/component-material-assoc-b02-m07> a <http://www/example.com/ont/component-material-assoc>;
41-
<http://www/example.com/ont/has-material> <http://www/example.com/data/material-m07>;
42-
<http://www/example.com/ont/percentage> 7 .
43-
44-
<http://www/example.com/data/component-material-assoc-b02-m08> a <http://www/example.com/ont/component-material-assoc>;
45-
<http://www/example.com/ont/has-material> <http://www/example.com/data/material-m08>;
46-
<http://www/example.com/ont/percentage> 5 .
47-
48-
<http://www/example.com/data/component-material-assoc-b02-m09> a <http://www/example.com/ont/component-material-assoc>;
49-
<http://www/example.com/ont/has-material> <http://www/example.com/data/material-m09>;
50-
<http://www/example.com/ont/percentage> 3 .
51-
52-
<http://www/example.com/data/component-material-assoc-b03-m10> a <http://www/example.com/ont/component-material-assoc>;
53-
<http://www/example.com/ont/has-material> <http://www/example.com/data/material-m10>;
54-
<http://www/example.com/ont/percentage> 85 .
55-
56-
<http://www/example.com/data/component-material-assoc-b03-m11> a <http://www/example.com/ont/component-material-assoc>;
57-
<http://www/example.com/ont/has-material> <http://www/example.com/data/material-m11>;
58-
<http://www/example.com/ont/percentage> 15 .
2+
<https://www.example.com/data/component-bom-b01> a <https://www.example.com/ont/component-bom>;
3+
<https://www.example.com/ont/has-component-material-assoc> <https://www.example.com/data/component-material-assoc-b01-m01>,
4+
<https://www.example.com/data/component-material-assoc-b01-m02>, <https://www.example.com/data/component-material-assoc-b01-m03> .
5+
6+
<https://www.example.com/data/component-bom-b02> a <https://www.example.com/ont/component-bom>;
7+
<https://www.example.com/ont/has-component-material-assoc> <https://www.example.com/data/component-material-assoc-b02-m04>,
8+
<https://www.example.com/data/component-material-assoc-b02-m05>, <https://www.example.com/data/component-material-assoc-b02-m06>,
9+
<https://www.example.com/data/component-material-assoc-b02-m07>, <https://www.example.com/data/component-material-assoc-b02-m08>,
10+
<https://www.example.com/data/component-material-assoc-b02-m09> .
11+
12+
<https://www.example.com/data/component-bom-b03> a <https://www.example.com/ont/component-bom>;
13+
<https://www.example.com/ont/has-component-material-assoc> <https://www.example.com/data/component-material-assoc-b03-m10>,
14+
<https://www.example.com/data/component-material-assoc-b03-m11> .
15+
16+
<https://www.example.com/data/component-material-assoc-b01-m01> a <https://www.example.com/ont/component-material-assoc>;
17+
<https://www.example.com/ont/has-material> <https://www.example.com/data/material-m01>;
18+
<https://www.example.com/ont/percentage> 60 .
19+
20+
<https://www.example.com/data/component-material-assoc-b01-m02> a <https://www.example.com/ont/component-material-assoc>;
21+
<https://www.example.com/ont/has-material> <https://www.example.com/data/material-m02>;
22+
<https://www.example.com/ont/percentage> 30 .
23+
24+
<https://www.example.com/data/component-material-assoc-b01-m03> a <https://www.example.com/ont/component-material-assoc>;
25+
<https://www.example.com/ont/has-material> <https://www.example.com/data/material-m03>;
26+
<https://www.example.com/ont/percentage> 10 .
27+
28+
<https://www.example.com/data/component-material-assoc-b02-m04> a <https://www.example.com/ont/component-material-assoc>;
29+
<https://www.example.com/ont/has-material> <https://www.example.com/data/material-m04>;
30+
<https://www.example.com/ont/percentage> 40 .
31+
32+
<https://www.example.com/data/component-material-assoc-b02-m05> a <https://www.example.com/ont/component-material-assoc>;
33+
<https://www.example.com/ont/has-material> <https://www.example.com/data/material-m05>;
34+
<https://www.example.com/ont/percentage> 20 .
35+
36+
<https://www.example.com/data/component-material-assoc-b02-m06> a <https://www.example.com/ont/component-material-assoc>;
37+
<https://www.example.com/ont/has-material> <https://www.example.com/data/material-m06>;
38+
<https://www.example.com/ont/percentage> 25 .
39+
40+
<https://www.example.com/data/component-material-assoc-b02-m07> a <https://www.example.com/ont/component-material-assoc>;
41+
<https://www.example.com/ont/has-material> <https://www.example.com/data/material-m07>;
42+
<https://www.example.com/ont/percentage> 7 .
43+
44+
<https://www.example.com/data/component-material-assoc-b02-m08> a <https://www.example.com/ont/component-material-assoc>;
45+
<https://www.example.com/ont/has-material> <https://www.example.com/data/material-m08>;
46+
<https://www.example.com/ont/percentage> 5 .
47+
48+
<https://www.example.com/data/component-material-assoc-b02-m09> a <https://www.example.com/ont/component-material-assoc>;
49+
<https://www.example.com/ont/has-material> <https://www.example.com/data/material-m09>;
50+
<https://www.example.com/ont/percentage> 3 .
51+
52+
<https://www.example.com/data/component-material-assoc-b03-m10> a <https://www.example.com/ont/component-material-assoc>;
53+
<https://www.example.com/ont/has-material> <https://www.example.com/data/material-m10>;
54+
<https://www.example.com/ont/percentage> 85 .
55+
56+
<https://www.example.com/data/component-material-assoc-b03-m11> a <https://www.example.com/ont/component-material-assoc>;
57+
<https://www.example.com/ont/has-material> <https://www.example.com/data/material-m11>;
58+
<https://www.example.com/ont/percentage> 15 .

initial-pod-data/components$.ttl

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11

2-
<http://www/example.com/data/component-c01> a <http://www/example.com/ont/Component>;
3-
<http://www/example.com/ont/has-component-bom> <http://www/example.com/data/component-bom-b01>;
4-
<http://www/example.com/ont/name> "Component 1";
5-
<http://www/example.com/ont/recycled-content-percentage> 80 .
2+
<https://www.example.com/data/component-c01> a <https://www.example.com/ont/Component>;
3+
<https://www.example.com/ont/has-component-bom> <https://www.example.com/data/component-bom-b01>;
4+
<https://www.example.com/ont/name> "Component 1";
5+
<https://www.example.com/ont/recycled-content-percentage> 80 .
66

7-
<http://www/example.com/data/component-c02> a <http://www/example.com/ont/Component>;
8-
<http://www/example.com/ont/has-component-bom> <http://www/example.com/data/component-bom-b02>;
9-
<http://www/example.com/ont/name> "Component 2";
10-
<http://www/example.com/ont/recycled-content-percentage> 20 .
7+
<https://www.example.com/data/component-c02> a <https://www.example.com/ont/Component>;
8+
<https://www.example.com/ont/has-component-bom> <https://www.example.com/data/component-bom-b02>;
9+
<https://www.example.com/ont/name> "Component 2";
10+
<https://www.example.com/ont/recycled-content-percentage> 20 .
1111

12-
<http://www/example.com/data/component-c03> a <http://www/example.com/ont/Component>;
13-
<http://www/example.com/ont/has-component-bom> <http://www/example.com/data/component-bom-b03>;
14-
<http://www/example.com/ont/name> "Component 3";
15-
<http://www/example.com/ont/recycled-content-percentage> 0 .
12+
<https://www.example.com/data/component-c03> a <https://www.example.com/ont/Component>;
13+
<https://www.example.com/ont/has-component-bom> <https://www.example.com/data/component-bom-b03>;
14+
<https://www.example.com/ont/name> "Component 3";
15+
<https://www.example.com/ont/recycled-content-percentage> 0 .

0 commit comments

Comments
 (0)