feat(browser-automation): add playwright-cli as browser automation provider
- Add playwright-cli to BrowserAutomationProviderSchema enum - Add playwright-cli to BuiltinSkillNameSchema - Create playwrightCliSkill with official Microsoft template - Update skill selection logic to handle 3 providers - Add comprehensive tests for schema and skill selection - Regenerate JSON schema Closes #<issue-number-if-any>
This commit is contained in:
@@ -553,6 +553,18 @@ describe("BrowserAutomationProviderSchema", () => {
|
||||
// then
|
||||
expect(result.success).toBe(false)
|
||||
})
|
||||
|
||||
test("accepts 'playwright-cli' as valid provider", () => {
|
||||
// given
|
||||
const input = "playwright-cli"
|
||||
|
||||
// when
|
||||
const result = BrowserAutomationProviderSchema.safeParse(input)
|
||||
|
||||
// then
|
||||
expect(result.success).toBe(true)
|
||||
expect(result.data).toBe("playwright-cli")
|
||||
})
|
||||
})
|
||||
|
||||
describe("BrowserAutomationConfigSchema", () => {
|
||||
@@ -577,6 +589,17 @@ describe("BrowserAutomationConfigSchema", () => {
|
||||
// then
|
||||
expect(result.provider).toBe("agent-browser")
|
||||
})
|
||||
|
||||
test("accepts playwright-cli provider in config", () => {
|
||||
// given
|
||||
const input = { provider: "playwright-cli" }
|
||||
|
||||
// when
|
||||
const result = BrowserAutomationConfigSchema.parse(input)
|
||||
|
||||
// then
|
||||
expect(result.provider).toBe("playwright-cli")
|
||||
})
|
||||
})
|
||||
|
||||
describe("OhMyOpenCodeConfigSchema - browser_automation_engine", () => {
|
||||
@@ -607,6 +630,18 @@ describe("OhMyOpenCodeConfigSchema - browser_automation_engine", () => {
|
||||
expect(result.success).toBe(true)
|
||||
expect(result.data?.browser_automation_engine).toBeUndefined()
|
||||
})
|
||||
|
||||
test("accepts browser_automation_engine with playwright-cli", () => {
|
||||
// given
|
||||
const input = { browser_automation_engine: { provider: "playwright-cli" } }
|
||||
|
||||
// when
|
||||
const result = OhMyOpenCodeConfigSchema.safeParse(input)
|
||||
|
||||
// then
|
||||
expect(result.success).toBe(true)
|
||||
expect(result.data?.browser_automation_engine?.provider).toBe("playwright-cli")
|
||||
})
|
||||
})
|
||||
|
||||
describe("ExperimentalConfigSchema feature flags", () => {
|
||||
|
||||
Reference in New Issue
Block a user