Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
QualiteDev
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
PARVIZ Youssef
QualiteDev
Commits
7c346e93
Commit
7c346e93
authored
1 year ago
by
YParviz
Browse files
Options
Downloads
Patches
Plain Diff
Version final
parent
23f431c3
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
App/Heure.ts
+27
-0
27 additions, 0 deletions
App/Heure.ts
App/Minutes.ts
+31
-0
31 additions, 0 deletions
App/Minutes.ts
App/main.ts
+12
-0
12 additions, 0 deletions
App/main.ts
cypress/e2e/spec.cy.js
+18
-6
18 additions, 6 deletions
cypress/e2e/spec.cy.js
with
88 additions
and
6 deletions
App/Heure.ts
0 → 100644
+
27
−
0
View file @
7c346e93
class
Heure
{
private
static
_instance
:
Heure
;
private
_heure
:
number
=
0
;
private
constructor
(
heure
:
number
)
{
this
.
_heure
=
heure
;
}
public
get
heure
():
number
{
return
this
.
_heure
;
}
public
set
heure
(
value
:
number
)
{
this
.
_heure
=
value
;
}
public
static
getInstance
(
heure
:
number
=
0
):
Heure
{
if
(
!
Heure
.
_instance
)
{
Heure
.
_instance
=
new
Heure
(
heure
);
}
else
{
Heure
.
_instance
.
_heure
=
heure
}
return
Heure
.
_instance
;
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
App/Minutes.ts
0 → 100644
+
31
−
0
View file @
7c346e93
class
Minutes
{
private
_minutes
:
number
=
0
;
private
static
instance
:
Minutes
;
public
get
minutes
():
number
{
return
this
.
_minutes
;
}
public
set
minutes
(
value
:
number
)
{
this
.
_minutes
=
value
;
}
private
constructor
(
minutes
)
{
this
.
minutes
=
minutes
;
}
public
static
getInstance
(
minutes
:
number
=
0
):
Minutes
{
if
(
!
Minutes
.
instance
)
{
Minutes
.
instance
=
new
Minutes
(
minutes
);
}
else
{
Minutes
.
instance
.
_minutes
=
minutes
}
return
Minutes
.
instance
;
}
incrementMinutes
(){
while
(
this
.
minutes
<=
59
){
this
.
_minutes
++
}
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
App/main.ts
0 → 100644
+
12
−
0
View file @
7c346e93
function
main
(){
let
s1
=
Heure
.
getInstance
(
23
);
console
.
log
(
"
Heure
"
+
s1
.
heure
)
while
(
s1
.
heure
<
24
){
let
s2
=
Minutes
.
getInstance
(
25
);
console
.
log
(
"
s1 : Texte :
"
+
Minutes
);
s2
.
incrementMinutes
console
.
log
(
"
s2 : Texte :
"
+
s2
.
minutes
);
}
}
main
()
\ No newline at end of file
This diff is collapsed.
Click to expand it.
cypress/e2e/spec.cy.js
+
18
−
6
View file @
7c346e93
describe
(
'
template spec
'
,
()
=>
{
describe
(
'
template spec
'
,
()
=>
{
beforeEach
(()
=>
{
beforeEach
(()
=>
{
cy
.
visit
(
'
tests_cypress.html
'
)
cy
.
visit
(
'
https://dptinfo.iutmetz.univ-lorraine.fr/applis/stages/login.php
'
)
;
});
});
it
(
'
passes
'
,
()
=>
{
cy
.
visit
(
'
https://example.cypress.io
'
)
})
it
(
'
Test alert connexion
'
,
()
=>
{
cy
.
get
(
'
#login
'
).
type
(
'
wrongUsername
'
);
})
cy
.
get
(
'
#psw
'
).
type
(
'
wrongPassword
'
);
\ No newline at end of file
cy
.
get
(
'
button[type="submit"]
'
).
click
();
cy
.
get
(
'
.alert
'
).
should
(
'
contain.text
'
,
'
Couple Identifiant/mot de passe inconnu
'
);
});
it
(
'
Test connexion reussi
'
,
()
=>
{
cy
.
get
(
'
#login
'
).
type
(
'
Yparviz
'
);
// Je ne me rappelle plus de mon pswd
cy
.
get
(
'
#psw
'
).
type
(
'
32216049
'
);
cy
.
get
(
'
button[type="submit"]
'
).
click
()
cy
.
url
().
should
(
'
include
'
,
'
/portail.php
'
);
});
});
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