PHP Classes

File: tests/e2e/specs/env.spec.js

Recommend this page to a friend!
  Classes of Maniruzzaman Akash   WordPress React Plugin Kit   tests/e2e/specs/env.spec.js   Download  
File: tests/e2e/specs/env.spec.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: WordPress React Plugin Kit
Environment to develop new WordPress plugins
Author: By
Last change:
Date: 1 year ago
Size: 598 bytes
 

Contents

Class file image Download
// Load utilities from the e2e-test-utils package. import { visitAdminPage } from '@wordpress/e2e-test-utils'; describe('Environment Setup Test', () => { it('Should load properly', async () => { try { // Navigate the admin and performs tasks // Use Puppeteer APIs to interact with mouse, keyboard... await visitAdminPage('/', ''); } catch (error) {} // Assertions const nodes = await page.$x( '//h2[contains(text(), "Welcome to WordPress!")]' ); expect(nodes.length).not.toEqual(0); }); });