Last active
August 30, 2024 21:07
Revisions
-
dadamssg revised this gist
Aug 30, 2024 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -8,7 +8,7 @@ test('can view contacts', async ({ page }) => { method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify({ // the api I'm pulling data from is running on port 6000. This is what I need to mock url: 'http://localhost:6000/people', method: 'post', once: true, -
dadamssg revised this gist
Aug 30, 2024 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -3,10 +3,12 @@ import { login } from './auth' test('can view contacts', async ({ page }) => { await login({ page }) // remix is running on port 3000 await fetch('http://localhost:3000/app/playwright', { method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify({ // the api i'm interacting with is running on port 6000. This is what i need to mock url: 'http://localhost:6000/people', method: 'post', once: true, -
dadamssg revised this gist
Aug 30, 2024 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -7,7 +7,7 @@ test('can view contacts', async ({ page }) => { method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify({ url: 'http://localhost:6000/people', method: 'post', once: true, response: { -
dadamssg revised this gist
Aug 30, 2024 . 1 changed file with 1 addition and 4 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -16,10 +16,7 @@ test('can view contacts', async ({ page }) => { id: 'abc', firstname: 'Sally', lastname: 'Rogers', email: 'sally@example.com', }, ], }, -
dadamssg created this gist
Aug 30, 2024 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,31 @@ import { expect, test } from '@playwright/test' import { login } from './auth' test('can view contacts', async ({ page }) => { await login({ page }) await fetch('http://localhost:3000/app/playwright', { method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify({ url: 'http://localhost:6000/person/list', method: 'post', once: true, response: { data: [ { id: 'abc', firstname: 'Sally', lastname: 'Rogers', email1: 'sally@example.com', lastupdatedate: '2021-05-13 12:04:05.000', companyid: 'def', cfd_companyname: 'Acme', }, ], }, }), }) await page.goto('/app/contacts') const name = page.getByText('Sally Rogers') await expect(name).toHaveText('Sally Rogers') })