You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: features/connectors.feature
+37-38Lines changed: 37 additions & 38 deletions
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,10 @@ Feature: List and get AI connectors
16
16
Scenario: List connectors returns built-in providers with descriptions
17
17
When I run `wp connectors list --format=json`
18
18
Then STDOUT should contain:
19
+
"""
20
+
"id":"openai"
21
+
"""
22
+
And STDOUT should contain:
19
23
"""
20
24
"name":"OpenAI"
21
25
"""
@@ -49,32 +53,12 @@ Feature: List and get AI connectors
49
53
"""
50
54
51
55
@require-wp-7.0
52
-
Scenario: List connectors in table format shows name, description and status columns
56
+
Scenario: List connectors in table format shows id, name, description and status columns
53
57
When I run `wp connectors list`
54
-
Then STDOUT should contain:
55
-
"""
56
-
name
57
-
"""
58
-
And STDOUT should contain:
59
-
"""
60
-
description
61
-
"""
62
-
And STDOUT should contain:
63
-
"""
64
-
status
65
-
"""
66
-
And STDOUT should contain:
67
-
"""
68
-
OpenAI
69
-
"""
70
-
And STDOUT should contain:
71
-
"""
72
-
Anthropic
73
-
"""
74
-
And STDOUT should contain:
75
-
"""
76
-
Google
77
-
"""
58
+
Then STDOUT should match /^id\tname\tdescription\tstatus$/m
59
+
And STDOUT should match /^anthropic\tAnthropic\t/m
60
+
And STDOUT should match /^google\tGoogle\t/m
61
+
And STDOUT should match /^openai\tOpenAI\t/m
78
62
79
63
@require-wp-7.0
80
64
Scenario: List connectors supports --status filter
@@ -91,25 +75,17 @@ Feature: List and get AI connectors
91
75
@require-wp-7.0
92
76
Scenario: Get a specific connector shows key-value layout
93
77
When I run `wp connectors get openai`
94
-
Then STDOUT should contain:
95
-
"""
96
-
name
97
-
"""
98
-
And STDOUT should contain:
99
-
"""
100
-
OpenAI
101
-
"""
102
-
And STDOUT should contain:
103
-
"""
104
-
status
105
-
"""
78
+
Then STDOUT should match /^Field\tValue$/m
79
+
And STDOUT should match /^id\topenai$/m
80
+
And STDOUT should match /^name\tOpenAI$/m
81
+
And STDOUT should match /^status\t/m
106
82
107
83
@require-wp-7.0
108
84
Scenario: Get a specific connector in JSON format
109
85
When I run `wp connectors get openai --format=json`
110
86
Then STDOUT should be JSON containing:
111
87
"""
112
-
{"name":"OpenAI","description":"Text and image generation with GPT and Dall-E.","status":"not installed","credentials_url":"https://platform.openai.com/api-keys","api_key":""}
88
+
{"id":"openai","name":"OpenAI","description":"Text and image generation with GPT and Dall-E.","status":"not installed","credentials_url":"https://platform.openai.com/api-keys","api_key":""}
113
89
"""
114
90
115
91
# TODO: Depends on https://core.trac.wordpress.org/ticket/64819.
@@ -143,6 +119,29 @@ Feature: List and get AI connectors
0 commit comments