-
Notifications
You must be signed in to change notification settings - Fork 77
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
Contentful/validation improvements #985
Conversation
- id: inbenta | ||
name: inbenta | ||
entry: scripts/qa/lint-package.sh packages/botonic-plugin-inbenta | ||
language: system | ||
files: ^packages/botonic-plugin-inbenta/ |
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.
Nice! 👏
import { testContentful } from '../contentful.helper' | ||
import { ENGLISH } from '../../../src/nlp' | ||
|
||
test('TEST: contentful button', async () => { |
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.
What does it test here exactly?
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.
@asastre
well, seen! I added asserts
it was never used by any bot
allows customizing the sink of the error messages. Improvement in prints of recursive exception stacks
Validate text.text also if !searchable Before, when shortText was empty, the contentful driver set it with the value of the name field. Now this is managed by the Button model, so that validate can report it
it might be confusing because: * we already set shortText with name when missing * we have the resumeError flag
check button target is available and type of delivered content add test for contentful element delivery
80fa4f8
to
692262a
Compare
} | ||
} else if (this.logStack && contentfulError.stack) { | ||
err += contentfulError.stack.split('\n').slice(0, 5).join('\n') |
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.
Maybe a bit "hacky" Why are you slicing here?
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.
we don't want to spam the logs with too long callstack
Please review commit by commit
logger injection in ErrorReportingCMS: Not we allow customizing the sink of the error messages.Improvements in prints of recursive exception stacks
Improvements in Content.validate of text & shortText fields
Check that contentful button targets are available
Added asserts to asserts in ContentsValidator unit test
To document
breaking change: We remove the Context.fixMissingData flag. It was confusing because:
* we already set shortText with the name field when it's missing
* we have the resumeErrors option for contentful