File tree Expand file tree Collapse file tree 6 files changed +24
-25
lines changed
schema/src/app/components/AddFieldModal/views
shell/components/FieldTypeDateTime Expand file tree Collapse file tree 6 files changed +24
-25
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,6 @@ module.exports = defineConfig({
77 viewportHeight : 1080 ,
88 video : false ,
99 defaultCommandTimeout : 15000 ,
10- experimentalInteractiveRunEvents : true ,
1110 env : {
1211 API_AUTH : "https://auth.api.dev.zesty.io" ,
1312 COOKIE_NAME : "DEV_APP_SID" ,
@@ -27,14 +26,6 @@ module.exports = defineConfig({
2726
2827 return launchOptions ;
2928 } ) ;
30- // Get spec info to be used for the model's label/name
31- on ( "before:spec" , ( spec ) => {
32- const pathPart = spec . relative . split ( "/" ) ;
33- config . env . SPEC = {
34- folder : pathPart [ pathPart ?. length - 2 ] ,
35- file : pathPart [ pathPart ?. length - 1 ] . replace ( / \. s p e c \. j s / g, "" ) ,
36- } ;
37- } ) ;
3829
3930 return require ( "./cypress/plugins/index.js" ) ( on , config ) ;
4031 } ,
Original file line number Diff line number Diff line change 11{
22 "model" : {
3- "label" : " E2E: Content" ,
4- "metaTitle" : " E2E: Content" ,
3+ "label" : " Content" ,
4+ "metaTitle" : " Content" ,
55 "type" : " pageset" ,
66 "listed" : true
77 },
358358 "sort" : 0
359359 },
360360 "web" : {
361- "metaLinkText" : " E2E: Content" ,
362- "metaTitle" : " E2E: Content"
361+ "metaLinkText" : " Content" ,
362+ "metaTitle" : " Content"
363363 },
364364 "data" : {
365365 "internal_link" : " 7-a2c992ecb6-v6j9zt" ,
Original file line number Diff line number Diff line change @@ -23,14 +23,12 @@ module.exports = function content(config) {
2323 const json = JSON . parse ( jsonString ) ;
2424
2525 const sdk = await getSDK ( config ) ;
26- const { COMMIT_ID , SPEC } = config ?. env ;
27- const SPEC_ID = `${ COMMIT_ID } | ${ Date . now ( ) } ` ;
26+ const timeStamp = Date . now ( ) ;
2827
2928 // 1) Create Schema
3029 // Append commit id for spec tracking
3130 // append timestamp to prevent naming conflicts
32- const specLabel = ! SPEC ?. file ? "" : `${ SPEC ?. folder } -${ SPEC ?. file } ` ;
33- const modelLabel = `E2E: ${ specLabel || json ?. model ?. label } | ${ SPEC_ID } ` ;
31+ const modelLabel = `E2E: ${ json . model . label } | ${ config . env . COMMIT_ID } | ${ timeStamp } ` ;
3432 const modelPayload = {
3533 ...json . model ,
3634 label : modelLabel ,
@@ -55,7 +53,7 @@ module.exports = function content(config) {
5553 json . items . map ( ( item , index ) => {
5654 // Append commit id to item labels for spec tracking
5755 // append timestamp to prevent naming conflicts
58- const itemLabel = `${ item ? .web ? .metaTitle } | ${ SPEC_ID } ` ;
56+ const itemLabel = `E2E: ${ item . web . metaTitle } | ${ config . env . COMMIT_ID } | ${ timeStamp } ` ;
5957 const payload = {
6058 ...item ,
6159 meta : {
Original file line number Diff line number Diff line change @@ -286,7 +286,7 @@ export const SideBar: FC<SideBarProps> = ({
286286const NoResults = ( { keyword } : { keyword : string } ) => (
287287 < Stack gap = { 1.5 } alignItems = "center" justifyContent = "center" p = { 1.5 } >
288288 < img
289- src = "/noSearchResults.svg"
289+ src = "/images/ noSearchResults.svg"
290290 alt = "No search results"
291291 width = "70"
292292 height = "64"
Original file line number Diff line number Diff line change @@ -647,10 +647,14 @@ export const FieldForm = ({
647647 fieldStateOnSaveAction === "deactivate" &&
648648 ! fieldData ?. deletedAt
649649 ) {
650- deleteContentModelField ( {
651- modelZUID : id ,
652- fieldZUID : fieldData ?. ZUID ,
653- } ) ;
650+ // added a delay to temporarily fix an issue with field not being deleted properly
651+ // likely related to api response caching
652+ setTimeout ( ( ) => {
653+ deleteContentModelField ( {
654+ modelZUID : id ,
655+ fieldZUID : fieldData ?. ZUID ,
656+ } ) ;
657+ } , 1000 ) ;
654658 }
655659 } )
656660 . catch ( ( error ) => {
Original file line number Diff line number Diff line change @@ -1482,8 +1482,14 @@ export const toISOString = (timeString: string) => {
14821482
14831483/** Converts "HH:mm:ss.SSSSSS" to "h:mm a" */
14841484export const to12HrTime = ( isoTime : string ) => {
1485- const d = parse ( isoTime , "HH:mm:ss.SSSSSS" , REF_DATE ) ;
1486- return format ( d , "h:mm a" ) ;
1485+ try {
1486+ const d = parse ( isoTime , "HH:mm:ss.SSSSSS" , REF_DATE ) ;
1487+ return format ( d , "h:mm a" ) ;
1488+ } catch ( error ) {
1489+ console . error ( error ) ;
1490+
1491+ return "" ;
1492+ }
14871493} ;
14881494
14891495const generateTimeOptions = ( ) => {
You can’t perform that action at this time.
0 commit comments