-
Notifications
You must be signed in to change notification settings - Fork 8
Closed
Description
Using Neovim 0.10 and playwright 1.44.1
I select 'chromium' using NeotestPlaywrightProject
then try to run playwright tests:
My lazy.nvim config:
return {
"nvim-neotest/neotest",
dependencies = {
"nvim-neotest/nvim-nio",
"nvim-lua/plenary.nvim",
"antoinemadec/FixCursorHold.nvim",
"nvim-treesitter/nvim-treesitter",
"marilari88/neotest-vitest",
"thenbe/neotest-playwright",
},
config = function()
require("neotest").setup({
adapters = {
require("neotest-vitest")({
filter_dir = function(name)
return name ~= "node_modules" and name ~= "e2e"
end,
}),
require("neotest-playwright").adapter({
options = {
persist_project_selection = true,
enable_dynamic_test_discovery = true,
is_test_file = function(file_path)
return string.match(file_path, "e2e/tests")
end,
},
}),
},
consumers = {
playwright = require("neotest-playwright.consumers").consumers,
},
})
end,
cmd = {
"Neotest",
"NeotestPlaywrightProject",
"NeotestPlaywrightPreset",
"NeotestPlaywrightRefresh",
},
keys = {
m("<leader>m", "Neotest summary"),
m("<leader>n", "Neotest run file"),
},
}
My playwright.config.ts
...
reporter: ci
? [['list', { printSteps: true }]]
: [
['html', { outputFolder: 'e2e/report' }],
['json', { outputFile: 'e2e/test-results.json' }],
],
use: {
actionTimeout: 0,
baseURL,
trace: 'on-first-retry',
headless: true,
},
outputDir: 'e2e/test-results',
projects: [
{
name: 'setup',
testMatch: msalEnabled ? /.*\.setup\.ts/ : undefined,
},
{
name: 'chromium',
use: {
...devices['Desktop Chrome'],
storageState: 'e2e/.auth/user.json',
},
dependencies,
},
{
name: 'firefox',
use: {
...devices['Desktop Firefox'],
storageState: 'e2e/.auth/user.json',
},
dependencies,
},
{
name: 'webkit',
use: {
...devices['Desktop Safari'],
storageState: 'e2e/.auth/user.json',
},
dependencies,
},
],
...
Metadata
Metadata
Assignees
Labels
No labels