Skip to content

Commit

Permalink
Merge branch 'main' into seamless_internalApiPath
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffersonBledsoe authored Oct 3, 2023
2 parents 2a09c37 + 8fbf776 commit 4200751
Show file tree
Hide file tree
Showing 50 changed files with 592 additions and 217 deletions.
19 changes: 8 additions & 11 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,18 @@ jobs:
run: pip install virtualenv

- name: pip install requirements
run: pip install -r requirements-docs.txt
run: |
pip install -r requirements-docs.txt
sudo snap install --edge vale
- name: Check for broken links
run: make docs-linkcheckbroken

- name: Build HTML documentation
run: make docs-html

# Disable GHA vale checking, it started to fail with a gazillion of
# violations. We need to review it closely
# - uses: errata-ai/vale-action@reviewdog
# with:
# # debug: true
# files: all
# env:
# # Required, set by GitHub actions automatically:
# # https://docs.github.com/en/actions/security-guides/automatic-token-authentication#about-the-github_token-secret
# GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Run vale
run: |
git clone https://github.com/errata-ai/Microsoft.git
cp -r ./Microsoft/Microsoft ./styles
vale --no-exit ./docs
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,20 @@

<!-- towncrier release notes start -->

## 17.0.1 (2023-10-03)

### Bugfix

