Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Implement extension installation and basic extension handling test scenario #209

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ node_modules
dist
.eslintcache
**/coverage
tests/playwright/output
1 change: 1 addition & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ const compat = new FlatCompat({

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

export default [
Expand Down
17 changes: 12 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"icon": "icon.png",
"publisher": "podman-desktop",
"license": "Apache-2.0",
"type": "module",
"engines": {
"podman-desktop": ">=1.10.0"
},
Expand Down Expand Up @@ -75,7 +76,9 @@
"format:fix": "prettier --write \"src/**/*.ts\"",
"lint:check": "eslint .",
"lint:fix": "eslint . --fix",
"watch": "vite build -w"
"watch": "vite build -w",
"test:e2e:setup": "xvfb-maybe --auto-servernum --server-args='-screen 0 1280x960x24' --",
"test:e2e": "npm run test:e2e:setup npx playwright test tests/playwright/src/spec/"
},
"dependencies": {
"@octokit/rest": "^21.0.2",
Expand All @@ -85,10 +88,13 @@
"devDependencies": {
"7zip-min": "^1.4.5",
"@eslint/compat": "^1.2.2",
"@playwright/test": "^1.48.2",
"@podman-desktop/api": "^1.14.1",
"@typescript-eslint/eslint-plugin": "^8.14.0",
"@typescript-eslint/parser": "^8.14.0",
"@podman-desktop/tests-playwright": "next",
"@typescript-eslint/eslint-plugin": "^8.13.0",
"@typescript-eslint/parser": "^8.13.0",
"@vitest/coverage-v8": "^2.0.5",
"electron": "^33.1.0",
"eslint": "^9.14.0",
"eslint-import-resolver-custom-alias": "^1.3.2",
"eslint-import-resolver-typescript": "^3.6.3",
Expand All @@ -100,14 +106,15 @@
"eslint-plugin-simple-import-sort": "^12.1.1",
"eslint-plugin-sonarjs": "^2.0.4",
"eslint-plugin-unicorn": "^56.0.0",
"mkdirp": "^3.0.1",
"globals": "^15.12.0",
"mkdirp": "^3.0.1",
"prettier": "^3.3.3",
"typescript": "5.6.3",
"typescript-eslint": "^8.14.0",
"validator": "^13.12.0",
"vite": "^5.4.11",
"vitest": "^2.0.5"
"vitest": "^2.0.5",
"xvfb-maybe": "^0.2.1"
},
"packageManager": "[email protected]+sha512.e5a7e52a4183a02d5931057f7a0dbff9d5e9ce3161e33fa68ae392125b79282a8a8a470a51dfc8a0ed86221442eb2fb57019b0990ed24fab519bf0e1bc5ccfc4"
}
42 changes: 42 additions & 0 deletions playwright.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/**********************************************************************
* Copyright (C) 2024 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({
testDir: 'tests/playwright/src/spec',
outputDir: 'tests/playwright/output/',
workers: 1,
timeout: 60000,

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

projects: [
{
name: 'chromium',
use: {
...devices['Desktop Chrome'],
},
},
],
});
Loading