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

Fix tests and image inclusion

parent 26545fe0
......@@ -4,7 +4,7 @@
<div class="row">
<div class="col-xl-2"></div>
<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="col-sm-12 col-md-7">
<div class="card bg-light mb-3 w-100">
......@@ -43,6 +43,11 @@ import Vue from 'vue';
import LoginMain from './components/LoginMain.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() {
const hookupElement = document.getElementById('loginpage');
const returnUrlParameters = hookupElement != null ? hookupElement.getAttribute('returnUrl') : '';
......@@ -58,6 +63,7 @@ export default Vue.extend({
},
data() {
return {
coscineImage: scriptUrl + imagePath.substring(1),
returnUrl: getReturnUrl(),
currentInputCard: 'LoginMain',
};
......
......@@ -4,3 +4,7 @@ declare module '*.vue' {
}
declare module '@itcenter-layout/bootstrap'
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