-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
388019e
commit aa3ad05
Showing
13 changed files
with
767 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
node_modules | ||
yarn-error.log | ||
exampleSite/public/* | ||
cypress/videos | ||
cypress/plugins | ||
cypress/screenshots | ||
cypress/support |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"baseUrl": "http://localhost:1313" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"name": "Using fixtures to represent data", | ||
"email": "[email protected]", | ||
"body": "Fixtures are a great way to mock data for responses to routes" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
describe("Fragment structure", () => { | ||
it("should display fragments from global", () => { | ||
cy.visit("/dev/fragment-fallthrough"); | ||
cy.get("#nav").should("have.length", 1); | ||
cy.get("#hero").should("have.length", 1); | ||
cy.get("#content").should("have.length", 1); | ||
cy.get("#copyright").should("have.length", 1); | ||
cy.get("#footer").should("have.length", 1); | ||
}); | ||
|
||
it("should support fragment falltrough", () => { | ||
cy.visit("/dev/fragment-fallthrough"); | ||
cy.get("#hero .hero-subtitle").should( | ||
"contain", | ||
"If you see this, directory fragment fallthrough is working" | ||
); | ||
cy.get("#content h2").should("contain", "Content fragment from Page"); | ||
cy.get("#copyright .copyright-notice").should( | ||
"contain", | ||
"This is loaded from globals of the current section" | ||
); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
describe("List fragment", () => { | ||
it("should display pages from same, specific section, with subsections and with subsection leaves", () => { | ||
cy.visit("/dev/list"); | ||
cy.get("#upper-leaves article").should("have.length", 4); | ||
cy.get("#branches article").should("have.length", 6); | ||
cy.get("#leaves article").should("have.length", 10); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
describe("Navbar", () => { | ||
it("should display proper breadcrumb", () => { | ||
cy.visit("/dev"); | ||
cy.get(".breadcrumb li").should("have.length", 1); | ||
cy.get(".breadcrumb li").should("contain", "Dev section"); | ||
cy.get(".breadcrumb li a").should("have.length", 0); | ||
|
||
cy.visit("/dev/blog"); | ||
cy.get(".breadcrumb li").should("have.length", 2); | ||
cy.get(".breadcrumb li:nth-child(1) a").should("have.length", 1); | ||
cy.get(".breadcrumb li:nth-child(2)").should("contain", "Blog"); | ||
cy.get(".breadcrumb li:nth-child(2) a").should("have.length", 0); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
describe("Image Fallthrough", () => { | ||
it("should display image from fragment", () => { | ||
cy.visit("/dev/resource-fallthrough/fragment/"); | ||
cy.get("#hero .header-image").should( | ||
"have.css", | ||
"background-image", | ||
'url("http://localhost:1313/dev/resource-fallthrough/fragment/hero/resource_logo.svg")' | ||
); | ||
}); | ||
|
||
it("should display image from page", () => { | ||
cy.visit("/dev/resource-fallthrough/page/"); | ||
cy.get("#hero .header-image").should( | ||
"have.css", | ||
"background-image", | ||
'url("http://localhost:1313/dev/resource-fallthrough/page/resource_logo.svg")' | ||
); | ||
}); | ||
|
||
it("should display image from global", () => { | ||
cy.visit("/dev/resource-fallthrough/global/"); | ||
cy.get("#hero .header-image").should( | ||
"have.css", | ||
"background-image", | ||
'url("http://localhost:1313/images/resource_logo.svg")' | ||
); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// *********************************************************** | ||
// This example plugins/index.js can be used to load plugins | ||
// | ||
// You can change the location of this file or turn off loading | ||
// the plugins file with the 'pluginsFile' configuration option. | ||
// | ||
// You can read more here: | ||
// https://on.cypress.io/plugins-guide | ||
// *********************************************************** | ||
|
||
// This function is called when a project is opened or re-opened (e.g. due to | ||
// the project's config changing) | ||
|
||
module.exports = (on, config) => { | ||
// `on` is used to hook into various events Cypress emits | ||
// `config` is the resolved Cypress config | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// *********************************************** | ||
// This example commands.js shows you how to | ||
// create various custom commands and overwrite | ||
// existing commands. | ||
// | ||
// For more comprehensive examples of custom | ||
// commands please read more here: | ||
// https://on.cypress.io/custom-commands | ||
// *********************************************** | ||
// | ||
// | ||
// -- This is a parent command -- | ||
// Cypress.Commands.add("login", (email, password) => { ... }) | ||
// | ||
// | ||
// -- This is a child command -- | ||
// Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... }) | ||
// | ||
// | ||
// -- This is a dual command -- | ||
// Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... }) | ||
// | ||
// | ||
// -- This will overwrite an existing command -- | ||
// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... }) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// *********************************************************** | ||
// This example support/index.js is processed and | ||
// loaded automatically before your test files. | ||
// | ||
// This is a great place to put global configuration and | ||
// behavior that modifies Cypress. | ||
// | ||
// You can change the location of this file or turn off | ||
// automatically serving support files with the | ||
// 'supportFile' configuration option. | ||
// | ||
// You can read more here: | ||
// https://on.cypress.io/configuration | ||
// *********************************************************** | ||
|
||
// Import commands.js using ES2015 syntax: | ||
import './commands' | ||
|
||
// Alternatively you can use CommonJS syntax: | ||
// require('./commands') |
27 changes: 0 additions & 27 deletions
27
exampleSite/layouts/partials/fragments/sample-custom-fragment.html
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.