Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nghyd
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
A compter du 1er avril, attention à vos pipelines :
Nouvelles limitations de Docker Hub
Show more breadcrumbs
Cassiopée
nghyd
Commits
4ff62d2d
Commit
4ff62d2d
authored
5 years ago
by
mathias.chouet
Browse files
Options
Downloads
Patches
Plain Diff
Fix
#231
- input value update on model change
parent
e5af0e56
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
e2e/lechapt-calmon-material-selector.e2e-spec.ts
+47
-0
47 additions, 0 deletions
e2e/lechapt-calmon-material-selector.e2e-spec.ts
src/app/formulaire/ngparam.ts
+7
-1
7 additions, 1 deletion
src/app/formulaire/ngparam.ts
with
54 additions
and
1 deletion
e2e/lechapt-calmon-material-selector.e2e-spec.ts
0 → 100644
+
47
−
0
View file @
4ff62d2d
import
{
AppPage
}
from
"
./app.po
"
;
import
{
ListPage
}
from
"
./list.po
"
;
import
{
CalculatorPage
}
from
"
./calculator.po
"
;
import
{
Navbar
}
from
"
./navbar.po
"
;
import
{
SideNav
}
from
"
./sidenav.po
"
;
import
{
browser
,
by
}
from
"
protractor
"
;
describe
(
"
Lechapt-Calmon
"
,
()
=>
{
let
listPage
:
ListPage
;
let
calcPage
:
CalculatorPage
;
let
navBar
:
Navbar
;
let
startPage
:
AppPage
;
let
sidenav
:
SideNav
;
beforeEach
(()
=>
{
listPage
=
new
ListPage
();
calcPage
=
new
CalculatorPage
();
navBar
=
new
Navbar
();
startPage
=
new
AppPage
();
sidenav
=
new
SideNav
();
});
it
(
"
− material selector should modify input values
"
,
async
()
=>
{
// create a Lechapt-Calmon
await
startPage
.
navigateTo
();
await
listPage
.
clickMenuEntryForCalcType
(
1
);
const
L
=
calcPage
.
getInputById
(
"
L
"
);
const
M
=
calcPage
.
getInputById
(
"
M
"
);
const
N
=
calcPage
.
getInputById
(
"
N
"
);
// check default values for L, M, N
expect
(
await
L
.
getAttribute
(
"
value
"
)).
toBe
(
"
1.863
"
);
expect
(
await
M
.
getAttribute
(
"
value
"
)).
toBe
(
"
2
"
);
expect
(
await
N
.
getAttribute
(
"
value
"
)).
toBe
(
"
5.33
"
);
// change material
const
selectMaterial
=
calcPage
.
getSelectById
(
"
select_material
"
);
await
calcPage
.
changeSelectValue
(
selectMaterial
,
4
);
// check default values for L, M, N
expect
(
await
L
.
getAttribute
(
"
value
"
)).
toBe
(
"
1.16
"
);
expect
(
await
M
.
getAttribute
(
"
value
"
)).
toBe
(
"
1.93
"
);
expect
(
await
N
.
getAttribute
(
"
value
"
)).
toBe
(
"
5.11
"
);
});
});
This diff is collapsed.
Click to expand it.
src/app/formulaire/ngparam.ts
+
7
−
1
View file @
4ff62d2d
...
...
@@ -308,11 +308,17 @@ export class NgParameter extends InputField implements Observer {
* notification envoyée après la modification de la valeur du paramètre
*/
private
notifyValueModified
(
sender
:
any
)
{
let
val
:
number
;
if
(
this
.
_paramDef
.
valueMode
===
ParamValueMode
.
SINGLE
)
{
val
=
this
.
_paramDef
.
singleValue
;
}
else
{
val
=
this
.
_paramDef
.
v
;
// @WARNING coward retrocompat
}
this
.
notifyObservers
(
{
"
action
"
:
"
ngparamAfterValue
"
,
"
param
"
:
this
,
"
value
"
:
this
.
_paramDef
.
v
"
value
"
:
val
},
sender
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment