#html #css #angular #jasmine #karma-runner
Вопрос:
У меня есть это событие по щелчку, когда я нажимаю на логотип.
Как я могу сделать тест с Жасмин для этого? Я использую Angular, и у меня есть некоторые трудности с этим.
вот мой html
lt;img class="navbar-brand default-logo" src="/assets/images/logocornova.png" /gt; lt;svg id="Layer_2_Image" class="svgLOGO" [@acimaBaixo]="myState" data-name="Layer 2 Image" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 83.99 44.99" gt; lt;image id="Layer_2_Image-2" data-name="Layer 2 Image" width="112" height="60" transform="scale(0.75)" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHAAAAA8CAYAAAC ej5cAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAFVUlEQVR4Xu2dS4xTVRiA//NsBxyJJMpDE3XBQhtwQtvbEmdhjMbHkphoNDEufAwQJGLElTEuDAtEJM7EsALdaBQnceXCYFgYaXs7ZAiJGF2wwseC4DB02nvPywX34G3pZGBlz5nzbdrzn/8umq//Pffc/m1RqVS6BACbAWARAi4xDgB/0OwJ5B4D7jCOV8oIjDZBoOMEgY4TBDpOEOg4QaDjBIGO45JAY4zJDyA/Xo7BYwBg5YMcgq6UMCoghK4QQvYIIQwAFAkhVxFCHyiltiKEljvmGsb4gFLqsjFmnFJ6EQA VErVlzvGNZwRqLVeXywWF86dO/e9jVWrVdLpdL4ZJkNrDZzz4/Pz85/l8u/u9XoP35TsMM6cQo0xkCTJwXwsjuOTlNLzWuubchFCwBj7NB XUr6nlLrTl oDcEggxhiklI Uy Xn83HG2OHB3Kz6TsRx/LuNRVF0vxBil0/yABwSaBFCvJUfz83NfU4I c1erBhjAGMMjLGP83lSyt1aaxoE/o9kVVgrl8s783HG2KG8QMbYiVardd7OR1G0KU3Tvb7JA3BMoEVK2VeFhULhOCHkotbarn3HBvKntNZjQeAIgDEGIcRkFEVP2diZM2dUoVA4opQCSulsHMcNO1ev19enabrPR3kADgq0JElyID mlH7BOV8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BwCOrIGB5QkCHScIdJwg0HGCQMcJAh0nCHQcCtf/cmccwl/vuMY4ACz C0afWEOinw uAAAAAElFTkSuQmCC" /gt; lt;/svggt; lt;/divgt;
и мои тс:
changePage(pageName: string): void { this.route.navigate([`/${pageName}`]); }