Skip to content

Commit

Permalink
feat: add 2 spec files and change one file name (#576)
Browse files Browse the repository at this point in the history
* feat: add 2 spec files and change one file name

* fix: changes url and titles to specs

* fix: added new url

* fix: specs

Co-authored-by: Parinita Mulak <pghorpade@library.ucla.edu>
  • Loading branch information
matheusgomes062 and pghorpade authored Dec 8, 2022
1 parent f00343c commit fea6e2f
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 0 deletions.
19 changes: 19 additions & 0 deletions cypress/integration/resource.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
describe("Resource page", () => {
it("Visit a Resource Page", () => {
cy.visit("help/services-resources/animals")

// UCLA Library brand
cy.get(".logo-ucla").should("be.visible")
cy.get("h1.title").should(
"contain",
`Animals are Excellent and Flowers are Fluffy`
)
})

context("When there isn't an entry in craft", () => {
it("Raises a 404 error", () => {
// cy.visit("/about/blogs/no_entry", {failOnStatusCode: false})
cy.request({url: "/help/services-resources/no_entry", failOnStatusCode: false}).its("status").should("equal", 404)
})
})
})
19 changes: 19 additions & 0 deletions cypress/integration/service.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
describe("Service page", () => {
it("Visit a Service page", () => {
cy.visit("help/services-resources/service-with-all-flexible-page-block-types")

// UCLA Library brand
cy.get(".logo-ucla").should("be.visible")
cy.get("h1.title").should(
"contain",
`Service with all flexible page block types`
)
})

context("When there isn't an entry in craft", () => {
it("Raises a 404 error", () => {
// cy.visit("/about/blogs/no_entry", {failOnStatusCode: false})
cy.request({url: "/help/services-resources/no_entry", failOnStatusCode: false}).its("status").should("equal", 404)
})
})
})
File renamed without changes.

4 comments on commit fea6e2f

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.