Skip to content

Commit 12ff41e

Browse files
committed
c1
Signed-off-by: Mahmoud Shahrokni <seyedmahmoud.shahrokni@amadeus.com>
1 parent b3f6d9f commit 12ff41e

File tree

6 files changed

+71
-13
lines changed

6 files changed

+71
-13
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -101,20 +101,11 @@ jobs:
101101
nvmrc_path: ".nvmrc"
102102
- name: install dependencies
103103
run: npm ci
104-
- name: install percli
105-
uses: perses/cli-actions/actions/install_percli@v0.2.0
106-
with:
107-
cli-version: "v0.53.0"
108-
- name: verify percli installation
109-
run: percli version
110104
- name: install Playwright browsers
111105
run: npx playwright install --with-deps
112106
working-directory: e2e
113-
- name: setup Perses and start Plugins
114-
run: |
115-
# Handshake with server on port 8080
116-
percli login http://localhost:8080
117-
npm run test:ci --prefix e2e -- ./tests
107+
- name: run e2e tests
108+
run: npm run test:ci --prefix e2e -- ./src/tests
118109

119110

120111
type-check:

.github/workflows/docker-compose.ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,7 @@ services:
66
environment:
77
- PERSES_PLUGIN_ENABLE_DEV=true
88
- PERSES_ARCHIVE_PATHS_0=/etc/perses/development-archives
9+
- PERSES_PROVISIONING_FOLDERS_0=/etc/perses/provisioning
910
volumes:
1011
- ./plugins/development-archives:/etc/perses/development-archives
12+
- ./plugins/e2e/src/data:/etc/perses/provisioning
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
{
2+
"kind": "Dashboard",
3+
"metadata": {
4+
"name": "E2E-Verification",
5+
"project": "e2e"
6+
},
7+
"spec": {
8+
"display": {
9+
"name": "E2E Test Dashboard"
10+
},
11+
"layouts": [
12+
{
13+
"kind": "Grid",
14+
"spec": {
15+
"items": [
16+
{
17+
"x": 0,
18+
"y": 0,
19+
"width": 24,
20+
"height": 8,
21+
"content": { "ref": { "kind": "Panel", "name": "PluginTablePanel" } }
22+
}
23+
]
24+
}
25+
}
26+
],
27+
"panels": {
28+
"PluginTablePanel": {
29+
"kind": "Panel",
30+
"spec": {
31+
"display": {
32+
"name": "Plugin Data Table"
33+
},
34+
"plugin": {
35+
"kind": "Table",
36+
"spec": {
37+
"density": "Compact",
38+
"pagination": { "enabled": true, "pageSize": 10 }
39+
}
40+
},
41+
"queries": [
42+
{
43+
"kind": "TimeSeriesQuery",
44+
"spec": {
45+
"plugin": {
46+
"kind": "PrometheusTimeSeriesQuery",
47+
"spec": { "query": "up" }
48+
}
49+
}
50+
}
51+
]
52+
}
53+
}
54+
}
55+
}
56+
}

e2e/src/data/projects/e2e.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"kind": "Project",
3+
"metadata": {
4+
"name": "e2eproject"
5+
},
6+
"spec": {}
7+
}
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ import { test, expect } from '@playwright/test';
1515

1616
/* WAS ONLY ADDED FOR DEMONSTRATIONS*/
1717
test.describe('table Plugin', () => {
18-
test('ONLY FOR PR DEMONSTRATION', async () => {
19-
expect(true).toBeTruthy();
18+
test('ONLY FOR PR DEMONSTRATION', async ({ page }) => {
19+
await page.goto('http://localhost:8080/projects/e2eproject');
20+
const renameText = page.getByText('RENAME PROJECT', { exact: false });
21+
await expect(renameText).toBeVisible();
2022
});
2123
});
File renamed without changes.

0 commit comments

Comments
 (0)