mirror of
https://github.com/microsoft/playwright-mcp.git
synced 2026-02-03 08:53:38 +00:00
test: verify the log in close/navigate test (#505)
This commit is contained in:
@@ -37,7 +37,7 @@ test('default to allow all', async ({ server, client }) => {
|
||||
});
|
||||
|
||||
test('blocked works', async ({ startClient }) => {
|
||||
const client = await startClient({
|
||||
const { client } = await startClient({
|
||||
args: ['--blocked-origins', 'microsoft.com;example.com;playwright.dev']
|
||||
});
|
||||
const result = await fetchPage(client, 'https://example.com/');
|
||||
@@ -46,7 +46,7 @@ test('blocked works', async ({ startClient }) => {
|
||||
|
||||
test('allowed works', async ({ server, startClient }) => {
|
||||
server.setContent('/ppp', 'content:PPP', 'text/html');
|
||||
const client = await startClient({
|
||||
const { client } = await startClient({
|
||||
args: ['--allowed-origins', `microsoft.com;${new URL(server.PREFIX).host};playwright.dev`]
|
||||
});
|
||||
const result = await fetchPage(client, server.PREFIX + 'ppp');
|
||||
@@ -54,7 +54,7 @@ test('allowed works', async ({ server, startClient }) => {
|
||||
});
|
||||
|
||||
test('blocked takes precedence', async ({ startClient }) => {
|
||||
const client = await startClient({
|
||||
const { client } = await startClient({
|
||||
args: [
|
||||
'--blocked-origins', 'example.com',
|
||||
'--allowed-origins', 'example.com',
|
||||
@@ -65,7 +65,7 @@ test('blocked takes precedence', async ({ startClient }) => {
|
||||
});
|
||||
|
||||
test('allowed without blocked blocks all non-explicitly specified origins', async ({ startClient }) => {
|
||||
const client = await startClient({
|
||||
const { client } = await startClient({
|
||||
args: ['--allowed-origins', 'playwright.dev'],
|
||||
});
|
||||
const result = await fetchPage(client, 'https://example.com/');
|
||||
@@ -74,7 +74,7 @@ test('allowed without blocked blocks all non-explicitly specified origins', asyn
|
||||
|
||||
test('blocked without allowed allows non-explicitly specified origins', async ({ server, startClient }) => {
|
||||
server.setContent('/ppp', 'content:PPP', 'text/html');
|
||||
const client = await startClient({
|
||||
const { client } = await startClient({
|
||||
args: ['--blocked-origins', 'example.com'],
|
||||
});
|
||||
const result = await fetchPage(client, server.PREFIX + 'ppp');
|
||||
|
||||
Reference in New Issue
Block a user