generated from eea/volto-addon-template
-
Notifications
You must be signed in to change notification settings - Fork 2
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
a2aa572
commit 21bd19b
Showing
6 changed files
with
68 additions
and
87 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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
const { defineConfig } = require("cypress"); | ||
|
||
module.exports = defineConfig({ | ||
viewportWidth: 1280, | ||
defaultCommandTimeout: 8888, | ||
chromeWebSecurity: false, | ||
reporter: "junit", | ||
video: true, | ||
retries: { | ||
runMode: 8, | ||
openMode: 0, | ||
}, | ||
reporterOptions: { | ||
mochaFile: "cypress/reports/cypress-[hash].xml", | ||
jenkinsMode: true, | ||
toConsole: true, | ||
}, | ||
e2e: { | ||
setupNodeEvents(on, config) { | ||
// e2e testing node events setup code | ||
}, | ||
baseUrl: "http://localhost:3000", | ||
}, | ||
}); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import { setupBeforeEach, tearDownAfterEach } from "../support/e2e"; | ||
|
||
describe("Blocks Tests", () => { | ||
beforeEach(setupBeforeEach); | ||
afterEach(tearDownAfterEach); | ||
|
||
it("Add Block: Empty", () => { | ||
// without this the clear command below does nothing sometimes | ||
cy.wait(500); | ||
|
||
// Change page title | ||
cy.get("[contenteditable=true]").first().clear(); | ||
|
||
cy.get("[contenteditable=true]").first().type("My Add-on Page"); | ||
|
||
cy.get(".documentFirstHeading").contains("My Add-on Page"); | ||
|
||
cy.get("[contenteditable=true]").first().type("{enter}"); | ||
|
||
// Add block | ||
cy.get(".ui.basic.icon.button.block-add-button").first().click(); | ||
cy.get(".blocks-chooser .title").contains("Common").click(); | ||
cy.get(".content.active.common .button.listing") | ||
.contains("Listing") | ||
.click(); | ||
|
||
// Select Custom summary Variation | ||
cy.get("#field-variation").click().contains("Cards gallery").click(); | ||
cy.get(".query-widget #field-query-0-querystring").click(); | ||
cy.get(".react-select__menu").contains("Creator").first().click(); | ||
cy.get(".field.query-sort-on-widget #select-listingblock-sort-on").click(); | ||
cy.get(".react-select__menu").contains("Creator").click(); | ||
|
||
// Test for switches | ||
cy.contains("Gallery").click(); | ||
|
||
// Save | ||
cy.get("#toolbar-save").click(); | ||
cy.url().should("eq", Cypress.config().baseUrl + "/cypress/my-page"); | ||
|
||
// then the page view should contain our changes | ||
cy.contains("My Add-on Page"); | ||
}); | ||
}); |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.