Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
Signed-off-by: Joe Fusco <[email protected]>
  • Loading branch information
josephfusco committed Nov 28, 2022
1 parent cb2c8cf commit cfad23b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/e2e/example.spec.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
import { loginUser, visitAdminPage } from '@wordpress/e2e-test-utils'

// https://www.wpgraphql.com/2022/02/17/adding-end-2-end-tests-to-wordpress-plugins-using-wp-env-and-wp-scripts
describe( 'example test', () => {
describe('example test', () => {

it ( 'works', () => {
expect( true ).toBeTruthy();
it('works', () => {
expect(true).toBeTruthy();
});

it ( 'verifies the plugin is active', async () => {
it('verifies the plugin is active', async () => {

// login as admin
await loginUser();

// visit the plugins page
await visitAdminPage( 'plugins.php' );
await visitAdminPage('plugins.php');

// Select the plugin based on slug and active class
const activePlugin = await page.$x('//tr[contains(@class, "active") and contains(@data-slug, "wpgraphql-content-blocks")]');

// assert that our plugin is active by checking the HTML
expect( activePlugin?.length ).toBe( 1 );
expect(activePlugin?.length).toBe(1);

});

Expand Down

0 comments on commit cfad23b

Please sign in to comment.