react-code-dataset / wp-calypso /packages /calypso-e2e /src /lib /blocks /block-flows /blog-posts.ts
react-code-dataset / wp-calypso /packages /calypso-e2e /src /lib /blocks /block-flows /blog-posts.ts
Download wp-calypso/packages/calypso-e2e/src/lib/blocks/block-flows/blog-posts.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 836 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/packages/calypso-e2e/src/lib/blocks/block-flows/blog-posts.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/packages/calypso-e2e/src/lib/blocks/block-flows/blog-posts.ts
-
curl -L -o blog-posts.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/packages/calypso-e2e/src/lib/blocks/block-flows/blog-posts.ts
836 Bytes
| import { BlockFlow } from '.'; | |
| const blockParentSelector = '[aria-label="Block: Blog Posts"]'; | |
| /** | |
| * Class representing the flow of using a Newspack Blog Posts block in the editor | |
| */ | |
| export class BlogPostsBlockFlow implements BlockFlow { | |
| blockSidebarName = 'Blog Posts'; | |
| blockEditorSelector = blockParentSelector; | |
| // We are very limited in what we can safely smoke test with the Blog Posts block because it is dependent on other posts. | |
| // There's no guarantee (due to data clean up operations) that there will even be other posts! | |
| // If there are no posts, the block isn't even rendered in the published post. | |
| // Because of this, it's best to minimize false positives and just make sure we can... | |
| // 1. Find and add the block from the sidebar | |
| // 2. Ensure it can be added to the editor without entering an errored state. | |
| } | |