ci: Make pinning e2e test work locally (no-changelog) (#9954)
Signed-off-by: Oleg Ivaniv <me@olegivaniv.com> Co-authored-by: Oleg Ivaniv <me@olegivaniv.com>
This commit is contained in:
committed by
GitHub
parent
2a2c79886d
commit
bbb2296b3d
@@ -140,6 +140,10 @@ export function usePinnedData(
|
||||
}
|
||||
}
|
||||
|
||||
function getMaxPinnedDataSize() {
|
||||
return window.maxPinnedDataSize ?? MAX_PINNED_DATA_SIZE;
|
||||
}
|
||||
|
||||
function isValidSize(data: string | object): boolean {
|
||||
const targetNode = unref(node);
|
||||
if (!targetNode) {
|
||||
@@ -154,13 +158,13 @@ export function usePinnedData(
|
||||
const newPinData = { ...currentPinData, [targetNode.name]: data };
|
||||
const newPinDataSize = workflowsStore.getPinDataSize(newPinData);
|
||||
|
||||
if (newPinDataSize > MAX_PINNED_DATA_SIZE) {
|
||||
if (newPinDataSize > getMaxPinnedDataSize()) {
|
||||
toast.showError(
|
||||
new Error(
|
||||
i18n.baseText('ndv.pinData.error.tooLarge.description', {
|
||||
interpolate: {
|
||||
size: toMegaBytes(newPinDataSize),
|
||||
limit: toMegaBytes(MAX_PINNED_DATA_SIZE),
|
||||
limit: toMegaBytes(getMaxPinnedDataSize()),
|
||||
},
|
||||
}),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user