This commit is contained in:
Liyas Thomas
2020-06-19 12:26:04 +05:30
parent fcbc738088
commit 1587a44cd7
33 changed files with 63 additions and 77 deletions

View File

@@ -1,7 +1,5 @@
describe("Visit Home", () => {
it('Have a page title with "Postwoman"', () => {
cy.visit("/", { retryOnStatusCodeFailure: true })
.get("title")
.should("contain", "Postwoman")
cy.visit("/", { retryOnStatusCodeFailure: true }).get("title").should("contain", "Postwoman")
})
})

View File

@@ -3,13 +3,13 @@ describe("Authentication", () => {
cy.visit(`?&auth=Basic Auth&httpUser=foo&httpPassword=bar`, { retryOnStatusCodeFailure: true })
.get('input[name="http_basic_user"]', { timeout: 500 })
.invoke("val")
.then(user => {
.then((user) => {
expect(user === "foo").to.equal(true)
})
.get('input[name="http_basic_passwd"]')
.invoke("val")
.then(pass => {
.then((pass) => {
expect(pass === "bar").to.equal(true)
})
})

View File

@@ -18,7 +18,7 @@ describe("Proxy enabled - external request", () => {
.click()
.get("#response-details-wrapper", { timeout: 24000 })
.should("be.visible")
.should($wrapper => {
.should(($wrapper) => {
expect($wrapper).to.contain("Hello World")
})
})