Skip to content

Commit

Permalink
fix: snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
giuliaghisini committed Sep 27, 2024
1 parent 3affdc2 commit 3413a4b
Show file tree
Hide file tree
Showing 6 changed files with 82 additions and 8 deletions.
Binary file added packages/volto/cypress/downloads/downloads.html
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ import {
getSystemInformation,
listActions,
} from '@plone/volto/actions';
import { Icon, Toolbar, Unauthorized } from '@plone/volto/components';
import { Icon, Toolbar } from '@plone/volto/components';

import Unauthorized from '@plone/volto/components/theme/Unauthorized/Unauthorized';
import { getParentUrl } from '@plone/volto/helpers';
import UserGroupMembershipMatrix from '@plone/volto/components/manage/Controlpanels/Users/UserGroupMembershipMatrix';
import backSVG from '@plone/volto/icons/back.svg';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import UserGroupMembershipControlPanel from './UserGroupMembershipControlPanel';

const mockStore = configureStore();
jest.mock('@plone/volto/components/manage/Toolbar');
jest.mock('@plone/volto/components');

describe('UserGroupMembershipControlPanel', () => {
it('renders a user group membership control component', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,37 @@

exports[`UserGroupMembershipControlPanel renders a user group membership control component 1`] = `
<div>
<div
class="ui container view-wrapper"
>
<h1>
Unauthorized
</h1>
<h3 />
<p
class="description"
>
You are trying to access a protected resource, please
<a
href="/login"
>
log in
</a>
first.
</p>
<p>
If you are certain you have the correct web address but are encountering an error, please contact the
<a
href="/contact-form"
>
Site Administration
</a>
.
</p>
<p>
Thank you.
</p>
</div>
<div
id="toolbar"
/>
Expand Down
11 changes: 4 additions & 7 deletions packages/volto/src/components/manage/History/History.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,10 @@ import { createPortal } from 'react-dom';
import { FormattedMessage, defineMessages, injectIntl } from 'react-intl';
import { asyncConnect } from '@plone/volto/helpers';

import {
FormattedDate,
Icon as IconNext,
Toolbar,
Forbidden,
Unauthorized,
} from '@plone/volto/components';
import { FormattedDate, Icon as IconNext } from '@plone/volto/components';
import { Toolbar } from '@plone/volto/components/manage/Toolbar';
import Forbidden from '@plone/volto/components/theme/Forbidden/Forbidden';
import Unauthorized from '@plone/volto/components/theme/Unauthorized/Unauthorized';
import { getHistory, revertHistory, listActions } from '@plone/volto/actions';
import { getBaseUrl } from '@plone/volto/helpers';
import config from '@plone/volto/registry';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@

exports[`History redirects if unassigned 1`] = `
<div>
<div
class="ui container view-wrapper"
>
<h1>
Forbidden
</h1>
<p
class="description"
>
We apologize for the inconvenience, but you don't have permissions on this resource.
</p>
</div>
<div
id="toolbar"
/>
Expand All @@ -10,6 +22,37 @@ exports[`History redirects if unassigned 1`] = `

exports[`History redirects if unassigned, no token gives unauthorized 1`] = `
<div>
<div
class="ui container view-wrapper"
>
<h1>
Unauthorized
</h1>
<h3 />
<p
class="description"
>
You are trying to access a protected resource, please
<a
href="/blog/login"
>
log in
</a>
first.
</p>
<p>
If you are certain you have the correct web address but are encountering an error, please contact the
<a
href="/contact-form"
>
Site Administration
</a>
.
</p>
<p>
Thank you.
</p>
</div>
<div
id="toolbar"
/>
Expand Down

0 comments on commit 3413a4b

Please sign in to comment.