Skip to content

Commit 320de7b

Browse files
committed
Try to fix flaky test with a regex
1 parent 4bb39ec commit 320de7b

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

features/core-check-update.feature

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,18 @@ Feature: Check for more recent versions
99
When I run `wp core download --version=5.8 --force`
1010
Then STDOUT should not be empty
1111

12-
When I run `wp core check-update`
13-
Then STDOUT should be a table containing rows:
14-
| version | update_type | package_url |
15-
| {WP_VERSION-latest} | major | https://downloads.wordpress.org/release/wordpress-{WP_VERSION-latest}.zip |
16-
| {WP_VERSION-5.8-latest} | minor | https://downloads.w.org/release/wordpress-{WP_VERSION-5.8-latest}-partial-0.zip |
12+
When I run `wp core check-update --format=csv`
13+
Then STDOUT should match #^{WP_VERSION-latest},major,https://downloads.(w|wordpress).org/release/wordpress-{WP_VERSION-latest}.zip$#
14+
And STDOUT should match #^{WP_VERSION-5.8-latest},minor,https://downloads.(w|wordpress).org/release/wordpress-{WP_VERSION-5.8-latest}-partial-0.zip$#
1715

1816
When I run `wp core check-update --format=count`
1917
Then STDOUT should be:
2018
"""
2119
2
2220
"""
2321

24-
When I run `wp core check-update --major`
25-
Then STDOUT should be a table containing rows:
26-
| version | update_type | package_url |
27-
| {WP_VERSION-latest} | major | https://downloads.wordpress.org/release/wordpress-{WP_VERSION-latest}.zip |
22+
When I run `wp core check-update --major --format=csv`
23+
Then STDOUT should match #^{WP_VERSION-latest},major,https://downloads.(w|wordpress).org/release/wordpress-{WP_VERSION-latest}.zip$#
2824

2925
When I run `wp core check-update --major --format=count`
3026
Then STDOUT should be:
@@ -33,9 +29,7 @@ Feature: Check for more recent versions
3329
"""
3430

3531
When I run `wp core check-update --minor`
36-
Then STDOUT should be a table containing rows:
37-
| version | update_type | package_url |
38-
| {WP_VERSION-5.8-latest} | minor | https://downloads.w.org/release/wordpress-{WP_VERSION-5.8-latest}-partial-0.zip |
32+
Then STDOUT should match #^{WP_VERSION-5.8-latest},minor,https://downloads.(w|wordpress).org/release/wordpress-{WP_VERSION-5.8-latest}-partial-0.zip$#
3933

4034
When I run `wp core check-update --minor --format=count`
4135
Then STDOUT should be:

0 commit comments

Comments
 (0)