| | |
| | |
| | |
| | |
| |
|
| | import { |
| | DataHelper, |
| | EditorPage, |
| | envToFeatureKey, |
| | envVariables, |
| | getTestAccountByFeature, |
| | TestAccount, |
| | } from '@automattic/calypso-e2e'; |
| | import { Browser, Page } from 'playwright'; |
| | import { skipDescribeIf } from '../../jest-helpers'; |
| |
|
| | declare const browser: Browser; |
| |
|
| | const isPrivateSite = envVariables.TEST_ON_ATOMIC && envVariables.ATOMIC_VARIATION === 'private'; |
| | |
| | |
| | |
| | |
| | |
| | skipDescribeIf( isPrivateSite )( |
| | DataHelper.createSuiteTitle( 'Social: Editor Smoke test' ), |
| | function () { |
| | let page: Page; |
| | let editorPage: EditorPage; |
| |
|
| | let siteSlug: string; |
| |
|
| | beforeAll( async () => { |
| | page = await browser.newPage(); |
| | editorPage = new EditorPage( page ); |
| |
|
| | const accountName = getTestAccountByFeature( envToFeatureKey( envVariables ) ); |
| | const testAccount = new TestAccount( accountName ); |
| | siteSlug = testAccount.getSiteURL( { protocol: false } ); |
| | await testAccount.authenticate( page ); |
| | } ); |
| |
|
| | it( 'Verify that Social UI is visible', async function () { |
| | await editorPage.visit( 'post', { siteSlug } ); |
| |
|
| | |
| | await editorPage.openSettings( 'Jetpack' ); |
| |
|
| | |
| | await editorPage.expandSection( 'Share this post' ); |
| |
|
| | const editorParent = await editorPage.getEditorParent(); |
| |
|
| | const toggle = editorParent.getByLabel( 'Share when publishing' ); |
| |
|
| | await toggle.waitFor(); |
| | } ); |
| | } |
| | ); |
| |
|