Skip to content

Commit

Permalink
Page Editor data test ids (#8736)
Browse files Browse the repository at this point in the history
* rename PageEditor sidebar -> ModListingPanel

* rename dir

* Page Editor data test ids

* pr feedback

* pr feedback
  • Loading branch information
fungairino authored Jul 1, 2024
1 parent 22c1d0d commit 35c8a20
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 5 deletions.
5 changes: 4 additions & 1 deletion src/pageEditor/modListingPanel/ModListingPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,10 @@ const ModListingPanel: React.VFC = () => {
};

return (
<div className={cx(styles.root, "flex-shrink-0")}>
<div
className={cx(styles.root, "flex-shrink-0")}
data-testid="modListingPanel"
>
{/* Expanded sidebar: Actions list (+ always visible Home button) */}

<div className={styles.header}>
Expand Down
1 change: 1 addition & 0 deletions src/pageEditor/panes/EditorPane.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ const EditorPane: React.VFC = () => {
validateOnMount={false}
validateOnChange={false}
validateOnBlur={false}
data-testid="editorPane"
>
{({ values }) => <EditorPaneContent modComponentFormState={values} />}
</Formik>
Expand Down
2 changes: 1 addition & 1 deletion src/pageEditor/panes/ModEditorPane.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const ModEditorPane: React.VFC = () => {
}

return (
<div className={styles.root}>
<div className={styles.root} data-testid="modEditorPane">
<EditorTabLayout key={layoutKey} tabs={tabItems} />
</div>
);
Expand Down
6 changes: 6 additions & 0 deletions src/pageEditor/panes/__snapshots__/EditorPane.test.tsx.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions src/pageEditor/tabs/editTab/EditTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ const EditTab: React.FC<{
return (
<Tab.Pane eventKey={eventKey} className={styles.tabPane}>
<div className={styles.paneContent}>
<div className={styles.nodePanel}>
<div className={styles.nodePanel} data-testid="brickActionsPanel">
<div className={styles.nodeHeader}>
<span
className={cx(styles.nodeHeaderTitle, {
Expand Down Expand Up @@ -111,7 +111,10 @@ const EditTab: React.FC<{
<EditorNodeLayout />
</div>
</div>
<div className={styles.configPanel}>
<div
className={styles.configPanel}
data-testid="brickConfigurationPanel"
>
<ErrorBoundary
key={
// Pass in the activeNodeId as the render key for error boundary so
Expand All @@ -131,7 +134,7 @@ const EditTab: React.FC<{
)}
</ErrorBoundary>
</div>
<div className={styles.collapseWrapper}>
<div className={styles.collapseWrapper} data-testid="dataPanel">
<button
className={cx(styles.toggle, {
[styles.active ?? ""]: isDataPanelExpanded,
Expand Down

0 comments on commit 35c8a20

Please sign in to comment.