This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"scripts": { | |
"dev": "webpack --watch --mode development", | |
"test:e2e": "npm run production && npx playwright test", | |
"production": "webpack --mode production" | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { test, expect } from '@playwright/test' | |
test( 'site works', async ( { page } ) => { | |
await page.goto( '/wp-login.php' ) | |
const heading = page.getByRole( 'heading', { name: 'Powered by WordPress' } ) | |
await expect( heading ).toBeVisible() | |
} ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { chromium } from '@playwright/test' | |
async function globalSetup( config ) { | |
const { baseURL } = config.projects[0].use | |
const browser = await chromium.launch() | |
const page = await browser.newPage() | |
try { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const config = { | |
globalSetup: require.resolve( './tests/e2e/globalSetup.js' ), | |
testDir: 'tests/e2e', | |
testMatch: '**/*.js', | |
use: { | |
baseURL: 'http://localhost:8080', // UPDATE THIS WITH YOUR LOCAL ENVIRONMENT URL. | |
screenshot: 'only-on-failure', | |
timeout: 60000, | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { chromium } from '@playwright/test' | |
async function globalSetup( config ) { | |
const { baseURL } = config.projects[0].use | |
const browser = await chromium.launch() | |
const page = await browser.newPage() | |
try { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: WDS GIF API | |
* Plugin URI: http://webdevstudios.com | |
* Description: Adds a Custom Post Type to store GIFs and an API JSON Endpoint to access GIFs by a tag. | |
* Author: WebDevStudios | |
* Author URI: http://webdevstudios.com | |
* Version: 1.0.0 | |
* License: GPLv2 | |
*/ |