mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
fix: Prevent overflow when rendering expression hints (#6214)
* fix: Prevent whitespace overflow * fix: show overflow ellipsis * chore: add comment * chore: clean up other approach * test: update tests, fix test * test: uncomment test
This commit is contained in:
@@ -157,6 +157,19 @@ export class NDV extends BasePage {
|
||||
this.getters.resourceLocatorModeSelector(paramName).click();
|
||||
this.getters.resourceLocatorModeSelector(paramName).find('li').last().click();
|
||||
this.getters.resourceLocatorInput(paramName).type(value);
|
||||
}
|
||||
},
|
||||
validateExpressionPreview: (paramName: string, value: string) => {
|
||||
this.getters.parameterExpressionPreview(paramName).find('span').should('include.html', asEncodedHTML(value));
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
function asEncodedHTML(str: string): string {
|
||||
return String(str)
|
||||
.replace(/&/g, '&')
|
||||
.replace(/</g, '<')
|
||||
.replace(/>/g, '>')
|
||||
.replace(/"/g, '"')
|
||||
.replace(/ /g, ' ');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user