forked from MarohnHoward/qaHomeworkWiki
-
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
Marohn Howard
committed
May 16, 2022
1 parent
de5ebb2
commit d3d9e52
Showing
3 changed files
with
78 additions
and
1 deletion.
There are no files selected for viewing
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 +1,11 @@ | ||
export function myFunction() {} | ||
export function myFunction(myNum: number): string { | ||
if (myNum == 5) { | ||
return 'true' | ||
} else if() { | ||
|
||
}else if (){ | ||
|
||
}else { | ||
|
||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import {Builder,By, Capabilities, until, WebDriver, } from "selenium-webdriver"; | ||
const chromedriver = require("chromedriver"); | ||
|
||
const driver: WebDriver = new Builder() | ||
.withCapabilities(Capabilities.chrome()) | ||
.build(); | ||
|
||
class employeePage { | ||
driver: WebDriver; | ||
url: string = "https://devmountain-qa.github.io/employee-manager/1.2_Version/index.html"; | ||
//FILL OUT LOCATORS CONSTRUCTOR AND METHODS IN ORDER TO PASS THE TEST | ||
} | ||
|
||
describe("Employee Manger Test", () => { | ||
beforeEach(async () => { | ||
await employeePage.navigate(); | ||
}) | ||
afterAll(async () => { | ||
await driver.quit() | ||
}) | ||
test("adding an employee", async () => { | ||
await driver.wait(until.elementLocated(emPage.header)) | ||
await driver.findElement(emPage.addEmployee).click() | ||
await driver.findElement(emPage.newEmployee).click() | ||
await driver.findElement(emPage.nameInput).click() | ||
await driver.findElement(emPage.nameInput).clear() | ||
await driver.findElement(emPage.nameInput).sendKeys("Change this") | ||
await driver.findElement(emPage.phoneInput).click() | ||
await driver.findElement(emPage.phoneInput).clear() | ||
await driver.findElement(emPage.phoneInput).sendKeys("Change this") | ||
await driver.findElement(emPage.titleInput).click() | ||
await driver.findElement(emPage.titleInput).clear() | ||
await driver.findElement(emPage.titleInput).sendKeys("Change this") | ||
}) |
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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import {Builder, By, Capabilities, WebDriver} from "selenium-webdriver" | ||
|
||
const chromedriver = require("chromedriver") | ||
|
||
const driver: WebDriver = new Builder().withCapabilities(Capabilities.chrome()).build(); | ||
|
||
describe("Filling in the blanks", () => { | ||
beforeEach(async () => { | ||
await driver.get('https://devmountain-qa.github.io/enter-wanted/1.4_Assignment/index.html') | ||
}); | ||
afterAll(async () => { | ||
await driver.quit(); | ||
}) | ||
|
||
const hdrInput: By = By. //fill in the blank | ||
const mkeInput: By = By. //fill in the blank | ||
const oaiInput: By = By. //fill in the blank | ||
const nameInput: By = By. //fill in the blank | ||
const clrBtn: By = By. //fill in blank | ||
const submitBtn: By = By. //fill in blank | ||
const errorMsg: By = By. // fill in blank | ||
|
||
test("filling in the blanks for real", () => { | ||
await driver.findElement(hdrInput).sendKeys("Change this") | ||
await driver.findElement(mkeInput).sendKeys("change this") | ||
await driver.findElement(oaiInput).sendKeys("change this") | ||
await driver.findElement(nameInput).sendKeys("change this") | ||
await driver.findElement(submitBtn).click() | ||
expect(errorMsg).toContain("Errors Received:") | ||
await driver.findElement(clrBtn).click() | ||
|
||
}) | ||
}) |