Skip to content

Commit

Permalink
setting base url as variable
Browse files Browse the repository at this point in the history
  • Loading branch information
stevector committed Dec 18, 2023
1 parent d72f07d commit 073638d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
2 changes: 1 addition & 1 deletion tests/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default defineConfig({
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
use: {
/* Base URL to use in actions like `await page.goto('/')`. */
// baseURL: 'http://127.0.0.1:3000',
baseURL: process.env.GITHUB_PR_NUMBER ? 'https://pr-' + process.env.GITHUB_PR_NUMBER + '-documentation.appa.pantheon.site' : 'http://localhost:8000',

/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
trace: 'on-first-retry',
Expand Down
13 changes: 1 addition & 12 deletions tests/tests/example.spec.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,8 @@
import { test, expect } from '@playwright/test';

test('has title', async ({ page }) => {
await page.goto('https://pr-8804-documentation.appa.pantheon.site/release-notes');
await page.goto('/release-notes');

// Expect a title "to contain" a substring.
await expect(page).toHaveTitle(/Pantheon Release Notes/);
});
/*
test('get started link', async ({ page }) => {
await page.goto('https://playwright.dev/');
// Click the get started link.
await page.getByRole('link', { name: 'Get started' }).click();
// Expects page to have a heading with the name of Installation.
await expect(page.getByRole('heading', { name: 'Installation' })).toBeVisible();
});
*/

0 comments on commit 073638d

Please sign in to comment.