2.1.2 Các kịch bản viết bằng Gherkin
Tất cả các kịch bản: https://github.com/ChuThom610/Panda-Online/tree/master/features
a. Kịch bản với trang chủ: trangchu.feature
Feature: Use "Home"
As a user
I want to visit homepage
In order to know information about app and perform functions
Bachground:
Given I am on homepage of web app
And I logged in as Anna
Scenario: Enter "Luyện tập"
When I click on "Luyện tập"
Then I should see a list that include 6 chapters
When I click in chapter 1
Then I should see 6 lesson exercise
When I click in "Đếm đến 5" lesson exercise
Then I should see blank box to fill my answer
Scenario: Enter "Kiểm tra"
When I click on "Kiểm tra"
Then I should see a list that include 5 examination
When I click in "Đề kiểm tra số 1"
Then I should see a test exam include 10 question and "Điểm" panel
Scenario: Enter "Kỹ năng sống"
When I click on "Kỹ năng sống"
Then I should see "Truyên ngắn" and "Quà tặng cuộc sống" items
Scenario: Enter "Đăng nhập"
When I click on "Đăng nhập"
Then I should see "Tên người dùng" and "Mật khẩu" blank text boxes
Scenario: Enter "Đăng ký"
When I click on "Đăng ký"
Then I should see "Tên người dùng" and "Mật khẩu" blank text boxes
b. Chức năng luyện tập:
- luyentap_demden5.feature
Feature: Submit
As a child who do exercises
I want to submit after every question
In order to know result as soon as I have done
Background:
Given I am entered in a exercise
And I see 3 fishes and demand "Số cá xuất hiện trên hình?"
And I see a blank box to fill my answer
And I see a frame where I see star if I have true answer
Scenario: True answer
When I fill the blank box with "3"
And I click on "Kiểm tra" button
Then I should see a star in a frame
And I can do next question
Scenario: False answer
When I fill the blank box with "2"
And I click on "Kiểm tra" button
Then I should see amount of star is const
And I can do next question
- luyentap_demden5_cauhoicuoi.feature
Feature: Submit last question
As a child who do exercises
I want move next lesson exercise or stop doing exercise after last question
In order to continue my work
Background:
Given I am in last question of "Đếm đến 5" exercise
And I see 3 fishes
And i see a question and a blank box to fill my answer
Scenario: True answer
When I fill the blank box with "3"
And I click on "Kiểm tra" button
Then I should see add a star in a frame
And I see notification "Chúc mừng bạn đã hoàn thành xuất sắc bài học 1."
And I see notification "Chuyển đến bài học mới nào."
And I see a link to lesson "Bài 2 - chương 1: Các phép toán trong phạm vi 10."
When I click on this link
Then I can do "Bài 2- Chương 1: Các phép toán trong phạm vi 10" exercise
Scenario:
When I fill the blank box with "2"
And I click on "Nộp bài" button
Then I should see amount of star in a frame is const
And I see notification "Chúc mừng bạn đã hoàn thành bài học 1."
And I see notification "Chuyển đến bài học mới nào."
And I see a link to lesson "Bài 2 - chương 1: Các phép toán trong phạm vi 10."
When I click on this link
Then I can do "Bài 2- Chương 1: Các phép toán trong phạm vi 10" exercise
- luyentap_phamvi10.feature
Feature: Submit
As a child who do exercises
I want to submit after every question
In order to know result as soon as I have done
Background:
Given I am entered in a exercise
And I see a fomular "3 + 4 = " demand "Điền số thích hợp vào ô trống"
And I see a blank box to fill my answer
And I see a frame where I see a star was added if I have true answer
Scenario: True answer
When I fill the blank box with "7"
And I click on "Kiểm tra" button
Then I should see a star in a frame
And I can do next question
Scenario: False answer
When I fill the blank box with "2"
And I click on "Kiểm tra" button
Then I should see amount of star is const
And I can do next question
- luyentap_phamvi10_cauhoicuoi.feature
Feature: Submit last question
As a child who do exercises
I want move next lesson exercise or stop doing exercise after last question
In order to continue my work
Background:
Given I am in last question of "Các phép toán trong phạm vi 10" exercise
And I see a fomular "3 + 4 = " demand "Điền số thích hợp vào ô trống"
And I see a blank box to fill my answer
And I see a frame where I see a star was added if I have true answer
Scenario: True answer
When I fill the blank box with "7"
And I click on "Kiểm tra" button
Then I should see a star was added in a frame
And I see notification "Chúc mừng bạn đã hoàn thành xuất sắc bài học 2."
And I see notification "Chuyển đến bài học mới nào."
And I see a link to lesson "Bài 3- chương 1: Tìm số lớn nhất bé nhất trong phạm vi 10."
When I click on this link
Then I can do "Bài 3- chương 1: Tìm số lớn nhất bé nhất trong phạm vi 10." exercise
Scenario:
When I fill the blank box with "2"
And I click on "Nộp bài" button
Then I should see amount of star in a frame is const
And I see notification "Chúc mừng bạn đã hoàn thành bài học 2."
And I see notification "Chuyển đến bài học mới nào."
And I see a link to lesson "Bài 3- chương 1: Tìm số lớn nhất trong bé nhất phạm vi 10."
When I click on this link
Then I can do "Bài 3- chương 1: Tìm số lớn nhất bé nhất trong phạm vi 10." exercise
b. Chức năng làm bài kiểm tra: kiemtra.feature
Feature: Do the test
As a student
I want to do the test
In order to total and reinforce my knowledge
Background:
Given I clicked on "Đề kiểm tra số 1" test
And I see request "Thực hiện phép tính"
And I see question "12 + 34 =???"
And I see a empty box
Scenario: I am true
When I push 46
And I click on "Nộp bài" button
Then I should see a panel include "Điểm" is "1"
Scenario: I am false
When I push 30
And I click on "Nộp bài" button
Then I should see a panel include "Điểm" is "0"
c. Chức năng xem mục "Kỹ năng sống": kynangsong.feature
Feature: Watch life skill items
As a student
I want to read posts or play video about life skill
In order to improve my life skills
Scenario: Read "Hưng Đạo Đại Vương" story in "TRUYỆN NGẮN" column
Given I am on "Kỹ năng sống" page
When I click on "Hưng Đạo Đại Vương" link button in stories list
Then I should see "Hưng Đạo Đại Vương" story to read
Scenario: Watch "Gánh Xôi Của Bà" video in "QUÀ TẶNG CUỘC SỐNG" column
Given I am on "Kỹ năng sống" page
When I click on "Gánh xôi của bà" link button in videos list
Then I should see video "Gánh xôi của bà" to watch