- issue #5126 a11y for checkboxes on the sharing page @Wagner3UB [#5201](https://github.com/plone/volto/issues/5201)
- Adjust DNS resolution to prefer IPv4 addresses when both IPv4 and IPv6 are resolved. @davisagli [#5261](https://github.com/plone/volto/issues/5261)

### Documentation

- Fix tests and documentation broken because the renaming master->main @sneridagh [#5251](https://github.com/plone/volto/issues/5251)
- Disable GHA vale checking, it started to fail with a gazillion of violations. @sneridagh [#5253](https://github.com/plone/volto/issues/5253)
- Reenable GHA vale checking, but with configuration from `plone/documentation`. It now runs Vale, but with the flag `--no-exit` which means "Don't return a nonzero exit code on errors." It also eliminates reviewdog as the test runner. @stevepiercy [#5256](https://github.com/plone/volto/issues/5256)


## 17.0.0 (2023-09-30)

### Breaking
Expand Down
14 changes: 6 additions & 8 deletions addon-registry.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,16 +101,14 @@ function getAddonsLoaderChain(graph) {
*/
class AddonConfigurationRegistry {
constructor(projectRootPath) {
const packageJson = (this.packageJson = require(path.join(
projectRootPath,
'package.json',
)));
const packageJson = (this.packageJson = require(
path.join(projectRootPath, 'package.json'),
));
// Loads the dynamic config, if any
if (fs.existsSync(path.join(projectRootPath, 'volto.config.js'))) {
this.voltoConfigJS = require(path.join(
projectRootPath,
'volto.config.js',
));
this.voltoConfigJS = require(
path.join(projectRootPath, 'volto.config.js'),
);
} else {
this.voltoConfigJS = [];
}
Expand Down
2 changes: 1 addition & 1 deletion cypress/fixtures/example.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
"name": "Using fixtures to represent data",
"email": "[email protected]",
"body": "Fixtures are a great way to mock data for responses to routes"
}
}
3 changes: 1 addition & 2 deletions cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,7 @@ Cypress.Commands.add(
body: bodyModifier({
...defaultParams.body,
image: {
data:
'iVBORw0KGgoAAAANSUhEUgAAANcAAAA4CAMAAABZsZ3QAAAAM1BMVEX29fK42OU+oMvn7u9drtIPisHI4OhstdWZyt4fkcXX5+sAg74umMhNp86p0eJ7vNiKw9v/UV4wAAAAAXRSTlMAQObYZgAABBxJREFUeF7tmuty4yAMhZG4X2zn/Z92J5tsBJwWXG/i3XR6frW2Y/SBLIRAfaQUDNt8E5tLUt9BycfcKfq3R6Mlfyimtx4rzp+K3dtibXkor99zsEqLYZltblTecciogoh+TXfY1Ve4dn07rCDGG9dHSEEOg/GmXl0U1XDxTKxNK5De7BxsyyBr6gGm2/vPxKJ8F6f7BXKfRMp1xIWK9A+5ks25alSb353dWnDJN1k35EL5f8dVGifTf/4tjUuuFq7u4srmXC60yAmldLXIWbg65RKU87lcGxJCFqUPv0IacW0PmSivOZFLE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ZO7lQ29fnZbt3Xu6qoge4+DjXl/MocySPOp9rlvdyznahRyHEYd77v3LhugOXDv4J65QXfl803BDAdaWBEDhfVx7nKofjoVCgxnUAqw/UAUDPn788BDvQuG4TDtdtUPvzjSlXAB8DvaDOhhrmhwbywylXAm8CvaouikJTL93gs3y7Yy4VYbIxOHrcMizPqWOjqO9l3Uz52kibQy4xxOgqhJvD+w5rvokOcAlGvNCfeqCv1ste1stzLm0f71Iq3ZfTrPfuE5nhPtF+LvQE2lffQC7pYtQy3tdzdrKvd5TLVVzDetScS3nEKmmwDyt1Cev1kX3YfbvzNK4fzrlw+cB6vm+uiUgf2zdXI62241LawCb7Pi5FXFPF8KpzDoF/Sw2lg+GrHNbno1mhPu+VCF/vfMnw06PnUl6j48dVHD3jHNHPua+fc3o/5yp/zsGi0vYtzi3Pz5mHd4T6BWMIlewacd63AAAAAElFTkSuQmCC',
encoding: 'base64',
filename: 'image.png',
'content-type': 'image/png',
Expand Down
6 changes: 2 additions & 4 deletions cypress/support/reset-fixture.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ function setup() {
method: 'POST',
url: `${api_url}/RobotRemote`,
headers: { Accept: 'text/xml', 'content-type': 'text/xml' },
body:
'<?xml version="1.0"?><methodCall><methodName>run_keyword</methodName><params><param><value><string>remote_zodb_setup</string></value></param><param><value><array><data><value><string>plone.app.robotframework.testing.PLONE_ROBOT_TESTING</string></value></data></array></value></param></params></methodCall>',
body: '<?xml version="1.0"?><methodCall><methodName>run_keyword</methodName><params><param><value><string>remote_zodb_setup</string></value></param><param><value><array><data><value><string>plone.app.robotframework.testing.PLONE_ROBOT_TESTING</string></value></data></array></value></param></params></methodCall>',
}).then(() => cy.log('Setting up API fixture'));
}

Expand All @@ -15,8 +14,7 @@ function teardown() {
method: 'POST',
url: `${api_url}/RobotRemote`,
headers: { Accept: 'text/xml', 'content-type': 'text/xml' },
body:
'<?xml version="1.0"?><methodCall><methodName>run_keyword</methodName><params><param><value><string>remote_zodb_teardown</string></value></param><param><value><array><data><value><string>plone.app.robotframework.testing.PLONE_ROBOT_TESTING</string></value></data></array></value></param></params></methodCall>',
body: '<?xml version="1.0"?><methodCall><methodName>run_keyword</methodName><params><param><value><string>remote_zodb_teardown</string></value></param><param><value><array><data><value><string>plone.app.robotframework.testing.PLONE_ROBOT_TESTING</string></value></data></array></value></param></params></methodCall>',
}).then(() => cy.log('Tearing down API fixture'));
}

Expand Down
122 changes: 67 additions & 55 deletions cypress/tests/core/basic/actions.js
Original file line number Diff line number Diff line change
@@ -1,57 +1,69 @@
describe('actions Tests', () => {
beforeEach(() => {
cy.autologin();
cy.createContent({
contentType: 'Document',
contentId: 'my-page-1',
contentTitle: 'My Page-1',
allow_discussion: true,
}
);
cy.visit('/contents');
});
it('copy', function () {
cy.get('tr[aria-label="/my-page-1"]').within(() => {
cy.get('svg[class="icon dropdown-popup-trigger"]').click();
});
cy.get('a[class="item right-dropdown icon-align"]').eq(2).click();
cy.get('button[class="ui button icon item"]').click();
cy.visit('/contents');
cy.get('tr[aria-label="/copy_of_my-page-1"]').within(()=>{
cy.get('a[class="icon-align-name"]').should('have.attr', 'href', '/copy_of_my-page-1/contents');
})
beforeEach(() => {
cy.autologin();
cy.createContent({
contentType: 'Document',
contentId: 'my-page-1',
contentTitle: 'My Page-1',
allow_discussion: true,
});
cy.visit('/contents');
});
it('copy', function () {
cy.get('tr[aria-label="/my-page-1"]').within(() => {
cy.get('svg[class="icon dropdown-popup-trigger"]').click();
});
cy.get('a[class="item right-dropdown icon-align"]').eq(2).click();
cy.get('button[class="ui button icon item"]').click();
cy.visit('/contents');
cy.get('tr[aria-label="/copy_of_my-page-1"]').within(() => {
cy.get('a[class="icon-align-name"]').should(
'have.attr',
'href',
'/copy_of_my-page-1/contents',
);
});
});
it('delete', function () {
cy.get('tr[aria-label="/my-page-1"]').within(() => {
cy.get('button[class="ui basic icon button"]').click({ multiple: true });
});
cy.get('button[class="ui button icon item"]').eq(6).click();
cy.get('button[class="ui primary button"]').findByText('Delete').click();
cy.visit('/contents');
cy.get('tr').should('not.contain', '/my-page-1');
});
it('cut', function () {
cy.get('tr[aria-label="/my-page-1"]').within(() => {
cy.get('svg[class="icon dropdown-popup-trigger"]').click();
});
cy.get('a[class="item right-dropdown icon-align"]').eq(1).click();
cy.get('button[class="ui button icon item"]').click();
cy.visit('/contents');
cy.get('tr[aria-label="/my-page-1"]').within(() => {
cy.get('a[class="icon-align-name"]').should(
'have.attr',
'href',
'/my-page-1/contents',
);
});
});
it('rename', function () {
cy.get('tr[aria-label="/my-page-1"]').within(() => {
cy.get('button[class="ui basic icon button"]').click({ multiple: true });
});
cy.get('button[class="ui button icon item"]').eq(0).click();
cy.get('#field-0_title').clear().type('my-page-rename');
cy.get('#field-0_id').clear().type('my-page-rename');
cy.get(
'button[class="ui basic circular primary right floated button"]',
).click();
cy.get('tr[aria-label="/my-page-rename"]').within(() => {
cy.get('a[class="icon-align-name"]').should(
'have.attr',
'href',
'/my-page-rename/contents',
);
});
});
it('delete', function () {
cy.get('tr[aria-label="/my-page-1"]').within(() => {
cy.get('button[class="ui basic icon button"]').click({ multiple: true });
});
cy.get('button[class="ui button icon item"]').eq(6).click();
cy.get('button[class="ui primary button"]').findByText('Delete').click();
cy.visit('/contents');
cy.get('tr').should('not.contain','/my-page-1');

});
it('cut', function () {
cy.get('tr[aria-label="/my-page-1"]').within(() => {
cy.get('svg[class="icon dropdown-popup-trigger"]').click();
});
cy.get('a[class="item right-dropdown icon-align"]').eq(1).click();
cy.get('button[class="ui button icon item"]').click();
cy.visit('/contents');
cy.get('tr[aria-label="/my-page-1"]').within(()=>{
cy.get('a[class="icon-align-name"]').should('have.attr', 'href', '/my-page-1/contents');
})
});
it('rename', function () {
cy.get('tr[aria-label="/my-page-1"]').within(() => {
cy.get('button[class="ui basic icon button"]').click({ multiple: true });
});
cy.get('button[class="ui button icon item"]').eq(0).click();
cy.get('#field-0_title').clear().type('my-page-rename');
cy.get('#field-0_id').clear().type('my-page-rename');
cy.get('button[class="ui basic circular primary right floated button"]').click();
cy.get('tr[aria-label="/my-page-rename"]').within(()=>{
cy.get('a[class="icon-align-name"]').should('have.attr', 'href', '/my-page-rename/contents');
})
})
});
});
29 changes: 15 additions & 14 deletions cypress/tests/core/basic/contactForm.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
describe('Contact Form Tests', () => {
beforeEach(() => {
cy.visit('/');
});
it('renders contact Form', function () {
cy.get('a:contains("Contact")').click();
cy.get('input[name="name"]').type('Myname');
cy.get('input[name="from"]').type('[email protected]');
cy.get('input[name="subject"]').type('Loreum Ipsium');
cy.get('textarea[name="message"]').type('Lorem Ipsum is simply dummy text of the printing and typesetting industry.');


cy.get('button[class="ui basic primary right floated button"]').click();
});
});
beforeEach(() => {
cy.visit('/');
});
it('renders contact Form', function () {
cy.get('a:contains("Contact")').click();
cy.get('input[name="name"]').type('Myname');
cy.get('input[name="from"]').type('[email protected]');
cy.get('input[name="subject"]').type('Loreum Ipsium');
cy.get('textarea[name="message"]').type(
'Lorem Ipsum is simply dummy text of the printing and typesetting industry.',
);

cy.get('button[class="ui basic primary right floated button"]').click();
});
});
103 changes: 49 additions & 54 deletions cypress/tests/core/basic/view.js
Original file line number Diff line number Diff line change
@@ -1,55 +1,50 @@
describe('Add Content Tests', () => {
beforeEach(() => {
cy.intercept('GET', `/**/*?expand*`).as('content');
// give a logged in editor and the site root
cy.autologin();
cy.visit('/');
cy.wait('@content');
});

it('As editor I can change the view to Listing View', function () {

cy.visit('/events');
cy.get('#toolbar-more').click();
cy.findByText('Listing view').click();
cy.findByText('Album view').click();
cy.visit('/events');
cy.wait('@content');
cy.wait(2000);
cy.get('main').contains('Event').should('be.visible');
});

it('As editor I can change the view to Summary View', function () {

cy.visit('/events');
cy.get('#toolbar-more').click();
cy.findByText('Listing view').click();
cy.findByText('Summary view').click();
cy.visit('/events');
cy.wait('@content');
cy.wait(2000);
cy.get('main').contains('Event').should('be.visible');
});
it('As editor I can change the view to Tabular View', function () {

cy.visit('/events');
cy.get('#toolbar-more').click();
cy.findByText('Listing view').click();
cy.findByText('Tabular view').click();
cy.visit('/events');
cy.wait('@content');
cy.wait(2000);
cy.get('main').contains('Event').should('be.visible');
});
it('As editor I can change the view to Album View', function () {

cy.visit('/events');
cy.get('#toolbar-more').click();
cy.findByText('Listing view').click();
cy.visit('/events');
cy.wait('@content');
cy.wait(2000);
cy.get('main').contains('Event').should('be.visible');
});
});

beforeEach(() => {
cy.intercept('GET', `/**/*?expand*`).as('content');
// give a logged in editor and the site root
cy.autologin();
cy.visit('/');
cy.wait('@content');
});

it('As editor I can change the view to Listing View', function () {
cy.visit('/events');
cy.get('#toolbar-more').click();
cy.findByText('Listing view').click();
cy.findByText('Album view').click();
cy.visit('/events');
cy.wait('@content');
cy.wait(2000);
cy.get('main').contains('Event').should('be.visible');
});

it('As editor I can change the view to Summary View', function () {
cy.visit('/events');
cy.get('#toolbar-more').click();
cy.findByText('Listing view').click();
cy.findByText('Summary view').click();
cy.visit('/events');
cy.wait('@content');
cy.wait(2000);
cy.get('main').contains('Event').should('be.visible');
});
it('As editor I can change the view to Tabular View', function () {
cy.visit('/events');
cy.get('#toolbar-more').click();
cy.findByText('Listing view').click();
cy.findByText('Tabular view').click();
cy.visit('/events');
cy.wait('@content');
cy.wait(2000);
cy.get('main').contains('Event').should('be.visible');
});
it('As editor I can change the view to Album View', function () {
cy.visit('/events');
cy.get('#toolbar-more').click();
cy.findByText('Listing view').click();
cy.visit('/events');
cy.wait('@content');
cy.wait(2000);
cy.get('main').contains('Event').should('be.visible');
});
});
Loading

0 comments on commit 4200751

Please sign in to comment.