-
-
Notifications
You must be signed in to change notification settings - Fork 756
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
Showing
5 changed files
with
204 additions
and
1 deletion.
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
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
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,78 @@ | ||
# Volto Commit Messages | ||
|
||
Volto uses the (conventional commit specification)[https://www.conventionalcommits.org/en/v1.0.0/#specification] for consistent commit messages. | ||
|
||
All commit messages should have the following form: | ||
|
||
```` | ||
<type>: <description> | ||
```` | ||
|
||
## Fix | ||
|
||
A fix (PATCH in semantic versioning) looks like this: | ||
|
||
```` | ||
fix: correct minor typos in code | ||
```` | ||
|
||
## Feature | ||
|
||
A new feature (MINOR in semantic versioning) looks like this: | ||
|
||
```` | ||
feat: add catalan language | ||
```` | ||
|
||
## Breaking Change | ||
|
||
Breaking changes can be indicated by either appending a "!" to the type: | ||
|
||
```` | ||
refactor!: drop support for Node 6 | ||
```` | ||
|
||
Or adding "BREAKING CHANGE" to the commit message body text: | ||
|
||
```` | ||
refactor!: drop support for Node 6 | ||
BREAKING CHANGE: refactor to use JavaScript features not available in Node 6. | ||
```` | ||
|
||
## Available Types | ||
|
||
In addition to "fix" and "feat" the following types are allowed: | ||
build:, chore:, ci:, docs:, style:, refactor:, perf:, test: | ||
|
||
|
||
|
||
Install commitlint: | ||
|
||
```` | ||
npm install --save-dev @commitlint/{config-conventional,cli} | ||
```` | ||
|
||
or via yarn: | ||
|
||
```` | ||
yarn add @commitlint/{config-conventional,cli} | ||
```` | ||
|
||
Create a commitlint.config.js file: | ||
|
||
```` | ||
echo "module.exports = {extends: ['@commitlint/config-conventional']}" > commitlint.config.js | ||
```` | ||
|
||
Add husky to package.json: | ||
|
||
```` | ||
{ | ||
"husky": { | ||
"hooks": { | ||
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS" | ||
} | ||
} | ||
} | ||
```` |
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,92 @@ | ||
if (Cypress.env('API') !== 'guillotina') { | ||
describe('Table Block Tests', () => { | ||
beforeEach(() => { | ||
// given a logged in editor and a page in edit mode | ||
cy.autologin(); | ||
cy.createContent('Document', 'my-page', 'My Page'); | ||
cy.visit('/my-page/edit'); | ||
cy.waitForResourceToLoad('@navigation'); | ||
cy.waitForResourceToLoad('@breadcrumbs'); | ||
cy.waitForResourceToLoad('@actions'); | ||
cy.waitForResourceToLoad('@types'); | ||
cy.waitForResourceToLoad('my-page?fullobjects'); | ||
cy.get(`.block.title [data-contents]`); | ||
}); | ||
|
||
it('As editor I can add a Table Block', () => { | ||
// when I add a Table Block | ||
cy.get('.block.text [contenteditable]').click(); | ||
cy.get('button.block-add-button').click(); | ||
cy.get('.blocks-chooser .title') | ||
.contains('Common') | ||
.click(); | ||
cy.get('.ui.buttons .button.table').click(); | ||
cy.get('.celled.fixed.table tr th:first-child()') | ||
.click() | ||
.type('column 1 / row 1'); | ||
cy.get('.celled.fixed.table tr th:nth-child(2)') | ||
.click() | ||
.type('column 2 / row 1'); | ||
cy.get('.celled.fixed.table tr:nth-child(2) td:first-child()') | ||
.click() | ||
.type('column 1 / row 2'); | ||
cy.get('.celled.fixed.table tr:nth-child(2) td:nth-child(2)') | ||
.click() | ||
.type('column 2 / row 2'); | ||
cy.get('button[title="Insert col after"]').click(); | ||
cy.get('button[title="Insert row after"]').click(); | ||
cy.get('button[title="Insert row before"]').click(); | ||
cy.get('button[title="Insert col before"]').click(); | ||
|
||
cy.get('#toolbar-save').click(); | ||
cy.url().should('eq', Cypress.config().baseUrl + '/my-page'); | ||
|
||
// then a new Table Block has been added to the page | ||
cy.get('.celled.fixed.table tr th:first-child()').contains( | ||
'column 1 / row 1', | ||
); | ||
cy.get('.celled.fixed.table tr th:nth-child(3)').contains( | ||
'column 2 / row 1', | ||
); | ||
cy.get('.celled.fixed.table tr:nth-child(3) td:first-child()').contains( | ||
'column 1 / row 2', | ||
); | ||
cy.get('.celled.fixed.table tr:nth-child(3) td:nth-child(3)').contains( | ||
'column 2 / row 2', | ||
); | ||
|
||
// Edit | ||
cy.visit('/my-page/edit'); | ||
cy.get('.celled.fixed.table tr:first-child() th:nth-child(2)').click(); | ||
|
||
// without the second click the test fails. so this makes the test green. | ||
cy.get('.celled.fixed.table tr:first-child() th:nth-child(2)').click(); | ||
|
||
cy.get('button[title="Delete col"]').click(); | ||
cy.get('.celled.fixed.table tr:first-child() th:nth-child(3)').click(); | ||
cy.get('button[title="Delete col"]').click(); | ||
cy.get('.celled.fixed.table tr:nth-child(2) td:first-child()').click(); | ||
cy.get('button[title="Delete row"]').click(); | ||
cy.get('.celled.fixed.table tr:nth-child(3) td:first-child()').click(); | ||
cy.get('button[title="Delete row"]').click(); | ||
|
||
// Save | ||
cy.get('#toolbar-save').click(); | ||
cy.url().should('eq', Cypress.config().baseUrl + '/my-page'); | ||
|
||
//View | ||
cy.get('.celled.fixed.table tr th:first-child()').contains( | ||
'column 1 / row 1', | ||
); | ||
cy.get('.celled.fixed.table tr th:nth-child(2)').contains( | ||
'column 2 / row 1', | ||
); | ||
cy.get('.celled.fixed.table tr:nth-child(2) td:first-child()').contains( | ||
'column 1 / row 2', | ||
); | ||
cy.get('.celled.fixed.table tr:nth-child(2) td:nth-child(2)').contains( | ||
'column 2 / row 2', | ||
); | ||
}); | ||
}); | ||
} |
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 @@ | ||
# Volto Performance | ||
|
||
Performance analysis is a complex topic. This document offers a starting point to analyzing an optimizing the performance of Volto. | ||
|
||
## Tools | ||
|
||
### Dev Toolbar | ||
|
||
All modern browsers off | ||
|
||
### WebPageTest | ||
|
||
### Lighthouse | ||
|
||
### Page Speed Insights | ||
|
||
### jMeter |