Lint
This commit is contained in:
@@ -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")
|
||||
})
|
||||
})
|
||||
|
||||
@@ -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)
|
||||
})
|
||||
})
|
||||
|
||||
@@ -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")
|
||||
})
|
||||
})
|
||||
|
||||
@@ -6,14 +6,9 @@
|
||||
* @param { String } method The fake request method
|
||||
*/
|
||||
Cypress.Commands.add("seedAndVisit", (seedData, path = "/", method = "GET") => {
|
||||
cy.server()
|
||||
.route(method, "https://api.thecatapi.com/", `fixture:${seedData}`)
|
||||
.as("load")
|
||||
cy.server().route(method, "https://api.thecatapi.com/", `fixture:${seedData}`).as("load")
|
||||
|
||||
cy.visit(path)
|
||||
.get("#send")
|
||||
.click()
|
||||
.wait("@load")
|
||||
cy.visit(path).get("#send").click().wait("@load")
|
||||
})
|
||||
|
||||
/**
|
||||
@@ -21,7 +16,7 @@ Cypress.Commands.add("seedAndVisit", (seedData, path = "/", method = "GET") => {
|
||||
* This function will enable the proxy and navigate back to a given path
|
||||
* @param { String } goBackPath The page go back
|
||||
*/
|
||||
Cypress.Commands.add("enableProxy", goBackPath => {
|
||||
Cypress.Commands.add("enableProxy", (goBackPath) => {
|
||||
cy.visit("/settings")
|
||||
.get("#proxy")
|
||||
.find(".toggle")
|
||||
|
||||
Reference in New Issue
Block a user