Skip to content

Commit 7623ee8

Browse files
authored
chore(test): adding test framework to repo (#65)
* chore(test): adding test framework to repo
1 parent b1583b2 commit 7623ee8

File tree

5 files changed

+77
-1
lines changed

5 files changed

+77
-1
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@ dist
66
.idea
77
.vscode
88
/.npmrc
9+
output
10+
test-results

eslint.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const compat = new FlatCompat({
4141
});
4242

4343
const TYPESCRIPT_PROJECTS = [
44-
'./tsconfig.json',
44+
'./tsconfig.json', 'tests/*/tsconfig.json',
4545
];
4646

4747
export default [

tests/playwright/package.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"name": "rhel-extension-tests-playwright",
3+
"version": "0.0.1",
4+
"description": "Podman Desktop RHEL extension Playwright E2E tests",
5+
"type": "module",
6+
"scripts": {
7+
"test:e2e:setup": "xvfb-maybe --auto-servernum --server-args='-screen 0 1280x960x24' --",
8+
"test:e2e": "npm run test:e2e:setup npx playwright test src/"
9+
},
10+
"author": "Red Hat",
11+
"license": "Apache-2.0",
12+
"devDependencies": {
13+
"@playwright/test": "1.52.0",
14+
"@podman-desktop/tests-playwright": "1.18.0",
15+
"@types/node": "^22",
16+
"electron": "^35.2.0",
17+
"typescript": "^5.8.3",
18+
"xvfb-maybe": "^0.2.1"
19+
}
20+
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/**********************************************************************
2+
* Copyright (C) 2025 Red Hat, Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*
16+
* SPDX-License-Identifier: Apache-2.0
17+
***********************************************************************/
18+
19+
import { defineConfig, devices } from '@playwright/test';
20+
21+
export default defineConfig({
22+
outputDir: './output/',
23+
workers: 1,
24+
25+
reporter: [
26+
['list'],
27+
['junit', { outputFile: './tests/output/junit-results.xml' }],
28+
['json', { outputFile: './tests/output/json-results.json' }],
29+
['html', { open: 'never', outputFolder: './tests/output/html-results/' }],
30+
],
31+
32+
projects: [
33+
{
34+
name: 'chromium',
35+
use: {
36+
...devices['Desktop Chrome'],
37+
},
38+
},
39+
],
40+
});

tests/playwright/tsconfig.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"compilerOptions": {
3+
"target": "esnext",
4+
"module": "esnext",
5+
"moduleResolution": "node",
6+
"strict": true,
7+
"preserveValueImports": false,
8+
"skipLibCheck": false,
9+
"baseUrl": "."
10+
},
11+
"include": ["src/**/*.ts", "playwright.config.ts"],
12+
"exclude": ["node_modules"]
13+
}
14+

0 commit comments

Comments
 (0)