From ea5a2699f12b67e889b921aa989184f94454b0e1 Mon Sep 17 00:00:00 2001 From: Arnau Giralt Date: Tue, 9 Apr 2024 12:39:51 +0200 Subject: [PATCH] LITE-29926: Update UI to use SAS Token instead of Connection String --- ...ings-CW7gT9jj.css => settings-Bd151nFI.css} | 2 +- .../static/assets/settings-DHU-f3SM.js | 1 - .../static/assets/settings-yl6ZGDej.js | 1 + connect_bi_reporter/static/settings.html | 4 ++-- ui/components/AddEditCredentialDialog.vue | 16 ++++++++-------- ui/pages/settings/MainPage.vue | 2 +- .../components/AddEditCredentialDialog.spec.js | 18 +++++++++--------- 7 files changed, 22 insertions(+), 22 deletions(-) rename connect_bi_reporter/static/assets/{settings-CW7gT9jj.css => settings-Bd151nFI.css} (86%) delete mode 100644 connect_bi_reporter/static/assets/settings-DHU-f3SM.js create mode 100644 connect_bi_reporter/static/assets/settings-yl6ZGDej.js diff --git a/connect_bi_reporter/static/assets/settings-CW7gT9jj.css b/connect_bi_reporter/static/assets/settings-Bd151nFI.css similarity index 86% rename from connect_bi_reporter/static/assets/settings-CW7gT9jj.css rename to connect_bi_reporter/static/assets/settings-Bd151nFI.css index 97eff57..259313e 100644 --- a/connect_bi_reporter/static/assets/settings-CW7gT9jj.css +++ b/connect_bi_reporter/static/assets/settings-Bd151nFI.css @@ -1 +1 @@ -.dialog-input[data-v-6d4e2352]{display:block;margin-bottom:24px}.alert-holder[data-v-868574ac]{width:100%;background-color:#bdbdbd26}.alert[data-v-868574ac]{align-items:center;box-sizing:border-box;display:inline-flex;min-height:64px;min-width:240px;max-width:600px;padding:16px;border-radius:2px;color:var(--color-middle-grey)}.alert_error[data-v-868574ac]{background-color:#ff6a6a33}.alert_info[data-v-868574ac]{background-color:#0055ff26}.alert_success[data-v-868574ac]{background-color:#0bb07126}.alert_warning[data-v-868574ac]{background-color:#ffc70026}.alert__icon[data-v-868574ac]{flex:0 0 auto;margin-right:12px;display:flex}.alert__text[data-v-868574ac]{flex:1 1 auto;font-size:var(--font-size-regular);line-height:var(--line-height-regular);text-align:left;color:var(--color-text)}.credentials-card[data-v-6c1a997d]{overflow:visible}.add-button-text[data-v-6c1a997d]{color:var(--color-white)}.upload-schedule-card[data-v-cc40f2b1]{display:block;margin-bottom:24px}.app[data-v-2073f1a4]{max-width:800px;margin:0 auto} +.dialog-input[data-v-bdcdc16a]{display:block;margin-bottom:24px}.alert-holder[data-v-868574ac]{width:100%;background-color:#bdbdbd26}.alert[data-v-868574ac]{align-items:center;box-sizing:border-box;display:inline-flex;min-height:64px;min-width:240px;max-width:600px;padding:16px;border-radius:2px;color:var(--color-middle-grey)}.alert_error[data-v-868574ac]{background-color:#ff6a6a33}.alert_info[data-v-868574ac]{background-color:#0055ff26}.alert_success[data-v-868574ac]{background-color:#0bb07126}.alert_warning[data-v-868574ac]{background-color:#ffc70026}.alert__icon[data-v-868574ac]{flex:0 0 auto;margin-right:12px;display:flex}.alert__text[data-v-868574ac]{flex:1 1 auto;font-size:var(--font-size-regular);line-height:var(--line-height-regular);text-align:left;color:var(--color-text)}.credentials-card[data-v-6c1a997d]{overflow:visible}.add-button-text[data-v-6c1a997d]{color:var(--color-white)}.upload-schedule-card[data-v-cc40f2b1]{display:block;margin-bottom:24px}.app[data-v-220ca1e3]{max-width:800px;margin:20px auto} diff --git a/connect_bi_reporter/static/assets/settings-DHU-f3SM.js b/connect_bi_reporter/static/assets/settings-DHU-f3SM.js deleted file mode 100644 index 3a9a68d..0000000 --- a/connect_bi_reporter/static/assets/settings-DHU-f3SM.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as x,u as V,a as q,S as U,C as f,A as R,D as O}from"./ActionsMenu-BdIbYJG3.js";import{s as E,H as P,d as z,o as F,l as G,w as H,e as Y,r as W,c as j}from"./connect-BV-2I-fJ.js";import{m as $,u as B,a as p,c as D,s as X,o as r,x as k,k as L,j as _,b as h,d as s,g as J,l as K,t as w,n as Q,r as Z,h as N,F as T,f as ee,p as te,q as ae,D as le,G as se,H as ne}from"./vendor-1x2ovGvJ.js";const oe={__name:"AddEditCredentialDialog",props:$({mode:{type:String,required:!0},credentialId:{type:String,default:""}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:$(["created","edited"],["update:modelValue"]),setup(e,{emit:t}){const d=t,i=e,n=B(e,"modelValue"),a=p(""),o=p(""),v=D(()=>{var l,u;return((l=a.value)==null?void 0:l.length)>0&&((u=o.value)==null?void 0:u.length)>0}),g=D(()=>i.mode==="edit"),C=D(()=>g.value?"Edit Credentials":"Add Credentials"),y=D(()=>g.value?"Save":"Add"),S=["cancel","submit"],b=V(E()),A=async()=>{const{result:l,request:u}=V(E());await u(`/api/credentials/${i.credentialId}`),a.value=l.name,o.value=l.connection_string},m=()=>{a.value="",o.value=""},c=async()=>{i.mode==="create"?await b.request("/api/credentials","POST",{name:a.value,connection_string:o.value})<400&&d("created"):await b.request(`/api/credentials/${i.credentialId}`,"PUT",{name:a.value,connection_string:o.value})<400&&d("edited")};return X(()=>n.value,()=>{m(),i.mode==="edit"&&A()},{immediate:!0}),(l,u)=>(r(),k(U,{modelValue:n.value,"onUpdate:modelValue":u[2]||(u[2]=I=>n.value=I),title:C.value,actions:S,onSubmit:c,height:"auto",width:"480px",submitLabel:y.value,isValid:v.value},{default:L(()=>[_(q,{modelValue:a.value,"onUpdate:modelValue":u[0]||(u[0]=I=>a.value=I),class:"dialog-input",label:"Name"},null,8,["modelValue"]),_(q,{modelValue:o.value,"onUpdate:modelValue":u[1]||(u[1]=I=>o.value=I),class:"dialog-input",label:"Connection String"},null,8,["modelValue"])]),_:1},8,["modelValue","title","submitLabel","isValid"]))}},de=x(oe,[["__scopeId","data-v-6d4e2352"]]),ie={class:"alert"},ue={class:"alert__icon"},ce=["iconName","color"],re={class:"alert__text"},me={__name:"AlertItem",props:{message:{type:String,default:"List is empty. Please add item."},icon:{type:String,default:"googleInfoBaseline"},type:{type:String,default:"default"}},setup(e){const t={info:f.DEEP_BLUE,error:f.NICE_RED,success:f.NICE_GREEN,warning:f.NICE_YELLOW,default:f.MIDDLE_GREY};return(d,i)=>(r(),h("div",{class:Q(["alert-holder",`alert_${e.type}`])},[s("div",ie,[s("div",ue,[s("ui-icon",{iconName:e.icon,color:t[e.type],size:"24"},null,8,ce)]),s("div",re,[J(d.$slots,"message",{},()=>[K(w(e.message),1)],!0)])])],2))}},pe=x(me,[["__scopeId","data-v-868574ac"]]),_e=s("br",null,null,-1),ve=s("span",null,"You cannot undo this action once performed.",-1),ge={__name:"DeleteCredentialDialog",props:$({credentialId:{type:String,required:!0}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:$(["deleted"],["update:modelValue"]),setup(e,{emit:t}){const d=e,i=B(e,"modelValue"),n=t,a=["cancel","delete"],{request:o}=V(E()),v=async()=>{await o(`/api/credentials/${d.credentialId}`,"DELETE")<400&&n("deleted")};return(g,C)=>(r(),k(U,{modelValue:i.value,"onUpdate:modelValue":C[0]||(C[0]=y=>i.value=y),actions:a,onSubmit:v,height:"auto",title:"Delete Credential",width:"480px"},{default:L(()=>[s("p",null,[s("span",null,"Are you sure you want to delete this credential ("+w(e.credentialId)+")?",1),_e,ve])]),_:1},8,["modelValue"]))}},M=e=>(te("data-v-6c1a997d"),e=e(),ae(),e),fe={class:"credentials-card",title:"Credentials"},he={slot:"actions"},Ce=M(()=>s("ui-icon",{iconName:"googleAddBaseline",color:"#fff",size:"14"},null,-1)),ye=M(()=>s("span",{class:"add-button-text"},"Add",-1)),De=[Ce,ye],Ee=["headers"],Ie={__name:"CredentialsCard",setup(e){const{result:t,request:d}=V(E(),!1,!0);d("/api/credentials");const i=Z([{value:"name",text:"Name"},{value:"actions",text:"",width:"48px"}]),n=p(!1),a=p("create"),o=p(!1),v=p(""),g=p(""),C=m=>{v.value=m,o.value=!0},y=(m,c)=>{a.value=m,n.value=!0,g.value=c},S=()=>{d("/api/credentials"),n.value=!1},b=()=>{v.value="",o.value=!1,d("/api/credentials")},A=m=>[{key:"edit",color:f.TEXT,text:"Edit",icon:"googleEditBaseline",handler:()=>y("edit",m)},{separated:!0,key:"delete",color:f.NICE_RED,text:"Delete",icon:"googleDeleteForeverBaseline",handler:()=>C(m)}];return(m,c)=>(r(),h(T,null,[s("ui-card",fe,[s("div",he,[s("ui-button",{backgroundColor:"#2C98F0",width:"61px",height:"28px",onClick:c[0]||(c[0]=l=>y("create"))},De)]),s("div",null,[N(t).length>0?(r(),h("ui-table",{key:0,headers:i},[(r(!0),h(T,null,ee(N(t),l=>(r(),h("tr",{key:l.id},[s("td",null,w(l.name),1),s("td",null,[_(R,{class:"credentials-actions",actions:A(l.id)},null,8,["actions"])])]))),128))],8,Ee)):(r(),k(pe,{key:1,message:"No credentials added"}))])]),_(de,{modelValue:n.value,"onUpdate:modelValue":c[1]||(c[1]=l=>n.value=l),mode:a.value,credentialId:g.value,onCreated:S,onEdited:S},null,8,["modelValue","mode","credentialId"]),_(ge,{modelValue:o.value,"onUpdate:modelValue":c[2]||(c[2]=l=>o.value=l),credentialId:v.value,onDeleted:b},null,8,["modelValue","credentialId"])],64))}},Ve=x(Ie,[["__scopeId","data-v-6c1a997d"]]),xe={class:"upload-schedule-card",title:"Upload Schedule"},Se={__name:"UploadScheduleCard",setup(e){const{result:t,request:d}=V(E());d("/api/settings/schedule-tasks/create-uploads");const i={days:"Daily",weeks:"Weekly"},n=D(()=>{var a;return i[(a=t==null?void 0:t.trigger)==null?void 0:a.unit]});return(a,o)=>(r(),h("ui-card",xe,[s("div",null,[_(O,{bodyText:n.value,assistiveText:"00:00 · UTC"},null,8,["bodyText"])])]))}},be=x(Se,[["__scopeId","data-v-cc40f2b1"]]),$e={__name:"MainPage",setup(e){const t=p(""),d=D(()=>({height:t.value}));return E().listen("fullscreenSize",({height:n})=>{t.value=`${n}px`}),le("fullscreen-height",t),(n,a)=>(r(),h("div",{class:"app",style:se(d.value)},[_(be),_(Ve)],4))}},Ae=x($e,[["__scopeId","data-v-2073f1a4"]]);P({"ui-table":z,"ui-icon":F,"ui-button":G,"ui-menu":H,"ui-card":Y,"ui-textfield":W}).then(e=>{const t=ne(Ae);t.use(j,e),t.mount("#app")}); diff --git a/connect_bi_reporter/static/assets/settings-yl6ZGDej.js b/connect_bi_reporter/static/assets/settings-yl6ZGDej.js new file mode 100644 index 0000000..e8b8914 --- /dev/null +++ b/connect_bi_reporter/static/assets/settings-yl6ZGDej.js @@ -0,0 +1 @@ +import{_ as x,u as V,a as w,S as U,C as f,A as R,D as O}from"./ActionsMenu-BdIbYJG3.js";import{s as E,H as P,d as z,o as F,l as G,w as H,e as Y,r as W,c as j}from"./connect-BV-2I-fJ.js";import{m as k,u as B,a as p,c as D,s as X,o as r,x as A,k as L,j as _,b as h,d as s,g as J,l as K,t as T,n as Q,r as Z,h as q,F as N,f as ee,p as te,q as ae,D as le,G as se,H as oe}from"./vendor-1x2ovGvJ.js";const de={__name:"AddEditCredentialDialog",props:k({mode:{type:String,required:!0},credentialId:{type:String,default:""}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:k(["created","edited"],["update:modelValue"]),setup(e,{emit:t}){const n=t,i=e,o=B(e,"modelValue"),a=p(""),d=p(""),v=D(()=>{var l,u;return((l=a.value)==null?void 0:l.length)>0&&((u=d.value)==null?void 0:u.length)>0}),g=D(()=>i.mode==="edit"),C=D(()=>g.value?"Edit Credentials":"Add Credentials"),y=D(()=>g.value?"Save":"Add"),S=["cancel","submit"],b=V(E()),$=async()=>{const{result:l,request:u}=V(E());await u(`/api/credentials/${i.credentialId}`),a.value=l.name,d.value=l.sas_token},m=()=>{a.value="",d.value=""},c=async()=>{i.mode==="create"?await b.request("/api/credentials","POST",{name:a.value,sas_token:d.value})<400&&n("created"):await b.request(`/api/credentials/${i.credentialId}`,"PUT",{name:a.value,sas_token:d.value})<400&&n("edited")};return X(()=>o.value,()=>{m(),i.mode==="edit"&&$()},{immediate:!0}),(l,u)=>(r(),A(U,{modelValue:o.value,"onUpdate:modelValue":u[2]||(u[2]=I=>o.value=I),title:C.value,actions:S,onSubmit:c,height:"auto",width:"480px",submitLabel:y.value,isValid:v.value},{default:L(()=>[_(w,{modelValue:a.value,"onUpdate:modelValue":u[0]||(u[0]=I=>a.value=I),class:"dialog-input",label:"Name"},null,8,["modelValue"]),_(w,{modelValue:d.value,"onUpdate:modelValue":u[1]||(u[1]=I=>d.value=I),class:"dialog-input",label:"SAS Token"},null,8,["modelValue"])]),_:1},8,["modelValue","title","submitLabel","isValid"]))}},ne=x(de,[["__scopeId","data-v-bdcdc16a"]]),ie={class:"alert"},ue={class:"alert__icon"},ce=["iconName","color"],re={class:"alert__text"},me={__name:"AlertItem",props:{message:{type:String,default:"List is empty. Please add item."},icon:{type:String,default:"googleInfoBaseline"},type:{type:String,default:"default"}},setup(e){const t={info:f.DEEP_BLUE,error:f.NICE_RED,success:f.NICE_GREEN,warning:f.NICE_YELLOW,default:f.MIDDLE_GREY};return(n,i)=>(r(),h("div",{class:Q(["alert-holder",`alert_${e.type}`])},[s("div",ie,[s("div",ue,[s("ui-icon",{iconName:e.icon,color:t[e.type],size:"24"},null,8,ce)]),s("div",re,[J(n.$slots,"message",{},()=>[K(T(e.message),1)],!0)])])],2))}},pe=x(me,[["__scopeId","data-v-868574ac"]]),_e=s("br",null,null,-1),ve=s("span",null,"You cannot undo this action once performed.",-1),ge={__name:"DeleteCredentialDialog",props:k({credentialId:{type:String,required:!0}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:k(["deleted"],["update:modelValue"]),setup(e,{emit:t}){const n=e,i=B(e,"modelValue"),o=t,a=["cancel","delete"],{request:d}=V(E()),v=async()=>{await d(`/api/credentials/${n.credentialId}`,"DELETE")<400&&o("deleted")};return(g,C)=>(r(),A(U,{modelValue:i.value,"onUpdate:modelValue":C[0]||(C[0]=y=>i.value=y),actions:a,onSubmit:v,height:"auto",title:"Delete Credential",width:"480px"},{default:L(()=>[s("p",null,[s("span",null,"Are you sure you want to delete this credential ("+T(e.credentialId)+")?",1),_e,ve])]),_:1},8,["modelValue"]))}},M=e=>(te("data-v-6c1a997d"),e=e(),ae(),e),fe={class:"credentials-card",title:"Credentials"},he={slot:"actions"},Ce=M(()=>s("ui-icon",{iconName:"googleAddBaseline",color:"#fff",size:"14"},null,-1)),ye=M(()=>s("span",{class:"add-button-text"},"Add",-1)),De=[Ce,ye],Ee=["headers"],Ie={__name:"CredentialsCard",setup(e){const{result:t,request:n}=V(E(),!1,!0);n("/api/credentials");const i=Z([{value:"name",text:"Name"},{value:"actions",text:"",width:"48px"}]),o=p(!1),a=p("create"),d=p(!1),v=p(""),g=p(""),C=m=>{v.value=m,d.value=!0},y=(m,c)=>{a.value=m,o.value=!0,g.value=c},S=()=>{n("/api/credentials"),o.value=!1},b=()=>{v.value="",d.value=!1,n("/api/credentials")},$=m=>[{key:"edit",color:f.TEXT,text:"Edit",icon:"googleEditBaseline",handler:()=>y("edit",m)},{separated:!0,key:"delete",color:f.NICE_RED,text:"Delete",icon:"googleDeleteForeverBaseline",handler:()=>C(m)}];return(m,c)=>(r(),h(N,null,[s("ui-card",fe,[s("div",he,[s("ui-button",{backgroundColor:"#2C98F0",width:"61px",height:"28px",onClick:c[0]||(c[0]=l=>y("create"))},De)]),s("div",null,[q(t).length>0?(r(),h("ui-table",{key:0,headers:i},[(r(!0),h(N,null,ee(q(t),l=>(r(),h("tr",{key:l.id},[s("td",null,T(l.name),1),s("td",null,[_(R,{class:"credentials-actions",actions:$(l.id)},null,8,["actions"])])]))),128))],8,Ee)):(r(),A(pe,{key:1,message:"No credentials added"}))])]),_(ne,{modelValue:o.value,"onUpdate:modelValue":c[1]||(c[1]=l=>o.value=l),mode:a.value,credentialId:g.value,onCreated:S,onEdited:S},null,8,["modelValue","mode","credentialId"]),_(ge,{modelValue:d.value,"onUpdate:modelValue":c[2]||(c[2]=l=>d.value=l),credentialId:v.value,onDeleted:b},null,8,["modelValue","credentialId"])],64))}},Ve=x(Ie,[["__scopeId","data-v-6c1a997d"]]),xe={class:"upload-schedule-card",title:"Upload Schedule"},Se={__name:"UploadScheduleCard",setup(e){const{result:t,request:n}=V(E());n("/api/settings/schedule-tasks/create-uploads");const i={days:"Daily",weeks:"Weekly"},o=D(()=>{var a;return i[(a=t==null?void 0:t.trigger)==null?void 0:a.unit]});return(a,d)=>(r(),h("ui-card",xe,[s("div",null,[_(O,{bodyText:o.value,assistiveText:"00:00 · UTC"},null,8,["bodyText"])])]))}},be=x(Se,[["__scopeId","data-v-cc40f2b1"]]),ke={__name:"MainPage",setup(e){const t=p(""),n=D(()=>({height:t.value}));return E().listen("fullscreenSize",({height:o})=>{t.value=`${o}px`}),le("fullscreen-height",t),(o,a)=>(r(),h("div",{class:"app",style:se(n.value)},[_(be),_(Ve)],4))}},$e=x(ke,[["__scopeId","data-v-220ca1e3"]]);P({"ui-table":z,"ui-icon":F,"ui-button":G,"ui-menu":H,"ui-card":Y,"ui-textfield":W}).then(e=>{const t=oe($e);t.use(j,e),t.mount("#app")}); diff --git a/connect_bi_reporter/static/settings.html b/connect_bi_reporter/static/settings.html index 5c45e38..30e23d9 100644 --- a/connect_bi_reporter/static/settings.html +++ b/connect_bi_reporter/static/settings.html @@ -11,12 +11,12 @@ content="width=device-width, initial-scale=1.0" /> Connect BI Reporter Extension - + - +
diff --git a/ui/components/AddEditCredentialDialog.vue b/ui/components/AddEditCredentialDialog.vue index 4b88f57..aba88d2 100644 --- a/ui/components/AddEditCredentialDialog.vue +++ b/ui/components/AddEditCredentialDialog.vue @@ -15,9 +15,9 @@ label="Name" /> @@ -49,9 +49,9 @@ const value = defineModel({ }); const name = ref(''); -const connectionString = ref(''); +const sasToken = ref(''); -const isValid = computed(() => name.value?.length > 0 && connectionString.value?.length > 0); +const isValid = computed(() => name.value?.length > 0 && sasToken.value?.length > 0); const isEditMode = computed(() => props.mode === 'edit'); const title = computed(() => (isEditMode.value ? 'Edit Credentials' : 'Add Credentials')); const submitLabel = computed(() => (isEditMode.value ? 'Save' : 'Add')); @@ -63,19 +63,19 @@ const getCredential = async () => { const { result: credentialToEdit, request: credentialRequest } = useRequest(useToolkit()); await credentialRequest(`/api/credentials/${props.credentialId}`); name.value = credentialToEdit.name; - connectionString.value = credentialToEdit.connection_string; + sasToken.value = credentialToEdit.sas_token; }; const resetForm = () => { name.value = ''; - connectionString.value = ''; + sasToken.value = ''; }; const submit = async () => { if (props.mode === 'create') { const status = await createCredentialAction.request('/api/credentials', 'POST', { name: name.value, - connection_string: connectionString.value, + sas_token: sasToken.value, }); if (status < 400) emit('created'); } else { @@ -84,7 +84,7 @@ const submit = async () => { 'PUT', { name: name.value, - connection_string: connectionString.value, + sas_token: sasToken.value, }, ); if (status < 400) emit('edited'); diff --git a/ui/pages/settings/MainPage.vue b/ui/pages/settings/MainPage.vue index 304d7b5..56cfa03 100644 --- a/ui/pages/settings/MainPage.vue +++ b/ui/pages/settings/MainPage.vue @@ -31,6 +31,6 @@ provide('fullscreen-height', fullscreenHeight); diff --git a/ui/tests/specs/components/AddEditCredentialDialog.spec.js b/ui/tests/specs/components/AddEditCredentialDialog.spec.js index 860c96a..fb27490 100644 --- a/ui/tests/specs/components/AddEditCredentialDialog.spec.js +++ b/ui/tests/specs/components/AddEditCredentialDialog.spec.js @@ -12,7 +12,7 @@ vi.mock('@cloudblueconnect/connect-ui-toolkit/tools/vue/toolkitPlugin'); const requestResult = { name: 'credName', - connection_string: 'someconnnection', + sas_token: 'someconnnection', }; describe('AddEditCredentialDialog component', () => { @@ -66,10 +66,10 @@ describe('AddEditCredentialDialog component', () => { }), ); - const connectionStringTexfield = textfields[1]; - expect(connectionStringTexfield.attributes()).toEqual( + const sasTokenTextfield = textfields[1]; + expect(sasTokenTextfield.attributes()).toEqual( expect.objectContaining({ - label: 'Connection String', + label: 'SAS Token', }), ); }); @@ -104,7 +104,7 @@ describe('AddEditCredentialDialog component', () => { wrapper.vm.submit(); expect(useRequestStub.request).toHaveBeenCalledWith('/api/credentials', 'POST', { name: '', - connection_string: '', + sas_token: '', }); }); }); @@ -147,10 +147,10 @@ describe('AddEditCredentialDialog component', () => { }), ); - const connectionStringTexfield = textfields[1]; - expect(connectionStringTexfield.attributes()).toEqual( + const sasTokenTextfield = textfields[1]; + expect(sasTokenTextfield.attributes()).toEqual( expect.objectContaining({ - label: 'Connection String', + label: 'SAS Token', modelvalue: 'someconnnection', }), ); @@ -195,7 +195,7 @@ describe('AddEditCredentialDialog component', () => { 'PUT', { name: 'credName', - connection_string: 'someconnnection', + sas_token: 'someconnnection', }, ); });