Download wp-calypso/packages/calypso-e2e/src/lib/flows/close-account-flow.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 781 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/packages/calypso-e2e/src/lib/flows/close-account-flow.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/packages/calypso-e2e/src/lib/flows/close-account-flow.ts
-
curl -L -o close-account-flow.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/packages/calypso-e2e/src/lib/flows/close-account-flow.ts
781 Bytes
| import { Page } from 'playwright'; | |
| import { AccountSettingsPage, AccountClosedPage } from '../pages'; | |
| /** | |
| * Closes the ccount. | |
| */ | |
| export class CloseAccountFlow { | |
| private page: Page; | |
| /** | |
| * Constructs an instance of the flow. | |
| * | |
| * @param {Page} page The underlying page. | |
| */ | |
| constructor( page: Page ) { | |
| this.page = page; | |
| } | |
| /** | |
| * Closes the account. | |
| * | |
| * This method will navigate from the navbar to the /me page, | |
| * then onto Account Settings. | |
| */ | |
| async closeAccount(): Promise< void > { | |
| const accountSettingsPage = new AccountSettingsPage( this.page ); | |
| await accountSettingsPage.visit(); | |
| await accountSettingsPage.closeAccount(); | |
| const accountClosedPage = new AccountClosedPage( this.page ); | |
| await accountClosedPage.confirmAccountClosed(); | |
| } | |
| } | |