Commit ac37805 Antoine de Chevigné
committed
1 parent 7b16c49 commit ac37805 Copy full SHA for ac37805
File tree 2 files changed +26
-0
lines changed
2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -303,4 +303,25 @@ describe('HashLink.vue', () => {
303
303
304
304
expect ( wrapper . html ( ) ) . toMatchSnapshot ( ) ;
305
305
} ) ;
306
+
307
+ it ( 'Should display alternative link switch' , async ( ) => {
308
+ const pinia = getPiniaInstance ( {
309
+ initialState : { } ,
310
+ mockAlternateLink : 'alternateLink'
311
+ } ) ;
312
+
313
+ const wrapper = mount ( HashLink , {
314
+ global : {
315
+ plugins : [ pinia ]
316
+ } ,
317
+ props : {
318
+ type : 'address' ,
319
+ fullHash : true ,
320
+ hash : '0xed5af388653567af2f388e6224dc7c4b3241c544'
321
+ }
322
+ } ) ;
323
+ await flushPromises ( ) ;
324
+
325
+ expect ( wrapper . html ( ) ) . toMatchSnapshot ( ) ;
326
+ } ) ;
306
327
} ) ;
Original file line number Diff line number Diff line change @@ -12,6 +12,11 @@ exports[`HashLink.vue > Should display a shortened link to the address 1`] = `
12
12
<!--v-if--></span >"
13
13
`;
14
14
15
+ exports[`HashLink.vue > Should display alternative link switch 1`] = `
16
+ "<span ><!--v-if--><a >0xed5af388653567af2f388e6224dc7c4b3241c544</a ><!--v-if--><span > <i class = " mdi-content-copy mdi v-icon notranslate v-theme--light v-icon--size-x-small v-icon--clickable text-medium-emphasis" role = " button" aria-hidden = " false" tabindex = " 0" ></i ><input type = " hidden" id = " copyElement-0xed5af388653567af2f388e6224dc7c4b3241c544" value = " 0xed5af388653567af2f388e6224dc7c4b3241c544" ></span >
17
+ <!--v-if--><span > <i class = " mdi-swap-horizontal mdi v-icon notranslate v-theme--light v-icon--size-x-small v-icon--clickable text-medium-emphasis" role = " button" aria-hidden = " false" tabindex = " 0" ></i ></span ></span >"
18
+ `;
19
+
15
20
exports[`HashLink.vue > Should display an external link if embedded 1`] = `
16
21
"<span ><!--v-if--><a href = " //explorer.tryethernal.com/address/0xed5af388653567af2f388e6224dc7c4b3241c544" target = " _blank" >0xed5af3...c544</a ><!--v-if--><span > <i class = " mdi-content-copy mdi v-icon notranslate v-theme--light v-icon--size-x-small v-icon--clickable text-medium-emphasis" role = " button" aria-hidden = " false" tabindex = " 0" ></i ><input type = " hidden" id = " copyElement-0xed5af388653567af2f388e6224dc7c4b3241c544" value = " 0xed5af388653567af2f388e6224dc7c4b3241c544" ></span >
17
22
<!--v-if-->
You can’t perform that action at this time.
0 commit comments