forked from dilpreetj/playwright-course
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
20 additions
and
1 deletion.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
import { test, expect } from '@playwright/test'; | ||
import ContactPage from '../pages/contact.page'; | ||
import { faker } from '@faker-js/faker'; | ||
|
||
test.describe('Contact', () => { | ||
let contactPage: ContactPage; | ||
|
@@ -11,7 +12,7 @@ test.describe('Contact', () => { | |
await contactPage.navigate() | ||
|
||
// fill out the input fields and submit | ||
await contactPage.submitForm('test name', '[email protected]', '123789123', 'Hello! this is taking advantage of POM'); | ||
await contactPage.submitForm(faker.name.findName(), faker.internet.email(), faker.phone.number(), faker.lorem.paragraphs(2)); | ||
|
||
// verify success message | ||
await expect(contactPage.successTxt).toHaveText('Thanks for contacting us! We will be in touch with you shortly') | ||
|