Add cy ids to number and string fields, and RecordBase
This commit is contained in:
parent
9f301a19b6
commit
72d6ff8ee5
@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<b-form-group
|
||||
:data-test-id="getFieldCypressId(label || value)"
|
||||
:label-cols-md="horizontal && '5'"
|
||||
:label-cols-xl="horizontal && '4'"
|
||||
:content-cols-md="horizontal && '7'"
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<b-form-group
|
||||
:data-test-id="getFieldCypressId(label || value)"
|
||||
:label-cols-md="horizontal && '5'"
|
||||
:label-cols-xl="horizontal && '4'"
|
||||
:content-cols-md="horizontal && '7'"
|
||||
|
||||
@ -144,5 +144,11 @@ export default {
|
||||
return !!recordPageID || !!magnifiedBlockID
|
||||
},
|
||||
},
|
||||
|
||||
methods: {
|
||||
getFieldCypressId (field) {
|
||||
return `field-${field.toLowerCase().split(' ').join('-')}`
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -18,6 +18,7 @@
|
||||
<b-form-group
|
||||
v-if="canDisplay(field)"
|
||||
:key="field.id"
|
||||
:data-test-id="getFieldCypressId(field.label || field.name)"
|
||||
:label-cols-md="options.horizontalFieldLayoutEnabled && '6'"
|
||||
:label-cols-xl="options.horizontalFieldLayoutEnabled && '5'"
|
||||
:content-cols-md="options.horizontalFieldLayoutEnabled && '6'"
|
||||
@ -332,6 +333,10 @@ export default {
|
||||
cancel()
|
||||
})
|
||||
},
|
||||
|
||||
getFieldCypressId (field) {
|
||||
return `field-${field.toLowerCase().split(' ').join('-')}`
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user