Commit ea99a605 authored by Benedikt Heinrichs's avatar Benedikt Heinrichs
Browse files

Fix tests and image inclusion

parent 26545fe0
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<div class="row"> <div class="row">
<div class="col-xl-2"></div> <div class="col-xl-2"></div>
<div class="col-xl-8"> <div class="col-xl-8">
<h1 class="headline"> {{ $t('headline') }} <img class="logo" src="./assets/RWTH_Piktogramm_Ich_statt_man.png" alt=""> <span class="keyword">CoScInE</span></h1> <h1 class="headline"> {{ $t('headline') }} <img class="logo" :src="coscineImage" alt=""> <span class="keyword">CoScInE</span></h1>
<div class="row"> <div class="row">
<div class="col-sm-12 col-md-7"> <div class="col-sm-12 col-md-7">
<div class="card bg-light mb-3 w-100"> <div class="card bg-light mb-3 w-100">
...@@ -43,6 +43,11 @@ import Vue from 'vue'; ...@@ -43,6 +43,11 @@ import Vue from 'vue';
import LoginMain from './components/LoginMain.vue'; import LoginMain from './components/LoginMain.vue';
import LoginForm from './components/LoginForm.vue'; import LoginForm from './components/LoginForm.vue';
import imagePath from './assets/RWTH_Piktogramm_Ich_statt_man.png';
const scriptPath = (document.currentScript as any).src as string;
const scriptUrl = scriptPath.substring(0, scriptPath.indexOf('app.js'));
function getReturnUrl() { function getReturnUrl() {
const hookupElement = document.getElementById('loginpage'); const hookupElement = document.getElementById('loginpage');
const returnUrlParameters = hookupElement != null ? hookupElement.getAttribute('returnUrl') : ''; const returnUrlParameters = hookupElement != null ? hookupElement.getAttribute('returnUrl') : '';
...@@ -58,6 +63,7 @@ export default Vue.extend({ ...@@ -58,6 +63,7 @@ export default Vue.extend({
}, },
data() { data() {
return { return {
coscineImage: scriptUrl + imagePath.substring(1),
returnUrl: getReturnUrl(), returnUrl: getReturnUrl(),
currentInputCard: 'LoginMain', currentInputCard: 'LoginMain',
}; };
......
...@@ -3,4 +3,8 @@ declare module '*.vue' { ...@@ -3,4 +3,8 @@ declare module '*.vue' {
export default Vue; export default Vue;
} }
declare module '@itcenter-layout/bootstrap' declare module '@itcenter-layout/bootstrap'
\ No newline at end of file declare module "*.png" {
const value: any;
export default value;
}
\ No newline at end of file
import { expect } from 'chai';
import { shallowMount } from '@vue/test-utils';
import HelloWorld from '@/components/HelloWorld.vue';
describe('HelloWorld.vue', () => {
it('renders props.msg when passed', () => {
const msg = 'new message';
const wrapper = shallowMount(HelloWorld, {
propsData: { msg },
});
expect(wrapper.text()).to.include(msg);
});
});
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment