-
Notifications
You must be signed in to change notification settings - Fork 4
Testing instructions for critical flows
Ensure the seamless installation and activation of the Block Catalog plugin.
- Install the Block Catalog plugin from the WordPress repository.
- Activate the plugin.
- Verify that there are no activation errors or conflicts with other plugins
No activation errors or conflicts with other plugins should be displayed.
Ensure that the blocks catalog option is visible in 'Tools' and you can index post type.
- Go to the Tools -> Block Catalog
- Select Post Type(s)
- Click on Index
- Selected post type should be indexed.
- 'View Block Catalog' link should be appeared with the number of post indexed on Success message banner.
Ensure that block catalog list should be appeared when you index the posts.
- Go to the Tools -> Block Catalog
- Select Post Type(s)
- Click on Index
- Go to Posts -> Block Catalog
- Ensure that indexed posts' blocks are listed in the block catalog.
- Make sure the block name, block slug, and count appeared correctly on the block catalog listing.
Ensure that you can add new block catalog.
- Go to Posts -> Block Catalog
- Add Name, Slug, Parent Category
- Click on "Add New Block Catalog"
Block catalog should be added in the list.
Make sure indexed post type should be delete when you click on 'Delete Index' Button.
- Go to the Tools -> Block Catalog
- Select Post Type(s)
- Click on Index
- Click on Delete Index button
- Indexed post type should be deleted.
- Make sure there is no block catalog available in block catalog list.
Verify that you can see the block catalog in any post type list view (Ex. Post, Page)
- Go to the Tools -> Block Catalog
- Select Post Type(s)
- Click on Index
- Go to Posts > Click on All Posts
- Each article row in the article list displays the block catalog.
You should be able to filter by used block on the listing page for post types
- Go to the Tools -> Block Catalog
- Select Post Type(s)
- Click on Index
- Go to Posts > Click on All Posts
- Go to Filter and Select block by click on "All block" dropdown
- Click on filter
- As a result, you will see a list of posts that have used a block that you have filtered
Make sure you can perform iterations through all posts to catalog them one at a time by following command
[--reset] Deletes the previous index before starting.
[--only=] Limits the command to the specified comma delimited post ids.
[--network=] Indexes the entire network. Accepts a comma delimited list of child site ids.
[--dry-run] Runs catalog without saving changes to the DB.
- Go to plugin directory and open console
- Run wp block-catalog index [--only=] [--dry-run]
- Based on the ran command, you should get the results (Ex. If you run [--dry-run] then Runs catalog without saving changes to the DB)
Ensure you can run the following command and you will see the results as described below.
-
wp block-catalog find <blocks>... [--index] [--fields] [--format] [--post_type] [--posts_per_page] [--post_status] [--count=<count>] [--operator=<operator>]
Finds the list of posts having the specified block(s)-
<blocks>... The block names to search for, eg:- core/embed
-
[--index] Whether to re-index before searching.
-
[--fields=<fields>] List of post fields to display.
-
[--format=<format>] Output format, default table.
-
[--post_type=<post_type>] Limit search to specified post types.
-
[--posts_per_page=<posts_per_page>] Number of posts to find per page, default 20
-
[--post_status=<post_status>] Post status of posts to search, default 'publish'
-
[--count=<count>] Prints total found posts, default true. When combined with
--network
prints an aggregate across the multisite. -
[--operator=<operator>] The query operator to be used in the search clause. Default IN.
-
[--network=<network>] Searches across the entire network if on multisite. Accepts a comma delimited list of child site ids.
-
-
wp block-catalog delete-index
Resets the Block Catalog by removing all catalog terms.- [--network=<network>] Deletes the indexes across the entire network. Accepts a comma delimited list of child site ids.
-
wp block-catalog post-blocks <post-id> [--index]
Prints the list of blocks in the specified post.- <post-id> The post id to lookup blocks for.
-
wp block-catalog export [--output=<output>] [--post_type=<types>] [--posts_per_block=<number>] [--ignore_parent=<ignore_parent>]
Exports the posts associated with the 'block_catalog' taxonomy to a CSV file.-
[--output=<output>]
Path to the CSV file. Defaults to/tmp/block-catalog.csv
. -
[--post_type=<types>]
Comma-delimited list of post types. Optional. -
[--posts_per_block=<number>]
Number of posts per block, default to -1 (all). Optional. -
[--ignore_parent=<ignore_parent>]
Ignore top level blocks. Optional. Default true.
-
- Go to plugin directory and open console
- Run wp block-catalog {Command}
- Based on the ran command, you should get the results (Ex. If you run [--index] Whether to re-index before searching.)