// Version: 1.0.0
import {jestState} from '../form.spec';
/**
 * Run login process.
 * Standalone test to perform login before further actions.
 * @return {Promise<void>}
 * @private
 */
export async function __runLogin() {
    await jestState.page.goto(jestState.envData.root + '/wp-login.php', {waitUntil: 'load'});
    await jestState.page.waitForSelector('[id=loginform]');
    await jestState.page.click('input[id=user_login]');
    await jestState.page.type('input[id=user_login]', jestState.envData.wp_login);
    await jestState.page.click('input[id=user_pass]');
    await jestState.page.type('input[id=user_pass]', jestState.envData.wp_password);
    await jestState.page.click('input[id=wp-submit]');
    await jestState.page.waitForSelector('#wp-admin-bar-my-account');
}
