|
1 | 1 | import React from 'react';
|
2 | 2 | import DeleteAccountDialog from './DeleteAccountDialog';
|
3 | 3 | import {action} from '@storybook/addon-actions';
|
| 4 | +import {getCheckboxes} from './DeleteAccountHelpers'; |
4 | 5 |
|
5 | 6 | const PASSWORD = 'MY_PASSWORD';
|
6 | 7 | const DELETE_VERIFICATION = 'DELETE MY ACCOUNT';
|
@@ -35,16 +36,57 @@ export default storybook => {
|
35 | 36 | )
|
36 | 37 | },
|
37 | 38 | {
|
38 |
| - name: 'Delete Teacher Account', |
39 |
| - description: 'Warning message for teacher account deletion', |
| 39 | + name: 'Delete Teacher Account - without students', |
| 40 | + description: 'Warning message for teacher account deletion.', |
| 41 | + story: () => ( |
| 42 | + <DeleteAccountDialog |
| 43 | + {...DEFAULT_PROPS} |
| 44 | + isTeacher={true} |
| 45 | + warnAboutDeletingStudents={false} |
| 46 | + /> |
| 47 | + ) |
| 48 | + }, |
| 49 | + { |
| 50 | + name: 'Delete Teacher Account - with students', |
| 51 | + description: 'Warning message for teacher account deletion.', |
| 52 | + story: () => ( |
| 53 | + <DeleteAccountDialog |
| 54 | + {...DEFAULT_PROPS} |
| 55 | + isTeacher={true} |
| 56 | + warnAboutDeletingStudents={true} |
| 57 | + /> |
| 58 | + ) |
| 59 | + }, |
| 60 | + { |
| 61 | + name: 'Delete Teacher Account with students - 1 checkbox visible', |
| 62 | + description: ` |
| 63 | + A teacher with students is only required to see/check |
| 64 | + the first checkbox to delete their account. |
| 65 | + `, |
| 66 | + story: () => ( |
| 67 | + <DeleteAccountDialog |
| 68 | + {...DEFAULT_PROPS} |
| 69 | + isTeacher={true} |
| 70 | + warnAboutDeletingStudents={true} |
| 71 | + checkboxes={getCheckboxes(false,true)} |
| 72 | + /> |
| 73 | + ) |
| 74 | + }, |
| 75 | + { |
| 76 | + name: 'Delete Teacher Account with students - 5 checkboxes visible', |
| 77 | + description: ` |
| 78 | + For a teacher that has students who depend on them to log in |
| 79 | + and is required to see/check all 5 checkboxes to delete their |
| 80 | + account. |
| 81 | + `, |
40 | 82 | story: () => (
|
41 | 83 | <DeleteAccountDialog
|
42 | 84 | {...DEFAULT_PROPS}
|
43 | 85 | isTeacher={true}
|
44 | 86 | warnAboutDeletingStudents={true}
|
| 87 | + checkboxes={getCheckboxes(true)} |
45 | 88 | />
|
46 | 89 | )
|
47 | 90 | },
|
48 | 91 | ]);
|
49 | 92 | };
|
50 |
| - |
|
0 commit comments