-
Notifications
You must be signed in to change notification settings - Fork 94
Expand file tree
/
Copy pathfont-collection.feature
More file actions
82 lines (70 loc) · 2.58 KB
/
font-collection.feature
File metadata and controls
82 lines (70 loc) · 2.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
Feature: Manage WordPress font collections
Background:
Given a WP install
@require-wp-6.5
Scenario: Listing font collections
When I try `wp font collection list`
Then STDOUT should be a table containing rows:
| slug | name | description |
| google-fonts | Google Fonts | Install from Google Fonts. Fonts are copied to and served from your site. |
@require-wp-6.5
Scenario: Getting a non-existent font collection
When I try `wp font collection get nonexistent-collection`
Then the return code should be 1
And STDERR should contain:
"""
doesn't exist
"""
@require-wp-6.5
Scenario: Checking whether a font collection is registered
When I try `wp font collection is-registered nonexistent-collection`
Then the return code should be 1
When I run `wp font collection is-registered google-fonts`
Then the return code should be 0
@require-wp-6.5
Scenario: Listing font families in a collection
When I run `wp font collection list-families google-fonts --format=count`
Then STDOUT should be a number
@require-wp-6.5
Scenario: Listing font families in a collection with fields
When I run `wp font collection list-families google-fonts --fields=slug,name --format=csv`
Then STDOUT should contain:
"""
slug,name
"""
@require-wp-6.5
Scenario: Filtering font families by category
When I run `wp font collection list-families google-fonts --category=sans-serif --format=count`
Then STDOUT should be a number
@require-wp-6.5
Scenario: Listing categories in a collection
When I run `wp font collection list-categories google-fonts --format=csv`
Then STDOUT should contain:
"""
slug,name
"""
@require-wp-6.5
Scenario: Getting a non-existent collection for list-families
When I try `wp font collection list-families nonexistent-collection`
Then the return code should be 1
And STDERR should contain:
"""
doesn't exist
"""
@require-wp-6.5
Scenario: Getting a non-existent collection for list-categories
When I try `wp font collection list-categories nonexistent-collection`
Then the return code should be 1
And STDERR should contain:
"""
doesn't exist
"""
@less-than-wp-6.5
Scenario: Font collection commands fail on WordPress < 6.5
Given a WP install
When I try `wp font collection list`
Then the return code should be 1
And STDERR should contain:
"""
Requires WordPress 6.5 or greater
"""