@cypress/core-desktop-gui
Version:
Desktop GUI for managing Cypress projects.
56 lines (38 loc) • 1.39 kB
text/coffeescript
describe "About", ->
beforeEach ->
cy
.viewport(300, 230)
.visit("/about")
.window().then (win) ->
{, } = win
= cy.agents()
.spy(, "ipc")
= "1.78"
.handle("get:options", null, {version: })
it "has about title", ->
= "logo.png"
.handle("get:about:logo:src", null, )
cy.title().should("include", "About")
context "Cypress logo", ->
it "triggers get:about:logo:src on about app start", ->
cy
.then ->
expect(.ipc).to.be.calledWith("get:about:logo:src")
it "logo img sets src to logo:src", ->
= "logo.png"
.handle("get:about:logo:src", null, )
cy
.get("img")
.should("have.attr", "src")
.and("include", )
it "gracefully handles logo err", ->
.handle("get:about:logo:src", {message: "foobar"}, {})
cy.contains("Version").should("be.visible")
it "displays app version", ->
.handle("get:about:logo:src", null, "logo.png")
cy.get(".version").contains()
it "triggers external:open on click of link to cypress.io", ->
.handle("get:about:logo:src", null, "logo.png")
cy
.contains("a", "www.cypress.io").click().then ->
expect(.ipc).to.be.calledWith("external:open", "https://cypress.io")