mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2026-11-26 10:30:54 +08:00
CI Build Artifacts (commit: b3961a3483, version: 1.10.0-dev)
This commit is contained in:
1 parent
16ef728225
commit
4f9742a203
30 files changed
+57
-57
No files matched your search
@@ -1,2 +1,2 @@
|
||||
(("undefined"!==typeof self?self:this)["webpackChunkharvester_1_10_0_dev"]=("undefined"!==typeof self?self:this)["webpackChunkharvester_1_10_0_dev"]||[]).push([[374],{24959:function(e,t,a){"use strict";a.d(t,{H:function(){return d},X:function(){return i}});var l=a(9274),o=a(53197),s=a(71274);const r=()=>{};function n(e,t,a){return l=>{const o=t.find(e=>e.path===l);if(!o)return[];const n=o.translationKey?e(o.translationKey):"Value",i={...(0,s.A)(e,{key:n}),...a};return o.rules.map(e=>{const t=i[e];return t||r})}}function i(e,t,a={}){const{errors:s,validate:r}=(0,o.mN)(),i=(0,l.ref)(!1);(0,l.provide)("vee-show-all-errors",i);const d=n(e,t,a),c=(0,l.computed)(()=>0===Object.keys(s.value).length),u=async(...e)=>{const t=await r(...e);return i.value=!0,t};return{getRules:d,isFormValid:c,validateForm:u,veeErrors:s,showAllErrors:i}}function d(e,t,a={}){return{getRules:n(e,t,a)}}},53338:function(e,t,a){"use strict";a.r(t);var l=a(81073),o=a(42629);describe("component: Loki",()=>{it("should display URL placeholder",()=>{const e=(0,l.Ky)(o["default"],{props:{mode:"edit",namespace:"whatever"}}),t="https://127.0.0.1:8000",a=e.find('[data-testid="loki-url"]').attributes("placeholder");expect(a).toBe(t)})})},72688:function(e,t,a){"use strict";var l=a(81073),o=a(99726),s=a(4364);const r=e=>e.$options&&"function"===typeof e.$options.fetch&&!e.$options.fetch.length,n=(e,t,a)=>{e.$options[t]?Array.isArray(e.$options[t])||"function"!==typeof e.$options[t]||(e.$options[t]=[e.$options[t]]):e.$options[t]=[],Array.isArray(e.$options[t])&&!e.$options[t].includes(a)&&e.$options[t].push(a)};var i={beforeCreate(){r(this)&&(this._fetchDelay="number"===typeof this.$options.fetchDelay?this.$options.fetchDelay:200,this.$fetch=c.bind(this),n(this,"beforeMount",d))},data(){return{state:{pending:!1,error:null,timestamp:Date.now()}}},computed:{$fetchState(){return this.state}}};function d(){if(!this._hydrated)return this.$fetch()}function c(e=!0){return e?(this._fetchPromise||(this._fetchPromise=u.call(this).then(()=>{delete this._fetchPromise})),this._fetchPromise):u.call(this)}async function u(){this.state.pending=!0,this.state.error=null,this._hydrated=!1;let e=null;const t=Date.now();try{await this.$options.fetch.call(this)}catch(l){s.error("Error in fetch():",l),e=(0,o.cQ)(l)}const a=this._fetchDelay-(Date.now()-t);a>0&&await new Promise(e=>setTimeout(e,a)),this.state.error=e,this.state.pending=!1,this.state.timestamp=Date.now()}var p=a(884);const m=["us-east-1","eu-west-1"],v=e=>(0,l.Ky)(p["default"],{props:{mode:"edit",namespace:"whatever",value:e},global:{mixins:[i],mocks:{$store:{dispatch:e=>{if("aws/defaultRegions"!==e)throw new Error(`unexpected dispatch: ${e}`);return Promise.resolve([...m])}}}}});describe("component: S3",()=>{it("should display a region select showing the configured s3_region",()=>{const e={s3_region:"us-east-1"},t=v(e),a=t.find('[data-testid="s3-region"]');expect(a.exists()).toBe(!0),expect(a.attributes("value")).toBe(e.s3_region)}),it("should write the region select back to s3_region",async()=>{const e={},t=v(e),a=t.findComponent('[data-testid="s3-region"]');await a.vm.$emit("update:value","eu-west-1"),expect(e).toStrictEqual({s3_region:"eu-west-1"})}),it("should populate the region select with the known AWS regions",async()=>{const e=v({});await e.vm.$nextTick();const t=e.findComponent('[data-testid="s3-region"]');expect(t.props("options")).toStrictEqual(m)}),it("should keep an existing region that is not a known AWS region as an option",async()=>{const e=v({s3_region:"minio-local"});await e.vm.$nextTick();const t=e.findComponent('[data-testid="s3-region"]');expect(t.props("options")).toStrictEqual(["minio-local",...m])})})},93498:function(e,t,a){"use strict";a.r(t);var l=a(81073),o=a(65359),s=a(14220),r=a(64814);const n={query:{}},i=()=>{const e=(0,o.y$)({getters:{"i18n/t":()=>jest.fn()}});return{global:{plugins:[e],mocks:{$route:n,$fetchState:{}}}}},d={known_hosts:"S05PV05fSE9TVFM=","ssh-privatekey":"dGVzdDE=","ssh-publickey":"dGVzdDE="};describe.each([s.YQ,s.G5,s.nW])("component: Ssh.vue",e=>{it(`mode: ${e}, should show input fields`,()=>{const t=(0,l.Or)(r["default"],{...i(),props:{value:{name:"foo",decodedData:d,supportsSshKnownHosts:!0},mode:e}}),a=t.find('[data-testid="ssh-public-key"]').element,o=t.find('[data-testid="ssh-private-key"]').element,s=t.find('[data-testid="ssh-known-hosts"]').element;expect(a.value).toBe("dGVzdDE="),expect(o.value).toBe("dGVzdDE="),expect(s.value).toBe("S05PV05fSE9TVFM=")}),it.each([["show",!0],["hide",!1]])(`mode: ${e}, should %p known_hosts`,(e,t)=>{const a=(0,l.Or)(r["default"],{...i(),props:{value:{name:"foo",decodedData:d,supportsSshKnownHosts:t},mode:s.G5}}),o=a.find('[data-testid="ssh-known-hosts"]');expect(o.exists()).toBe(t)})})},85992:function(e,t,a){"use strict";a.d(t,{A:function(){return S}});var l=a(9274);const o={class:"row"},s={key:0,class:"col span-12"},r={class:"helper-text mb-10"},n={class:"row mb-20"},i={class:"col span-6"},d={class:"col span-6"},c={clLine truncated
|
||||
(("undefined"!==typeof self?self:this)["webpackChunkharvester_1_10_0_dev"]=("undefined"!==typeof self?self:this)["webpackChunkharvester_1_10_0_dev"]||[]).push([[374],{24959:function(e,t,a){"use strict";a.d(t,{H:function(){return d},X:function(){return i}});var l=a(9274),o=a(53197),s=a(71274);const r=()=>{};function n(e,t,a){return l=>{const o=t.find(e=>e.path===l);if(!o)return[];const n=o.translationKey?e(o.translationKey):"Value",i={...(0,s.A)(e,{key:n}),...a};return o.rules.map(e=>{const t=i[e];return t||r})}}function i(e,t,a={}){const{errors:s,validate:r}=(0,o.mN)(),i=(0,l.ref)(!1);(0,l.provide)("vee-show-all-errors",i);const d=n(e,t,a),c=(0,l.computed)(()=>0===Object.keys(s.value).length),u=async(...e)=>{const t=await r(...e);return i.value=!0,t};return{getRules:d,isFormValid:c,validateForm:u,veeErrors:s,showAllErrors:i}}function d(e,t,a={}){return{getRules:n(e,t,a)}}},53338:function(e,t,a){"use strict";a.r(t);var l=a(81073),o=a(42629);describe("component: Loki",()=>{it("should display URL placeholder",()=>{const e=(0,l.Ky)(o["default"],{props:{mode:"edit",namespace:"whatever"}}),t="https://127.0.0.1:8000",a=e.find('[data-testid="loki-url"]').attributes("placeholder");expect(a).toBe(t)})})},72688:function(e,t,a){"use strict";var l=a(81073),o=a(99726),s=a(4364);const r=e=>e.$options&&"function"===typeof e.$options.fetch&&!e.$options.fetch.length,n=(e,t,a)=>{e.$options[t]?Array.isArray(e.$options[t])||"function"!==typeof e.$options[t]||(e.$options[t]=[e.$options[t]]):e.$options[t]=[],Array.isArray(e.$options[t])&&!e.$options[t].includes(a)&&e.$options[t].push(a)};var i={beforeCreate(){r(this)&&(this._fetchDelay="number"===typeof this.$options.fetchDelay?this.$options.fetchDelay:200,this.$fetch=c.bind(this),n(this,"beforeMount",d))},data(){return{state:{pending:!1,error:null,timestamp:Date.now()}}},computed:{$fetchState(){return this.state}}};function d(){if(!this._hydrated)return this.$fetch()}function c(e=!0){return e?(this._fetchPromise||(this._fetchPromise=u.call(this).then(()=>{delete this._fetchPromise})),this._fetchPromise):u.call(this)}async function u(){this.state.pending=!0,this.state.error=null,this._hydrated=!1;let e=null;const t=Date.now();try{await this.$options.fetch.call(this)}catch(l){s.error("Error in fetch():",l),e=(0,o.cQ)(l)}const a=this._fetchDelay-(Date.now()-t);a>0&&await new Promise(e=>setTimeout(e,a)),this.state.error=e,this.state.pending=!1,this.state.timestamp=Date.now()}var p=a(884);const m=["us-east-1","eu-west-1"],v=e=>(0,l.Ky)(p["default"],{props:{mode:"edit",namespace:"whatever",value:e},global:{mixins:[i],mocks:{$store:{dispatch:e=>{if("aws/defaultRegions"!==e)throw new Error(`unexpected dispatch: ${e}`);return Promise.resolve([...m])}}}}});describe("component: S3",()=>{it("should display a region select showing the configured s3_region",()=>{const e={s3_region:"us-east-1"},t=v(e),a=t.find('[data-testid="s3-region"]');expect(a.exists()).toBe(!0),expect(a.attributes("value")).toBe(e.s3_region)}),it("should write the region select back to s3_region",async()=>{const e={},t=v(e),a=t.findComponent('[data-testid="s3-region"]');await a.vm.$emit("update:value","eu-west-1"),expect(e).toStrictEqual({s3_region:"eu-west-1"})}),it("should populate the region select with the known AWS regions",async()=>{const e=v({});await e.vm.$nextTick();const t=e.findComponent('[data-testid="s3-region"]');expect(t.props("options")).toStrictEqual(m)}),it("should keep an existing region that is not a known AWS region as an option",async()=>{const e=v({s3_region:"minio-local"});await e.vm.$nextTick();const t=e.findComponent('[data-testid="s3-region"]');expect(t.props("options")).toStrictEqual(["minio-local",...m])})})},93498:function(e,t,a){"use strict";a.r(t);var l=a(81073),o=a(65359),s=a(14220),r=a(64814);const n={query:{}},i=()=>{const e=(0,o.y$)({getters:{"i18n/t":()=>jest.fn()}});return{global:{plugins:[e],mocks:{$route:n,$fetchState:{}}}}},d={known_hosts:"S05PV05fSE9TVFM=","ssh-privatekey":"dGVzdDE=","ssh-publickey":"dGVzdDE="};describe.each([s.YQ,s.G5,s.nW])("component: Ssh.vue",e=>{it(`mode: ${e}, should show input fields`,()=>{const t=(0,l.Or)(r["default"],{...i(),props:{value:{name:"foo",decodedData:d,supportsSshKnownHosts:!0},mode:e}}),a=t.find('[data-testid="ssh-public-key"]').element,o=t.find('[data-testid="ssh-private-key"]').element,s=t.find('[data-testid="ssh-known-hosts"]').element;expect(a.value).toBe("dGVzdDE="),expect(o.value).toBe("dGVzdDE="),expect(s.value).toBe("S05PV05fSE9TVFM=")}),it.each([["show",!0],["hide",!1]])(`mode: ${e}, should %p known_hosts`,(e,t)=>{const a=(0,l.Or)(r["default"],{...i(),props:{value:{name:"foo",decodedData:d,supportsSshKnownHosts:t},mode:s.G5}}),o=a.find('[data-testid="ssh-known-hosts"]');expect(o.exists()).toBe(t)})})},85992:function(e,t,a){"use strict";a.d(t,{A:function(){return S}});var l=a(9274);const o={class:"row"},s={key:0,class:"col span-12"},r={class:"helper-text mb-10"},n={class:"row mb-20"},i={class:"col span-6"},d={class:"col span-6"},c={clLine truncated
|
||||
//# sourceMappingURL=harvester-1.10.0-dev.umd.min.374.js.map
|
||||
Reference in new issue
Block a user