Created
June 1, 2018 07:58
-
-
Save sairamkrish/29662299c0f25a7b3e1c9819336c5d4c to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import { sandboxOf } from 'angular-playground'; | |
import { QuestionListComponent } from './question-list.component'; | |
import { SharedModule } from '../../shared/shared.module'; | |
import { QuestionViewSmallComponent } from '../question-view-small/question-view-small.component'; | |
const sandboxConfig = { | |
imports: [SharedModule], | |
declarations: [QuestionViewSmallComponent], | |
label: 'QuestionList' | |
} | |
const simpleQuestion = { | |
questionText: 'Is multiple inheritance available in Java ?', | |
answerChoices: '1.Not Available 2.Available 3.Based on needs, can be enabled', | |
createdDate: '2015-06-15T09:03:01+0900', | |
subjectCategories: [{ | |
id:33, | |
name:'Java' | |
},{ | |
id:34, | |
name: 'Programming' | |
}], | |
bookmarks:[{ | |
id:55, | |
name:'Test2017' | |
},{ | |
id:78, | |
name:'Needs-Review' | |
}] | |
} | |
export default sandboxOf(QuestionListComponent, sandboxConfig) | |
.add('with no questions (no input)', { | |
template: `<app-question-list></app-question-list>` | |
}) | |
.add('with no questions (empty array input)', { | |
template: `<app-question-list [questions]="questions"></app-question-list>`, | |
context: { | |
questions: [] | |
} | |
}) | |
.add('with questions', { | |
template: `<app-question-list [questions]="questions"></app-question-list>`, | |
context: { | |
questions: [simpleQuestion, simpleQuestion] | |
} | |
}) | |
; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment