Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
planner-team-one
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
21
Issues
21
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Евгений Положенцев
planner-team-one
Commits
72e3d549
Commit
72e3d549
authored
Dec 07, 2022
by
Ermolaev Timur
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#86
создал шаги теста на создание задачи
parent
744a36a7
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
63 additions
and
22 deletions
+63
-22
AdminMenu.js
planner-front/src/components/Menus/AdminMenu/AdminMenu.js
+1
-0
WorkerMenu.js
planner-front/src/components/Menus/WorkerMenu/WorkerMenu.js
+1
-0
EmptyBox.js
...dar/MonthCalendarBody/CalendarRowDay/EmptyBox/EmptyBox.js
+3
-2
MonthAndYearInfo.js
.../MonthCalendarHeader/MonthAndYearInfo/MonthAndYearInfo.js
+1
-0
MonthCalendarModalContent.js
...ar/MonthCalendarModalContent/MonthCalendarModalContent.js
+1
-1
ModalTask.js
planner-front/src/components/UI/ModalTask/ModalTask.js
+1
-0
codecept.conf.js
planner-tests/codecept.conf.js
+1
-1
create_edit_delete_task.feature
planner-tests/features/create_edit_delete_task.feature
+15
-0
login.feature
planner-tests/features/login.feature
+0
-9
login_test.js
planner-tests/login_test.js
+0
-5
package.json
planner-tests/package.json
+2
-1
create_edit_delete_task_steps.js
...r-tests/step_definitions/create_edit_delete_task_steps.js
+30
-0
steps.js
planner-tests/step_definitions/steps.js
+0
-2
steps_file.js
planner-tests/steps_file.js
+7
-1
No files found.
planner-front/src/components/Menus/AdminMenu/AdminMenu.js
View file @
72e3d549
...
@@ -44,6 +44,7 @@ const AdminMenu = () => {
...
@@ -44,6 +44,7 @@ const AdminMenu = () => {
to
=
"/month"
to
=
"/month"
color
=
"inherit"
color
=
"inherit"
size
=
"large"
size
=
"large"
id
=
'test_month_header'
>
>
Месяц
Месяц
<
/Button
>
<
/Button
>
...
...
planner-front/src/components/Menus/WorkerMenu/WorkerMenu.js
View file @
72e3d549
...
@@ -44,6 +44,7 @@ const WorkerMenu = () => {
...
@@ -44,6 +44,7 @@ const WorkerMenu = () => {
to
=
"/month"
to
=
"/month"
color
=
"inherit"
color
=
"inherit"
size
=
"large"
size
=
"large"
id
=
'test_month_header'
>
>
Месяц
Месяц
<
/Button
>
<
/Button
>
...
...
planner-front/src/components/MonthCalendar/MonthCalendarBody/CalendarRowDay/EmptyBox/EmptyBox.js
View file @
72e3d549
...
@@ -34,14 +34,15 @@ const EmptyBox = ({hourNumber, handleOpen, dayNumber, xs, dragTaskHandler, modal
...
@@ -34,14 +34,15 @@ const EmptyBox = ({hourNumber, handleOpen, dayNumber, xs, dragTaskHandler, modal
onDragOver
=
{(
e
)
=>
{
dragOverHandler
(
e
)}}
onDragOver
=
{(
e
)
=>
{
dragOverHandler
(
e
)}}
onDrop
=
{(
e
)
=>
{
dropHandler
(
e
)}}
onDrop
=
{(
e
)
=>
{
dropHandler
(
e
)}}
onClick
=
{(
e
)
=>
{
onClickHandler
(
e
,
dayNumber
,
hourNumber
)}}
onClick
=
{(
e
)
=>
{
onClickHandler
(
e
,
dayNumber
,
hourNumber
)}}
className
=
'test_empty_box'
item
xs
=
{
xs
}
sx
=
{{
item
xs
=
{
xs
}
sx
=
{{
height
:
'
35
px'
,
height
:
'
40
px'
,
backgroundColor
:
'rgb(0,0,0,0)'
,
backgroundColor
:
'rgb(0,0,0,0)'
,
zIndex
:
'6'
,
zIndex
:
'6'
,
cursor
:
copyTask
?
'pointer'
:
'default'
cursor
:
copyTask
?
'pointer'
:
'default'
}}
>
}}
>
{
isThisCell
?
{
isThisCell
?
<
DefaultTask
/>
:
null
}
<
DefaultTask
/>
:
' '
}
<
/Grid>
)
<
/Grid>
)
};
};
...
...
planner-front/src/components/MonthCalendar/MonthCalendarHeader/MonthAndYearInfo/MonthAndYearInfo.js
View file @
72e3d549
...
@@ -14,6 +14,7 @@ function MonthAndYearInfo({currentMonthString, year, incrementMonth, decrementMo
...
@@ -14,6 +14,7 @@ function MonthAndYearInfo({currentMonthString, year, incrementMonth, decrementMo
alignItems
:
'center'
,
alignItems
:
'center'
,
gap
:
'10px'
gap
:
'10px'
}}
}}
id
=
'test_month_info'
>
>
<
ArrowDecrementButton
<
ArrowDecrementButton
onClick
=
{
decrementMonth
}
onClick
=
{
decrementMonth
}
...
...
planner-front/src/components/MonthCalendar/MonthCalendarModalContent/MonthCalendarModalContent.js
View file @
72e3d549
...
@@ -56,7 +56,7 @@ function MonthCalendarModalContent({title, onChangeCurrentTaskHandler, descripti
...
@@ -56,7 +56,7 @@ function MonthCalendarModalContent({title, onChangeCurrentTaskHandler, descripti
/
>
/
>
<
/div
>
<
/div
>
<
div
style
=
{{
display
:
'flex'
,
gap
:
'20px'
,
margin
:
'10px 0'
}}
>
<
div
style
=
{{
display
:
'flex'
,
gap
:
'20px'
,
margin
:
'10px 0'
}}
>
<
Button
onClick
=
{
sendNewTaskHandler
}
>
Сохранить
<
/Button
>
<
Button
id
=
'test_button_save_task'
onClick
=
{
sendNewTaskHandler
}
>
Сохранить
<
/Button
>
<
Button
onClick
=
{
deleteTaskHandler
}
>
Удалить
<
/Button
>
<
Button
onClick
=
{
deleteTaskHandler
}
>
Удалить
<
/Button
>
<
/div
>
<
/div
>
<
/>
)
;
<
/>
)
;
...
...
planner-front/src/components/UI/ModalTask/ModalTask.js
View file @
72e3d549
...
@@ -56,6 +56,7 @@ export default function ModalTask({modal, handleClose, children}) {
...
@@ -56,6 +56,7 @@ export default function ModalTask({modal, handleClose, children}) {
return
(
return
(
<>
<>
<
Modal
<
Modal
id
=
'test_modal_task'
open
=
{
modal
.
open
}
open
=
{
modal
.
open
}
onClose
=
{
handleClose
}
onClose
=
{
handleClose
}
aria
-
labelledby
=
"modal-modal-title"
aria
-
labelledby
=
"modal-modal-title"
...
...
planner-tests/codecept.conf.js
View file @
72e3d549
...
@@ -17,7 +17,7 @@ exports.config = {
...
@@ -17,7 +17,7 @@ exports.config = {
hooks
:
[],
hooks
:
[],
gherkin
:
{
gherkin
:
{
features
:
'./features/*.feature'
,
features
:
'./features/*.feature'
,
steps
:
[
'./step_definitions/steps.js'
]
steps
:
[
'./step_definitions/steps.js'
,
'./step_definitions/create_edit_delete_task_steps.js'
]
},
},
plugins
:
{
plugins
:
{
screenshotOnFail
:
{
screenshotOnFail
:
{
...
...
planner-tests/features/create_edit_delete_task.feature
0 → 100644
View file @
72e3d549
#language: ru
Функция
:
Создание, редактирование, удаление задачи
Сценарий
:
Успешное создание задачи
Допустим
я нахожусь на странице
"/"
То
я нажимаю на кнопку '#test_month_header'
И
я вижу элемент
"#test_month_info"
Если
я нажимаю на элемент
".test_empty_box"
И
я вижу элемент
"#test_modal_task"
Если
я ввожу в поле
"title"
текст
"test tasklasdlasdl"
И
я нажимаю на кнопку '#test_button_save_task'
Тогда
я вижу элемент с текстом
"Задачаtest tasklasdlasdl"
# И я ввожу в поле "password" текст "123"
# И я нажимаю на кнопку "#test_login"
# То я вижу элемент "#test_greetings"
\ No newline at end of file
planner-tests/features/login.feature
deleted
100644 → 0
View file @
744a36a7
#language: ru
Функция
:
Авторизация пользователя
Сценарий
:
Успешная авторизация
Допустим
я нахожусь на странице
"/sign-in"
Если
я ввожу в поле
"email"
текст
"a@a.a0"
И
я ввожу в поле
"password"
текст
"123"
И
я нажимаю на кнопку
"#test_login"
То
я вижу элемент
"#test_greetings"
\ No newline at end of file
planner-tests/login_test.js
deleted
100644 → 0
View file @
744a36a7
Цель
(
'login'
);
Сценарий
(
'test something'
,
({
Я
})
=>
{
});
planner-tests/package.json
View file @
72e3d549
...
@@ -4,7 +4,8 @@
...
@@ -4,7 +4,8 @@
"description"
:
""
,
"description"
:
""
,
"main"
:
"index.js"
,
"main"
:
"index.js"
,
"scripts"
:
{
"scripts"
:
{
"test"
:
"echo
\"
Error: no test specified
\"
&& exit 1"
"test"
:
"echo
\"
Error: no test specified
\"
&& exit 1"
,
"start"
:
"npx codeceptjs run --steps"
},
},
"author"
:
""
,
"author"
:
""
,
"license"
:
"ISC"
,
"license"
:
"ISC"
,
...
...
planner-tests/step_definitions/
login
_steps.js
→
planner-tests/step_definitions/
create_edit_delete_task
_steps.js
View file @
72e3d549
const
{
I
}
=
inject
();
const
{
I
}
=
inject
();
Given
(
'я нахожусь на странице {string}'
,
(
page
)
=>
{
Given
(
"я нахожусь на странице {string}"
,
(
page
)
=>
{
I
.
login
(
'a@a.a0'
,
'123'
)
I
.
amOnPage
(
page
)
I
.
amOnPage
(
page
)
});
});
When
(
'я ввожу в поле {string} текст {string}'
,
(
fieldName
,
value
)
=>
{
Then
(
'я нажимаю на кнопку {string}'
,
(
buttonId
)
=>
{
I
.
fillField
(
fieldName
,
value
)
I
.
click
(
buttonId
)
});
When
(
'я вижу элемент {string}'
,
(
infoString
)
=>
{
I
.
waitForElement
(
infoString
,
5
)
});
When
(
'я нажимаю на элемент {string}'
,
(
className
)
=>
{
I
.
click
(
className
)
});
When
(
'я ввожу в поле {string} текст {string}'
,
(
field
,
title
)
=>
{
I
.
fillField
(
field
,
title
)
});
});
When
(
'я нажимаю на кнопку {string}'
,
(
buttonId
)
=>
{
When
(
'я нажимаю на кнопку {string}'
,
(
buttonId
)
=>
{
I
.
click
(
buttonId
)
I
.
click
(
buttonId
)
});
});
Then
(
'я вижу элемент {string}'
,
(
text
)
=>
{
Then
(
'я вижу элемент
с текстом
{string}'
,
(
text
)
=>
{
I
.
waitForElement
(
text
,
5
)
I
.
see
(
text
)
});
});
\ No newline at end of file
planner-tests/step_definitions/steps.js
View file @
72e3d549
const
{
I
}
=
inject
();
// Add in your custom step files
planner-tests/steps_file.js
View file @
72e3d549
...
@@ -2,7 +2,13 @@
...
@@ -2,7 +2,13 @@
module
.
exports
=
function
()
{
module
.
exports
=
function
()
{
return
actor
({
return
actor
({
login
:
function
(
email
,
password
)
{
this
.
amOnPage
(
'/sign-in'
)
this
.
fillField
(
'email'
,
email
)
this
.
fillField
(
'password'
,
password
)
this
.
click
(
'#test_login'
)
this
.
waitForElement
(
'#test_greetings'
,
5
)
}
// Define custom steps here, use 'this' to access default methods of I.
// Define custom steps here, use 'this' to access default methods of I.
// It is recommended to place a general 'login' function here.
// It is recommended to place a general 'login' function here.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment