-
-
Notifications
You must be signed in to change notification settings - Fork 216
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2149 from marioneyraud/front-setup-section
Front: add setup section
- Loading branch information
Showing
10 changed files
with
112 additions
and
1 deletion.
There are no files selected for viewing
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 @@ | ||
export interface SetupService {} |
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
19 changes: 19 additions & 0 deletions
19
src/main/webapp/app/springboot/primary/generator/setup-generator/SetupGenerator.component.ts
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,19 @@ | ||
import { defineComponent } from 'vue'; | ||
import { GeneratorButtonVue } from '@/springboot/primary/generator/generator-button'; | ||
|
||
export default defineComponent({ | ||
name: 'SetupGeneratorComponent', | ||
|
||
components: { | ||
GeneratorButtonVue, | ||
}, | ||
props: { | ||
project: { | ||
type: Object, | ||
required: true, | ||
}, | ||
}, | ||
setup() { | ||
return {}; | ||
}, | ||
}); |
7 changes: 7 additions & 0 deletions
7
src/main/webapp/app/springboot/primary/generator/setup-generator/SetupGenerator.vue
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 @@ | ||
<template> | ||
<div id="v-pills-setup" class="tab-pane fade" role="tabpanel" aria-labelledby="v-pills-profile-tab"> | ||
<div class="d-flex flex-column gap-3"></div> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts" src="./SetupGenerator.component.ts"></script> |
4 changes: 4 additions & 0 deletions
4
src/main/webapp/app/springboot/primary/generator/setup-generator/index.ts
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,4 @@ | ||
import SetupGeneratorComponent from './SetupGenerator.component'; | ||
import SetupGeneratorVue from './SetupGenerator.vue'; | ||
|
||
export { SetupGeneratorComponent, SetupGeneratorVue }; |
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
5 changes: 5 additions & 0 deletions
5
src/test/javascript/spec/springboot/domain/SetupService.fixture.ts
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 @@ | ||
import { SetupService } from '../../../../../main/webapp/app/springboot/domain/SetupService'; | ||
|
||
export interface SetupServiceFixture extends SetupService {} | ||
|
||
export const stubSetupService = (): SetupServiceFixture => ({}); |
44 changes: 44 additions & 0 deletions
44
src/test/javascript/spec/springboot/primary/generator/setup-generator/SetupGenerator.spec.ts
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,44 @@ | ||
import { shallowMount, VueWrapper } from '@vue/test-utils'; | ||
import { AlertBus } from '@/common/domain/alert/AlertBus'; | ||
import { ProjectToUpdate } from '@/springboot/primary/ProjectToUpdate'; | ||
import { stubAlertBus } from '../../../../common/domain/AlertBus.fixture'; | ||
import { createProjectToUpdate } from '../../ProjectToUpdate.fixture'; | ||
import { stubSetupService } from '../../../domain/SetupService.fixture'; | ||
import { SetupService } from '@/springboot/domain/SetupService'; | ||
import { SetupGeneratorVue } from '@/springboot/primary/generator/setup-generator'; | ||
|
||
let wrapper: VueWrapper; | ||
let component: any; | ||
|
||
interface WrapperOptions { | ||
alertBus: AlertBus; | ||
setupService: SetupService; | ||
project: ProjectToUpdate; | ||
} | ||
const wrap = (wrapperOptions?: Partial<WrapperOptions>) => { | ||
const { alertBus, setupService, project }: WrapperOptions = { | ||
alertBus: stubAlertBus(), | ||
setupService: stubSetupService(), | ||
project: createProjectToUpdate(), | ||
...wrapperOptions, | ||
}; | ||
wrapper = shallowMount(SetupGeneratorVue, { | ||
props: { | ||
project, | ||
}, | ||
global: { | ||
provide: { | ||
alertBus, | ||
setupService, | ||
}, | ||
}, | ||
}); | ||
component = wrapper.vm; | ||
}; | ||
describe('SetupGenerator', () => { | ||
it('should exist', () => { | ||
wrap(); | ||
|
||
expect(wrapper.exists()).toBe(true); | ||
}); | ||
}); |