-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix test
- Loading branch information
Showing
15 changed files
with
115 additions
and
69 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,20 @@ | ||
<script> | ||
import BmltServer from './lib/BmltServer.svelte'; | ||
<script lang="ts"> | ||
import './css/main.scss'; | ||
import Router from 'svelte-spa-router'; | ||
import Home from './routes/Home.svelte'; | ||
import Login from './routes/Login.svelte'; | ||
const routes = { | ||
'/login': Login, | ||
'*': Home | ||
}; | ||
</script> | ||
|
||
<svelte:head> | ||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css" crossorigin="anonymous" referrerpolicy="no-referrer" /> | ||
<title>BMLT Root Server</title> | ||
</svelte:head> | ||
|
||
<BmltServer /> | ||
<body> | ||
<Router {routes} /> | ||
</body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
declare const settings: { | ||
apiBaseUrl: string; | ||
defaultLanguage: string; | ||
isLanguageSelectorEnabled: boolean; | ||
languageMapping: Record<string, string>; | ||
version: string; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<script lang="ts"> | ||
import BmltServer from '../lib/BmltServer.svelte'; | ||
</script> | ||
|
||
<BmltServer /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<script lang="ts"> | ||
import { theme } from '../stores/themeStore'; | ||
</script> | ||
|
||
<section class={$theme}> | ||
<div id="export-form"> | ||
<h1>Lets Login</h1> | ||
<div id="footer"> | ||
<a href="#/" class="footer-link">Home</a> | ||
</div> | ||
</div> | ||
</section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
import { render } from '@testing-library/svelte'; | ||
import '@testing-library/jest-dom'; | ||
import App from '../App.svelte'; | ||
|
||
test('renders the app component', () => { | ||
const { getByText } = render(App); | ||
|
||
// Check for the BmltServer component | ||
expect(getByText('BMLT Root Server')).toBeInTheDocument(); | ||
|
||
// Check for the presence of the <title> element | ||
test('renders the app component and sets the title', () => { | ||
render(App); | ||
expect(document.title).toBe('BMLT Root Server'); | ||
}); | ||
|
||
describe('App.svelte', () => { | ||
test('renders the app component and sets the title', () => { | ||
render(App); | ||
expect(document.title).toBe('BMLT Root Server'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,13 @@ | ||
import '@testing-library/jest-dom'; | ||
|
||
// @ts-expect-error set from backend | ||
global.settings = { | ||
apiBaseUrl: 'http://localhost', | ||
defaultLanguage: 'en', | ||
isLanguageSelectorEnabled: true, | ||
languageMapping: { | ||
en: 'English', | ||
fr: 'French' | ||
}, | ||
version: '1.0.0' | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,8 @@ | ||
import adapter from '@sveltejs/adapter-static'; | ||
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'; | ||
|
||
/** @type {import('@sveltejs/kit').Config} */ | ||
const config = { | ||
// Consult https://kit.svelte.dev/docs/integrations#preprocessors | ||
// for more information about preprocessors | ||
preprocess: vitePreprocess(), | ||
|
||
kit: { | ||
// adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list. | ||
// If your environment is not supported or you settled on a specific environment, switch out the adapter. | ||
// See https://kit.svelte.dev/docs/adapters for more information about adapters. | ||
adapter: adapter({ | ||
pages: 'build', | ||
assets: 'build', | ||
fallback: 'index.html', | ||
precompress: false | ||
}), | ||
alias: { | ||
$components: 'resources/js/components', | ||
$lib: 'resources/js/lib' | ||
}, | ||
files: { | ||
appTemplate: 'resources/js/app.html', | ||
assets: 'resources/js/static', | ||
hooks: { | ||
universal: 'resources/js/hooks', | ||
}, | ||
lib: 'resources/js/lib', | ||
routes: 'resources/js/routes', | ||
serviceWorker: 'resources/js/service-worker' | ||
} | ||
} | ||
}; | ||
|
||
export default config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters