Bugzilla – Attachment 183929 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), 918 bytes, created by
Jonathan Druart
on 2025-07-10 11:59:23 UTC
(
hide
)
Description:
Bug 40174: Deal with enum
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2025-07-10 11:59:23 UTC
Size:
918 bytes
patch
obsolete
>From afb64a2d3d120f35017615475b382305fea6257a 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' >--- > 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.34.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