2022-03-11 07:06:35 +00:00
|
|
|
import { browser, logging } from "protractor"
|
|
|
|
import { AppPage } from "./app.po"
|
2019-11-29 02:20:50 +00:00
|
|
|
|
2022-03-11 07:06:35 +00:00
|
|
|
describe("workspace-project App", (): void => {
|
|
|
|
let page: AppPage
|
2019-11-29 02:20:50 +00:00
|
|
|
|
2020-07-08 00:20:02 +00:00
|
|
|
beforeEach((): void => {
|
2022-03-11 07:06:35 +00:00
|
|
|
page = new AppPage()
|
|
|
|
})
|
2019-11-29 02:20:50 +00:00
|
|
|
|
2022-03-11 07:06:35 +00:00
|
|
|
it("should display welcome message", (): void => {
|
|
|
|
void page.navigateTo()
|
|
|
|
void expect(page.getTitleText()).toEqual("public-gateway-cacher app is running!")
|
|
|
|
})
|
2019-11-29 02:20:50 +00:00
|
|
|
|
2020-07-08 00:20:02 +00:00
|
|
|
afterEach(async (): Promise<void> => {
|
2019-11-29 02:20:50 +00:00
|
|
|
// Assert that there are no errors emitted from the browser
|
2022-03-11 07:06:35 +00:00
|
|
|
const logs = await browser.manage().logs().get(logging.Type.BROWSER)
|
|
|
|
const expected: Partial<logging.Entry> = {
|
2019-11-29 02:20:50 +00:00
|
|
|
level: logging.Level.SEVERE,
|
2022-03-11 07:06:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void expect(logs).not.toContain(jasmine.objectContaining(expected))
|
|
|
|
})
|
|
|
|
})
|