Skip to content

Commit fbbcac6

Browse files
committed
make changes for code review
1 parent 0fcc465 commit fbbcac6

File tree

4 files changed

+6
-10
lines changed

4 files changed

+6
-10
lines changed

src/info/infrastructure/repositories/DataverseInfoJSDataverseRepository.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -110,21 +110,13 @@ export class DataverseInfoJSDataverseRepository implements DataverseInfoReposito
110110
.execute()
111111
.then((text) => {
112112
const trimmedLength = text?.trim().length ?? 0
113-
console.debug(
114-
`[DataverseInfo] Loaded ${SettingName.PUBLISH_DATASET_DISCLAIMER_TEXT} (length=${trimmedLength})`
115-
)
116113

117114
return {
118115
name: SettingName.PUBLISH_DATASET_DISCLAIMER_TEXT,
119116
value: text
120117
}
121118
})
122119
.catch((error: unknown) => {
123-
console.warn(
124-
`[DataverseInfo] Failed loading ${SettingName.PUBLISH_DATASET_DISCLAIMER_TEXT}; defaulting to empty string`,
125-
error
126-
)
127-
128120
// In case of error, we default to an empty string which indicates no disclaimer text.
129121
return {
130122
name: SettingName.PUBLISH_DATASET_DISCLAIMER_TEXT,

src/sections/dataset/publish-dataset/PublishDatasetModal.module.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
.customPopupTextBlock {
1818
border: 1px solid $dv-border-color;
1919
background-color: #f8f9fa;
20-
border-left: 4px solid $dv-primary-color;
2120
padding: 0.75rem 1rem;
2221
border-radius: 0.25rem;
2322
}

src/sections/dataset/publish-dataset/PublishDatasetModal.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,9 @@ export function PublishDatasetModal({
119119
/>
120120

121121
{shouldShowCustomPopupText && (
122-
<p className={styles.secondaryText}>{datasetPublishPopupCustomText}</p>
122+
<div className={styles.customPopupTextBlock}>
123+
<p className={styles.customPopupText}>{datasetPublishPopupCustomText}</p>
124+
</div>
123125
)}
124126

125127
{releasedVersionExists && !requiresMajorVersionUpdate && (

tests/component/sections/dataset/dataset-publish/PublishDatasetModal.spec.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@ describe('PublishDatasetModal', () => {
224224

225225
cy.findByText(/Custom Dataset Terms/).should('exist')
226226
})
227+
227228
it('Displays disclaimer text from settings', () => {
228229
const dataverseInfoRepository = new DataverseInfoMockRepository()
229230
const disclaimerText = 'This is custom text for the dataset publish popup.'
@@ -236,6 +237,7 @@ describe('PublishDatasetModal', () => {
236237

237238
cy.findByText(disclaimerText).should('exist')
238239
})
240+
239241
it('Disables the continue button until the user checks the disclaimer text', () => {
240242
const dataverseInfoRepository = new DataverseInfoMockRepository()
241243
const disclaimerText = 'This is disclaimer text for the dataset publish popup.'
@@ -250,6 +252,7 @@ describe('PublishDatasetModal', () => {
250252
cy.findByRole('checkbox', { name: disclaimerText }).click()
251253
cy.findByRole('button', { name: 'Continue' }).should('not.be.disabled')
252254
})
255+
253256
it('Displays the custom popup text if it is available', () => {
254257
const dataverseInfoRepository = new DataverseInfoMockRepository()
255258
const popupText = 'This is custom text for the popup.'

0 commit comments

Comments
 (0)