Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ dist
.idea
.vscode
/.npmrc
output
test-results
2 changes: 1 addition & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const compat = new FlatCompat({
});

const TYPESCRIPT_PROJECTS = [
'./tsconfig.json',
'./tsconfig.json', 'tests/*/tsconfig.json',
];

export default [
Expand Down
20 changes: 20 additions & 0 deletions tests/playwright/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "rhel-extension-tests-playwright",
"version": "0.0.1",
"description": "Podman Desktop RHEL extension Playwright E2E tests",
"type": "module",
"scripts": {
"test:e2e:setup": "xvfb-maybe --auto-servernum --server-args='-screen 0 1280x960x24' --",
"test:e2e": "npm run test:e2e:setup npx playwright test src/"
},
"author": "Red Hat",
"license": "Apache-2.0",
"devDependencies": {
"@playwright/test": "1.52.0",
"@podman-desktop/tests-playwright": "1.18.0",
"@types/node": "^22",
"electron": "^35.2.0",
"typescript": "^5.8.3",
"xvfb-maybe": "^0.2.1"
}
}
40 changes: 40 additions & 0 deletions tests/playwright/playwright.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/**********************************************************************
* Copyright (C) 2025 Red Hat, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* SPDX-License-Identifier: Apache-2.0
***********************************************************************/

import { defineConfig, devices } from '@playwright/test';

export default defineConfig({
outputDir: './output/',
workers: 1,

reporter: [
['list'],
['junit', { outputFile: './tests/output/junit-results.xml' }],
['json', { outputFile: './tests/output/json-results.json' }],
['html', { open: 'never', outputFolder: './tests/output/html-results/' }],
],

projects: [
{
name: 'chromium',
use: {
...devices['Desktop Chrome'],
},
},
],
});
14 changes: 14 additions & 0 deletions tests/playwright/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"compilerOptions": {
"target": "esnext",
"module": "esnext",
"moduleResolution": "node",
"strict": true,
"preserveValueImports": false,
"skipLibCheck": false,
"baseUrl": "."
},
"include": ["src/**/*.ts", "playwright.config.ts"],
"exclude": ["node_modules"]
}