Skip to content

Commit

Permalink
EDSC-4234: Fix PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
eudoroolivares2016 committed Sep 20, 2024
1 parent 0817aae commit 5fa950d
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ describe('SwodlrForm component', () => {
describe('when updating individual granules UTM Zone Adjust', () => {
test('updates utmZoneAdjust to `1 `calls onUpdateAccessMethod correctly', async () => {
const { user, setGranuleList, onUpdateAccessMethod } = setup()
const advancedOptionsToggleButton = screen.getByRole('button', { name: 'collapse-text' })
const advancedOptionsToggleButton = screen.getByRole('button', { name: 'collapse-panel' })

await user.click(advancedOptionsToggleButton)

Expand Down Expand Up @@ -285,7 +285,7 @@ describe('SwodlrForm component', () => {

test('updates utmZoneAdjust to `-1` calls onUpdateAccessMethod correctly', async () => {
const { user, setGranuleList, onUpdateAccessMethod } = setup()
const advancedOptionsToggleButton = screen.getByRole('button', { name: 'collapse-text' })
const advancedOptionsToggleButton = screen.getByRole('button', { name: 'collapse-panel' })

await user.click(advancedOptionsToggleButton)

Expand Down Expand Up @@ -334,7 +334,7 @@ describe('SwodlrForm component', () => {
test('updates utmZoneAdjust to `0` calls onUpdateAccessMethod correctly', async () => {
const { user, setGranuleList, onUpdateAccessMethod } = setup()

const advancedOptionsToggleButton = screen.getByRole('button', { name: 'collapse-text' })
const advancedOptionsToggleButton = screen.getByRole('button', { name: 'collapse-panel' })

await user.click(advancedOptionsToggleButton)

Expand Down Expand Up @@ -391,7 +391,7 @@ describe('SwodlrForm component', () => {
test('updates MGRS to `1 `calls onUpdateAccessMethod correctly', async () => {
const { user, setGranuleList, onUpdateAccessMethod } = setup()

const advancedOptionsToggleButton = screen.getByRole('button', { name: 'collapse-text' })
const advancedOptionsToggleButton = screen.getByRole('button', { name: 'collapse-panel' })

await user.click(advancedOptionsToggleButton)

Expand Down Expand Up @@ -440,7 +440,7 @@ describe('SwodlrForm component', () => {
test('updates MGRS to `-1 `calls onUpdateAccessMethod correctly', async () => {
const { user, setGranuleList, onUpdateAccessMethod } = setup()

const advancedOptionsToggleButton = screen.getByRole('button', { name: 'collapse-text' })
const advancedOptionsToggleButton = screen.getByRole('button', { name: 'collapse-panel' })

await user.click(advancedOptionsToggleButton)

Expand Down Expand Up @@ -489,7 +489,7 @@ describe('SwodlrForm component', () => {
test('updates MGRS to `0 `calls onUpdateAccessMethod correctly', async () => {
const { user, setGranuleList, onUpdateAccessMethod } = setup()

const advancedOptionsToggleButton = screen.getByRole('button', { name: 'collapse-text' })
const advancedOptionsToggleButton = screen.getByRole('button', { name: 'collapse-panel' })

await user.click(advancedOptionsToggleButton)

Expand Down
2 changes: 1 addition & 1 deletion static/src/js/components/CollapsePanel/CollapsePanel.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export class CollapsePanel extends Component {
<button
className={buttonClassNames}
type="button"
aria-label="collapse-text"
aria-label="collapse-panel"
onClick={(event) => this.onToggleClick(event)}
aria-controls="collapse-text"
aria-expanded={open}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export const AccessMethodRadio = ({
onMouseEnter={() => externalLink && setShowTooltip(true)}
onMouseLeave={() => externalLink && setShowTooltip(false)}
>
<div className="access-method-radio__tool-tip">
<div className="access-method-radio__tooltip">
<p className="mb-0">
{details}
</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
font-size: 0.825rem;
}

&__tool-tip {
&__tooltip {
text-align: left;
}

Expand Down
8 changes: 1 addition & 7 deletions static/src/js/util/url/collectionsEncoders.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,6 @@ const encodeRemovedGranules = (isOpenSearch, removedGranuleIds) => {
return encodeGranules(isOpenSearch, removedGranuleIds)
}

// Decoders
const decodedSelectedVariables = (pgParam) => {
const { uv: variableIds } = pgParam

Expand All @@ -223,9 +222,7 @@ const decodedSelectedVariables = (pgParam) => {

const decodedSwodlrDownload = (pgParam) => {
const { swod: swodlrData } = pgParam
if (!swodlrData) {
return undefined
}
if (!swodlrData) return undefined

return swodlrData
}
Expand Down Expand Up @@ -548,7 +545,6 @@ export const decodeCollections = (params) => {

// Decode swodlr subsettings on collections
if (selectedAccessMethod && selectedAccessMethod.startsWith('swodlr')) {
// TODO some url valuse here have to be encoded
swodlrData = decodedSwodlrDownload(pCollection)
}

Expand Down Expand Up @@ -596,8 +592,6 @@ export const decodeCollections = (params) => {
}

if (swodlrData) {
// TODO convert these to numbers
// Const convertedSwodlrData = convertIntObj(swodlrData)
projectById[collectionId].accessMethods = {
[selectedAccessMethod]: {
swodlrData
Expand Down

0 comments on commit 5fa950d

Please sign in to comment.