Skip to content

Commit

Permalink
TASK: Fix e2e tests (#2928)
Browse files Browse the repository at this point in the history
  • Loading branch information
grebaldi authored Jul 27, 2021
1 parent 050e58b commit b3255f9
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ test('Supports secondary inspector view for element editors', async t => {
await t.switchToMainWindow();

await t
.click(imageEditor.findReact('IconButton').withProps('icon', 'crop'));
.click(imageEditor.find('button[title="Crop"]'));
const initialLeftOffset = await imageEditor.find('img').getStyleProperty('left');

await t
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ test("Can edit the page title via inspector", async t => {
.typeText(InspectorTitleProperty, "-привет!")
.expect(InspectorTitleProperty.value)
.eql("Home-привет!")
.wait(200)
.click(Selector("#neos-UriPathSegmentEditor-sync"))
.expect(InspectorUriPathSegmentProperty.value)
.eql("home-privet")
Expand Down
2 changes: 1 addition & 1 deletion packages/neos-ui/src/Containers/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const App = ({globalRegistry, menu}) => {
};
App.propTypes = {
globalRegistry: PropTypes.object.isRequired,
menu: PropTypes.object.isRequired
menu: PropTypes.oneOfType([PropTypes.object, PropTypes.array]).isRequired
};

export default App;
41 changes: 22 additions & 19 deletions packages/neos-ui/src/Containers/Drawer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,25 +33,28 @@ export default class Drawer extends PureComponent {

containerRegistry: PropTypes.object.isRequired,

menuData: PropTypes.objectOf(
PropTypes.shape({
icon: PropTypes.string,
label: PropTypes.string.isRequired,
uri: PropTypes.string.isRequired,
target: PropTypes.string,

children: PropTypes.arrayOf(
PropTypes.shape({
icon: PropTypes.string,
label: PropTypes.string.isRequired,
uri: PropTypes.string,
target: PropTypes.string,
isActive: PropTypes.bool.isReqired,
skipI18n: PropTypes.bool.isReqired
})
)
})
).isRequired
menuData: PropTypes.oneOfType([
PropTypes.objectOf(
PropTypes.shape({
icon: PropTypes.string,
label: PropTypes.string.isRequired,
uri: PropTypes.string.isRequired,
target: PropTypes.string,

children: PropTypes.arrayOf(
PropTypes.shape({
icon: PropTypes.string,
label: PropTypes.string.isRequired,
uri: PropTypes.string,
target: PropTypes.string,
isActive: PropTypes.bool.isReqired,
skipI18n: PropTypes.bool.isReqired
})
)
})
),
PropTypes.array
]).isRequired
};

state = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default class NodeVariantCreationDialog extends PureComponent {
static propTypes = {
isOpen: PropTypes.bool.isRequired,
numberOfParentNodesToBeCreated: PropTypes.number,
contentDimensions: PropTypes.object.isRequired,
contentDimensions: PropTypes.oneOfType([PropTypes.object, PropTypes.array]).isRequired,
activePresets: PropTypes.object.isRequired,
documentNode: PropTypes.object.isRequired,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ class DimensionSelector extends PureComponent {
}))
export default class DimensionSwitcher extends PureComponent {
static propTypes = {
contentDimensions: PropTypes.object.isRequired,
contentDimensions: PropTypes.oneOfType([PropTypes.object, PropTypes.array]).isRequired,
activePresets: PropTypes.object.isRequired,
allowedPresets: PropTypes.object.isRequired,
selectPreset: PropTypes.func.isRequired,
Expand Down
2 changes: 1 addition & 1 deletion packages/neos-ui/src/Containers/Root.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Root.propTypes = {
store: PropTypes.object.isRequired,
globalRegistry: PropTypes.object.isRequired,
configuration: PropTypes.object.isRequired,
menu: PropTypes.object.isRequired,
menu: PropTypes.oneOfType([PropTypes.object, PropTypes.array]).isRequired,
routes: PropTypes.object.isRequired
};

Expand Down

0 comments on commit b3255f9

Please sign in to comment.