From 62bcd785966fb78a2c187eaa9decb5bdf455bf64 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 17 Jun 2025 11:47:11 +0200 Subject: [PATCH] Bug 40174: Deal with enum Data too long for column 'checkprevcheckout' Signed-off-by: Matt Blenkinsop Signed-off-by: Martin Renvoize Signed-off-by: Lucas Gass (cherry picked from commit da17bc0f9170cd6c8b5d9327792a751c19ea0455) Signed-off-by: Paul Derscheid --- t/cypress/plugins/mockData.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/t/cypress/plugins/mockData.js b/t/cypress/plugins/mockData.js index 5791c68270..8131eb332e 100644 --- a/t/cypress/plugins/mockData.js +++ b/t/cypress/plugins/mockData.js @@ -6,6 +6,11 @@ const fs = require("fs"); const generatedDataCache = new Set(); const generateMockData = (type, properties) => { + if (properties.hasOwnProperty("enum")) { + let values = properties.enum; + return values[Math.floor(Math.random() * values.length)]; + } + switch (type) { case "string": if (properties?.maxLength) {