Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
integration
prechecker
Commits
4f46506f
Commit
4f46506f
authored
Jun 30, 2015
by
Dan Poltawski
Browse files
Merge branch 'wip-mdl-50481-m28' of
https://github.com/rajeshtaneja/moodle
into MOODLE_28_STABLE
parents
2f5e1039
6d55d3b4
Changes
3
Hide whitespace changes
Inline
Side-by-side
grade/tests/behat/behat_grade.php
View file @
4f46506f
...
@@ -107,7 +107,9 @@ class behat_grade extends behat_base {
...
@@ -107,7 +107,9 @@ class behat_grade extends behat_base {
$steps
[]
=
new
Given
(
'I click on "'
.
$this
->
escape
(
$linkxpath
)
.
'" "xpath_element"'
);
$steps
[]
=
new
Given
(
'I click on "'
.
$this
->
escape
(
$linkxpath
)
.
'" "xpath_element"'
);
// After adding id numbers we should wait until the page is reloaded.
// After adding id numbers we should wait until the page is reloaded.
$steps
[]
=
new
Given
(
'I wait until the page is ready'
);
if
(
$this
->
running_javascript
())
{
$steps
[]
=
new
Given
(
'I wait until the page is ready'
);
}
// Mapping names to idnumbers.
// Mapping names to idnumbers.
$datahash
=
$data
->
getRowsHash
();
$datahash
=
$data
->
getRowsHash
();
...
@@ -116,8 +118,8 @@ class behat_grade extends behat_base {
...
@@ -116,8 +118,8 @@ class behat_grade extends behat_base {
// Grrr, we can't equal in categoryitem and courseitem because there is a line jump...
// Grrr, we can't equal in categoryitem and courseitem because there is a line jump...
$inputxpath
=
"//input[@class='idnumber']["
.
$inputxpath
=
"//input[@class='idnumber']["
.
"parent::li[@class='item'][text()='"
.
$gradeitem
.
"']"
.
"parent::li[@class='item'][text()='"
.
$gradeitem
.
"']"
.
"
|
"
.
"
or
"
.
"parent::li[@class='categoryitem'
|
@class='courseitem']/parent::ul/parent::li[starts-with(text(),'"
.
$gradeitem
.
"')]"
.
"parent::li[@class='categoryitem'
or
@class='courseitem']/parent::ul/parent::li[starts-with(text(),'"
.
$gradeitem
.
"')]"
.
"]"
;
"]"
;
$steps
[]
=
new
Given
(
'I set the field with xpath "'
.
$inputxpath
.
'" to "'
.
$idnumber
.
'"'
);
$steps
[]
=
new
Given
(
'I set the field with xpath "'
.
$inputxpath
.
'" to "'
.
$idnumber
.
'"'
);
}
}
...
@@ -125,7 +127,9 @@ class behat_grade extends behat_base {
...
@@ -125,7 +127,9 @@ class behat_grade extends behat_base {
$steps
[]
=
new
Given
(
'I press "'
.
get_string
(
'addidnumbers'
,
'grades'
)
.
'"'
);
$steps
[]
=
new
Given
(
'I press "'
.
get_string
(
'addidnumbers'
,
'grades'
)
.
'"'
);
// After adding id numbers we should wait until the page is reloaded.
// After adding id numbers we should wait until the page is reloaded.
$steps
[]
=
new
Given
(
'I wait until the page is ready'
);
if
(
$this
->
running_javascript
())
{
$steps
[]
=
new
Given
(
'I wait until the page is ready'
);
}
$steps
[]
=
new
Given
(
'I set the field "'
.
get_string
(
'calculation'
,
'grades'
)
.
'" to "'
.
$calculation
.
'"'
);
$steps
[]
=
new
Given
(
'I set the field "'
.
get_string
(
'calculation'
,
'grades'
)
.
'" to "'
.
$calculation
.
'"'
);
$steps
[]
=
new
Given
(
'I press "'
.
$savechanges
.
'"'
);
$steps
[]
=
new
Given
(
'I press "'
.
$savechanges
.
'"'
);
...
...
grade/tests/behat/grade_minmax.feature
View file @
4f46506f
...
@@ -4,7 +4,6 @@ Feature: We can choose what min or max grade to use when aggregating grades.
...
@@ -4,7 +4,6 @@ Feature: We can choose what min or max grade to use when aggregating grades.
As an teacher
As an teacher
I can update modify a course setting
I can update modify a course setting
@javascript
Scenario
:
Changing the min or max grade to use updates the grades accordingly
Scenario
:
Changing the min or max grade to use updates the grades accordingly
Given the following "courses" exist
:
Given the following "courses" exist
:
|
fullname
|
shortname
|
category
|
groupmode
|
|
fullname
|
shortname
|
category
|
groupmode
|
...
...
lib/tests/behat/behat_forms.php
View file @
4f46506f
...
@@ -380,7 +380,12 @@ class behat_forms extends behat_base {
...
@@ -380,7 +380,12 @@ class behat_forms extends behat_base {
);
);
if
(
!
$this
->
running_javascript
())
{
if
(
!
$this
->
running_javascript
())
{
$actions
[]
=
new
Given
(
'I press "'
.
get_string
(
'go'
)
.
'"'
);
// Press button in the specified select container.
$containerxpath
=
"//div[contains(concat(' ', normalize-space(@class), ' '), ' singleselect ') and "
.
".//label[contains(normalize-space(string(.)), '"
.
$singleselect
.
"')]]"
;
$actions
[]
=
new
Given
(
'I click on "'
.
get_string
(
'go'
)
.
'" "button" in the "'
.
$containerxpath
.
'" "xpath_element"'
);
}
}
return
$actions
;
return
$actions
;
...
...
Write
Preview
Supports
Markdown
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