Skip to content

Commit

Permalink
Add block flow for test
Browse files Browse the repository at this point in the history
  • Loading branch information
Imran92 committed Oct 10, 2024
1 parent 94899f8 commit 1472a47
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions test/e2e/specs/blocks/blocks__media.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,13 @@ import {
envVariables,
getTestAccountByFeature,
envToFeatureKey,
BlockFlow,
LayoutGridBlockFlow,
YouTubeBlockFlow,
} from '@automattic/calypso-e2e';
import { Page, Browser } from 'playwright';
import { TEST_IMAGE_PATH, TEST_AUDIO_PATH, TEST_VIDEO_PATH } from '../constants';
import { createBlockTests } from './shared/block-smoke-testing';

declare const browser: Browser;

Expand Down Expand Up @@ -169,3 +173,16 @@ describe( DataHelper.createSuiteTitle( 'Blocks: Media (Upload)' ), function () {
} );
} );
} );

const blockFlows: BlockFlow[] = [
new YouTubeBlockFlow( {
embedUrl: 'https://www.youtube.com/watch?v=twGLN4lug-I',
expectedVideoTitle: 'Getting Started on @wordpress-com',
} ),
new LayoutGridBlockFlow( {
leftColumnText: DataHelper.getRandomPhrase(),
rightColumnText: DataHelper.getRandomPhrase(),
} ),
];

createBlockTests( 'Blocks: Core', blockFlows );

0 comments on commit 1472a47

Please sign in to comment.