Menambahkan expected_length dan extends
Menambahkan field `expected_length` dan menambahkan extends pada Use Case diagram. Sehingga requirement membuat Seksi, Pertanyaan dan Pilihan menjadi lebih eksplisit.
This commit is contained in:
parent
88a6b60731
commit
8418a77e8c
20
README.md
20
README.md
@ -43,6 +43,10 @@ Admin -- (Membuat Pertanyaan)
|
|||||||
Admin -- (Mengubah Pertanyaan)
|
Admin -- (Mengubah Pertanyaan)
|
||||||
Admin -- (Membuat Pilihan)
|
Admin -- (Membuat Pilihan)
|
||||||
Admin -- (Mengubah Pilihan)
|
Admin -- (Mengubah Pilihan)
|
||||||
|
|
||||||
|
(Membuat Seksi) .> (Membuat Kuesioner) : extends
|
||||||
|
(Membuat Pertanyaan) .> (Membuat Seksi) : extends
|
||||||
|
(Membuat Pilihan) .> (Membuat Pertanyaan) : extends
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Membuat Kuesioner
|
#### Membuat Kuesioner
|
||||||
@ -92,6 +96,8 @@ Ekstensi:
|
|||||||
|
|
||||||
#### Membuat Seksi
|
#### Membuat Seksi
|
||||||
|
|
||||||
|
Seksi hanya dapat dibuat setelah membuat kuesioner.
|
||||||
|
|
||||||
Skenario utama:
|
Skenario utama:
|
||||||
|
|
||||||
1. Admin telah login ke dalam sistem dan memilih kuesioner yang akan dibuatkan
|
1. Admin telah login ke dalam sistem dan memilih kuesioner yang akan dibuatkan
|
||||||
@ -136,12 +142,15 @@ Ekstensi:
|
|||||||
|
|
||||||
#### Membuat Pertanyaan
|
#### Membuat Pertanyaan
|
||||||
|
|
||||||
|
Pertanyaan hanya dapat dibuat setelah membuat seksi. Jadi Pertanyaan ada di dalam seksi dan seksi ada di dalam kuesioner.
|
||||||
|
|
||||||
skenario utama:
|
skenario utama:
|
||||||
|
|
||||||
1. admin telah login ke dalam sistem dan memilih kuesioner dan seksi yang akan
|
1. admin telah login ke dalam sistem dan memilih kuesioner dan seksi yang akan
|
||||||
dibuatkan pertanyaan
|
dibuatkan pertanyaan
|
||||||
2. admin mengisi form pembuatan pertanyaan baru yang terdiri dari `title`,
|
2. admin mengisi form pembuatan pertanyaan baru yang terdiri dari `title`,
|
||||||
`descriptions`, `question_type`, `text`, `number`
|
`descriptions`, `question_type`, `text`, `number`, dan `expected_length` jika
|
||||||
|
tipe pertanyaan adalah text atau isian
|
||||||
3. sistem menyimpan nilai form yang diisi dan menambahkan data `id`, `created_at`,
|
3. sistem menyimpan nilai form yang diisi dan menambahkan data `id`, `created_at`,
|
||||||
`updated_at`, `section_id` dan `creator_id` ke dalam table `questions`
|
`updated_at`, `section_id` dan `creator_id` ke dalam table `questions`
|
||||||
4. sistem mengembalikan admin ke tampilan daftar pertanyaan dari kuesioner dan
|
4. sistem mengembalikan admin ke tampilan daftar pertanyaan dari kuesioner dan
|
||||||
@ -153,6 +162,7 @@ ekstensi:
|
|||||||
- sistem mengembalikan admin ke halaman form pembuatan seksi baru dan
|
- sistem mengembalikan admin ke halaman form pembuatan seksi baru dan
|
||||||
menampilkan pesan kesalahan
|
menampilkan pesan kesalahan
|
||||||
- admin dapat mencoba mengirim form kembali setelah mengisi dengan lengkap
|
- admin dapat mencoba mengirim form kembali setelah mengisi dengan lengkap
|
||||||
|
2. b. field `expected_length` muncul jika tipe pertanyaan adalah text
|
||||||
3. a. sistem tidak dapat menyimpan data ke database:
|
3. a. sistem tidak dapat menyimpan data ke database:
|
||||||
- admin dikembalikan ke halaman pengisian form dan diberi peringatan
|
- admin dikembalikan ke halaman pengisian form dan diberi peringatan
|
||||||
kesalahan
|
kesalahan
|
||||||
@ -181,6 +191,8 @@ Ekstensi:
|
|||||||
|
|
||||||
#### Membuat Pilihan
|
#### Membuat Pilihan
|
||||||
|
|
||||||
|
Pilihan bersifat opsional dan hanya dapat dibuat setelah membuat pertanyaan.
|
||||||
|
|
||||||
skenario utama:
|
skenario utama:
|
||||||
|
|
||||||
1. admin telah login ke dalam sistem dan memilih pertanyaan yang akan dibuatkan
|
1. admin telah login ke dalam sistem dan memilih pertanyaan yang akan dibuatkan
|
||||||
@ -285,6 +297,9 @@ ekstensi:
|
|||||||
lengkap
|
lengkap
|
||||||
- responden dapat mencoba mengirim form kembali setelah memperbaiki
|
- responden dapat mencoba mengirim form kembali setelah memperbaiki
|
||||||
kesalahan
|
kesalahan
|
||||||
|
3. b. panjang jawaban kurang dari yang diharapkan
|
||||||
|
- sistem memberikan peringatan bahwa panjang jawaban kurang dari yang diharapkan
|
||||||
|
dan memberitahu berapa panjang jawaban minimal yang diharapkan
|
||||||
|
|
||||||
#### Menyelesaikan Kuesioner
|
#### Menyelesaikan Kuesioner
|
||||||
|
|
||||||
@ -393,6 +408,7 @@ class Question {
|
|||||||
number : int
|
number : int
|
||||||
text : varchar [300]
|
text : varchar [300]
|
||||||
descriptions : text
|
descriptions : text
|
||||||
|
expected_length : int
|
||||||
question_type : enum ['text', 'choice', 'number']
|
question_type : enum ['text', 'choice', 'number']
|
||||||
creator_id : int
|
creator_id : int
|
||||||
created_at : datetime
|
created_at : datetime
|
||||||
@ -442,3 +458,5 @@ Respondent "1" -- "1..*" Answer
|
|||||||
Question "1" - "1" Answer
|
Question "1" - "1" Answer
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### API End Points
|
||||||
|
|
||||||
|
@ -1,21 +1,35 @@
|
|||||||
Feature: Create Questionnaire
|
Feature: Create Questionnaire
|
||||||
As an admin on the application
|
As an admin on the application
|
||||||
I can create and publish a questionnaire
|
I can create and publish a questionnaire
|
||||||
So the questionnaire will be available to application user
|
So the questionnaire will be available to the respondents
|
||||||
|
|
||||||
Scenario: Create Questionnaire
|
Scenario: Create Questionnaire
|
||||||
Given I have a profile on the system
|
Given I have a profile on the system
|
||||||
And I am authorized to create a questionnaire
|
And I am authorized to create a questionnaire
|
||||||
When I successfully create a questionnaire
|
When I successfully create a questionnaire
|
||||||
Then I can see the questionnaire on questionnaire list page
|
Then I can see the questionnaire on questionnaire list page
|
||||||
|
|
||||||
|
Scenario: Update Questionnaire
|
||||||
|
Given I created a questionnaire
|
||||||
|
And I am on edit questionnaire page
|
||||||
|
And The questionnaire is not published
|
||||||
|
When I change the questionnaire details
|
||||||
|
Then I can see the changes on the questionnaire detail page
|
||||||
|
|
||||||
Scenario: Create Section
|
Scenario: Create Section
|
||||||
Given I have a profile on the system
|
Given I have a profile on the system
|
||||||
And I am on questionnaire detail page
|
And I am on questionnaire detail page
|
||||||
And I am authorized to create a section
|
And I am authorized to create a section
|
||||||
When I successfully create a section
|
When I successfully create a section
|
||||||
Then I can see the section on questionnaire detail page
|
Then I can see the section on questionnaire detail page
|
||||||
|
|
||||||
|
Scenario: Update Section
|
||||||
|
Given I created a section
|
||||||
|
And I am on edit section page
|
||||||
|
And The questionnaire is not published
|
||||||
|
When I change the section details
|
||||||
|
Then I can see the changes on the section detail page
|
||||||
|
|
||||||
Scenario: Create Question
|
Scenario: Create Question
|
||||||
Given I have a profile on the system
|
Given I have a profile on the system
|
||||||
And I am on section detail page
|
And I am on section detail page
|
||||||
@ -24,30 +38,17 @@ Feature: Create Questionnaire
|
|||||||
And I should provide question type, description and text
|
And I should provide question type, description and text
|
||||||
Then I can see the section on questionnaire detail page
|
Then I can see the section on questionnaire detail page
|
||||||
|
|
||||||
Scenario: Publish the Questionnaire
|
|
||||||
Given I have a profile on the system
|
|
||||||
And I created a questionnaire
|
|
||||||
When I publish the questionnaire
|
|
||||||
Then I can see the questionnaire on the published questionnaire page
|
|
||||||
|
|
||||||
Scenario: Update Questionnaire
|
|
||||||
Given I created a questionnaire
|
|
||||||
And I am on edit questionnaire page
|
|
||||||
And the Questionnaire is not published
|
|
||||||
When I change the questionnaire details
|
|
||||||
Then I can see the changes on the questionnaire detail page
|
|
||||||
|
|
||||||
Scenario: Update Section
|
|
||||||
Given I created a section
|
|
||||||
And I am on edit section page
|
|
||||||
And the Questionnaire is not published
|
|
||||||
When I change the section details
|
|
||||||
Then I can see the changes on the section detail page
|
|
||||||
|
|
||||||
Scenario: Update Question
|
Scenario: Update Question
|
||||||
Given I created a question
|
Given I created a question
|
||||||
And I am on edit question page
|
And I am on edit question page
|
||||||
And the Questionnaire is not published
|
And The questionnaire is not published
|
||||||
When I change the question details
|
When I change the question details
|
||||||
Then I can see the changes on the question detail page
|
Then I can see the changes on the question detail page
|
||||||
|
|
||||||
|
Scenario: Publish the Questionnaire
|
||||||
|
Given I have a profile on the system
|
||||||
|
And I created a questionnaire
|
||||||
|
And I am able to publish the questionnaire
|
||||||
|
And The questionnaire is not published
|
||||||
|
When I publish the questionnaire
|
||||||
|
Then I can see the questionnaire on the published questionnaire page
|
||||||
|
6
tests/features/MencetakLaporan.feature
Normal file
6
tests/features/MencetakLaporan.feature
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
Feature: Printing Questionnaire Reports
|
||||||
|
As an admin of the system
|
||||||
|
I can print reports of certain questionnaire
|
||||||
|
So that I can see the result of the questionnaire
|
||||||
|
|
||||||
|
Scenario: Print closed questionnaire
|
48
tests/features/MengisiKuesioner.feature
Normal file
48
tests/features/MengisiKuesioner.feature
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
Feature: Filling Out Questionnaire
|
||||||
|
As a respondent of the questionnaire
|
||||||
|
I can fill out the questionnaire
|
||||||
|
So I can completed the questionnaire
|
||||||
|
|
||||||
|
Scenario: Filling out questionnaire before filling profile form
|
||||||
|
Given I am on questionnaire page
|
||||||
|
And I am not filling profile form yet
|
||||||
|
When I try to fill the questionnaire
|
||||||
|
Then I should see warning that show I am not filling profile yet
|
||||||
|
And I should redirected to profile page
|
||||||
|
|
||||||
|
Scenario: Filling profile form
|
||||||
|
Given I am on profile form
|
||||||
|
And I fill out all the required fields
|
||||||
|
When I submit the form
|
||||||
|
Then I should see message that I successfully fill the profile form
|
||||||
|
And I should redirected to questionnaire detail page
|
||||||
|
|
||||||
|
Scenario: Revising answer
|
||||||
|
Given I answered certain question within questionnaire
|
||||||
|
And I haven't submit my questionnaire yet
|
||||||
|
When I change the answer for that question
|
||||||
|
Then My answer should changed
|
||||||
|
|
||||||
|
Scenario: Move to previous question
|
||||||
|
Given I am not on first question
|
||||||
|
When I move to previous question
|
||||||
|
Then I should see previous question with my answer
|
||||||
|
|
||||||
|
Scenario: Error when given answer is shorter than expected
|
||||||
|
Given The question expect the answers to be certain length
|
||||||
|
When I give answers shorter that it expect
|
||||||
|
Then I should see error warning and my answer will not be saved
|
||||||
|
|
||||||
|
Scenario: Submitting questionnaire
|
||||||
|
Given I am finished filling out the questionnaire
|
||||||
|
When I submit the questionnaire
|
||||||
|
Then The questionnaire should be saved on the server
|
||||||
|
And I should redirected to summary of questionnaire answers
|
||||||
|
And I should receive summary of my answers with respond id via my email
|
||||||
|
And later I can view my summary on a page using respond id
|
||||||
|
|
||||||
|
Scenario: Submitting unfinished questionnaire
|
||||||
|
Given I filled out some of the questions
|
||||||
|
When I submit the questionnaire
|
||||||
|
Then I should receive warning says that I am not finished the questionnaire
|
||||||
|
And the questionnaire can't be submitted
|
Loading…
Reference in New Issue
Block a user