Bugzilla – Attachment 184106 Details for
Bug 40174
Add a way to cleanly insert data in DB from Cypress tests
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40174: Deal with enum
Bug-40174-Deal-with-enum.patch (text/plain), 984 bytes, created by
Matt Blenkinsop
on 2025-07-15 13:41:08 UTC
(
hide
)
Description:
Bug 40174: Deal with enum
Filename:
MIME Type:
Creator:
Matt Blenkinsop
Created:
2025-07-15 13:41:08 UTC
Size:
984 bytes
patch
obsolete
>From c445af527048bffb09b5d85f995837e25eaab0f0 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >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 <matt.blenkinsop@openfifth.co.uk> >--- > 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 5791c68270e..8131eb332ef 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) { >-- >2.48.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 40174
:
183372
|
183373
|
183374
|
183851
|
183929
|
183978
|
183980
|
183981
|
184103
|
184104
|
184105
|
184106
|
184107
|
184108
|
184195
|
184327
|
184328
|
184329
|
184330
|
184331
|
184332
|
184333