-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[OC-120] Registry webUI: preview route/view bug #597
Conversation
The baseUrl should be set to contain the prefix too. Perhaps we should improve the baseUrl docs? |
Mmmm I see... |
I have an idea 😎 , let me rework this PR |
@matteofigus I've extended the This should avoid this being a braking change, and will make it possible to handle both cases:
Let me know what you think |
add
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Can we just add a test for that?
@matteofigus do want to review this one more time before 🌴 🌞 🏄 🍺 🏖 ? |
@mattiaerre to get into merge mood, what about starting with this? 😎 |
There are still a couple of issues that need to be addressed that seems the tests didn't cought: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
over to you @nickbalestra the cov report shows that there are a lot of else paths missing. also I don't think we should set beforePublish
within this component
@mattiaerre I've rebased and added the scenario based tests for the the baseUrl/Prefix. I'll rather keep this PR scoped on solving this very small 'bug' that we discovered with the heroku get started registry. Can you open an issue for the |
@mattiaerre this should be now ready to go. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some typos but this LGTM
test/fixtures/targz-test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
me love this!
@@ -69,4 +76,48 @@ describe('registry : domain : options-sanitiser', () => { | |||
}); | |||
}); | |||
}); | |||
|
|||
describe('prefix and baseUrl sanitaziation', () => { | |||
const prefixAndBaseUrlSchenario = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
love it!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo prefixAndBaseUrlSchenario
=> prefixAndBaseUrlScenarios
@@ -7,7 +7,7 @@ describe('registry : domain : options-sanitiser', () => { | |||
const sanitise = require('../../src/registry/domain/options-sanitiser'); | |||
|
|||
describe('when options is empty', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is no longer the description for this test is it?
@@ -69,4 +76,48 @@ describe('registry : domain : options-sanitiser', () => { | |||
}); | |||
}); | |||
}); | |||
|
|||
describe('prefix and baseUrl sanitaziation', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo sanitaziation
=> sanitization
b490651
to
890fcf3
Compare
Preview route didnt take into account of registry prefix for paths