Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Calculator_VueJS
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
Container 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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MUNIER Florian
Calculator_VueJS
Commits
8f0fee60
Commit
8f0fee60
authored
2 years ago
by
MUNIER Florian
Browse files
Options
Downloads
Plain Diff
Merge branch 'test_part'
parents
65ef9cfc
66a4f59b
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
cypress/e2e/calculator.cy.ts
+26
-11
26 additions, 11 deletions
cypress/e2e/calculator.cy.ts
with
26 additions
and
11 deletions
cypress/e2e/calculator.cy.ts
+
26
−
11
View file @
8f0fee60
describe
(
"
Calculator
"
,
()
=>
{
it
(
"
Default value on screen
"
,
()
=>
{
cy
.
visit
(
"
http://localhost:4173
/
"
);
cy
.
visit
(
"
/
"
);
cy
.
get
(
"
[data-cy=screen_value]
"
).
contains
(
"
0
"
);
});
it
(
"
add functions
"
,
()
=>
{
cy
.
visit
(
"
http://localhost:4173
/
"
);
cy
.
visit
(
"
/
"
);
cy
.
get
(
"
[data-cy=button]
"
).
contains
(
"
1
"
).
click
();
cy
.
get
(
"
[data-cy=button]
"
).
contains
(
"
+
"
).
click
();
cy
.
get
(
"
[data-cy=button]
"
).
contains
(
"
3
"
).
click
();
...
...
@@ -14,7 +14,7 @@ describe("Calculator", () => {
});
it
(
"
subtraction functions with negative result
"
,
()
=>
{
cy
.
visit
(
"
http://localhost:4173
/
"
);
cy
.
visit
(
"
/
"
);
cy
.
get
(
"
[data-cy=button]
"
).
contains
(
"
1
"
).
click
();
cy
.
get
(
"
[data-cy=button]
"
).
contains
(
"
-
"
).
click
();
cy
.
get
(
"
[data-cy=button]
"
).
contains
(
"
3
"
).
click
();
...
...
@@ -23,7 +23,7 @@ describe("Calculator", () => {
});
it
(
"
subtraction functions with negative values
"
,
()
=>
{
cy
.
visit
(
"
http://localhost:4173
/
"
);
cy
.
visit
(
"
/
"
);
cy
.
get
(
"
[data-cy=button]
"
).
contains
(
"
-
"
).
click
();
cy
.
get
(
"
[data-cy=button]
"
).
contains
(
"
1
"
).
click
();
cy
.
get
(
"
[data-cy=button]
"
).
contains
(
"
-
"
).
click
();
...
...
@@ -33,7 +33,7 @@ describe("Calculator", () => {
});
it
(
"
subtraction functions with positive result
"
,
()
=>
{
cy
.
visit
(
"
http://localhost:4173
/
"
);
cy
.
visit
(
"
/
"
);
cy
.
get
(
"
[data-cy=button]
"
).
contains
(
"
5
"
).
click
();
cy
.
get
(
"
[data-cy=button]
"
).
contains
(
"
-
"
).
click
();
cy
.
get
(
"
[data-cy=button]
"
).
contains
(
"
3
"
).
click
();
...
...
@@ -42,7 +42,7 @@ describe("Calculator", () => {
});
it
(
"
division function with integer result
"
,
()
=>
{
cy
.
visit
(
"
http://localhost:4173
/
"
);
cy
.
visit
(
"
/
"
);
cy
.
get
(
"
[data-cy=button]
"
).
contains
(
"
4
"
).
click
();
cy
.
get
(
"
[data-cy=button]
"
).
contains
(
"
/
"
).
click
();
cy
.
get
(
"
[data-cy=button]
"
).
contains
(
"
2
"
).
click
();
...
...
@@ -51,7 +51,7 @@ describe("Calculator", () => {
});
it
(
"
division function with float result
"
,
()
=>
{
cy
.
visit
(
"
http://localhost:4173
/
"
);
cy
.
visit
(
"
/
"
);
cy
.
get
(
"
[data-cy=button]
"
).
contains
(
"
3
"
).
click
();
cy
.
get
(
"
[data-cy=button]
"
).
contains
(
"
/
"
).
click
();
cy
.
get
(
"
[data-cy=button]
"
).
contains
(
"
4
"
).
click
();
...
...
@@ -60,7 +60,7 @@ describe("Calculator", () => {
});
it
(
"
division function with negative result
"
,
()
=>
{
cy
.
visit
(
"
http://localhost:4173
/
"
);
cy
.
visit
(
"
/
"
);
cy
.
get
(
"
[data-cy=button]
"
).
contains
(
"
8
"
).
click
();
cy
.
get
(
"
[data-cy=button]
"
).
contains
(
"
/
"
).
click
();
cy
.
get
(
"
[data-cy=button]
"
).
contains
(
"
-
"
).
click
();
...
...
@@ -70,7 +70,7 @@ describe("Calculator", () => {
});
it
(
"
multiplication function
"
,
()
=>
{
cy
.
visit
(
"
http://localhost:4173
/
"
);
cy
.
visit
(
"
/
"
);
cy
.
get
(
"
[data-cy=button]
"
).
contains
(
"
3
"
).
click
();
cy
.
get
(
"
[data-cy=button]
"
).
contains
(
"
*
"
).
click
();
cy
.
get
(
"
[data-cy=button]
"
).
contains
(
"
4
"
).
click
();
...
...
@@ -79,7 +79,7 @@ describe("Calculator", () => {
});
it
(
"
multiplication function with negative result
"
,
()
=>
{
cy
.
visit
(
"
http://localhost:4173
/
"
);
cy
.
visit
(
"
/
"
);
cy
.
get
(
"
[data-cy=button]
"
).
contains
(
"
-
"
).
click
();
cy
.
get
(
"
[data-cy=button]
"
).
contains
(
"
3
"
).
click
();
cy
.
get
(
"
[data-cy=button]
"
).
contains
(
"
*
"
).
click
();
...
...
@@ -88,8 +88,23 @@ describe("Calculator", () => {
cy
.
get
(
"
[data-cy=screen_value]
"
).
contains
(
"
-12
"
);
});
it
(
"
multiple operation
"
,
()
=>
{
cy
.
visit
(
"
/
"
);
cy
.
get
(
"
[data-cy=button]
"
).
contains
(
"
4
"
).
click
();
cy
.
get
(
"
[data-cy=button]
"
).
contains
(
"
+
"
).
click
();
cy
.
get
(
"
[data-cy=button]
"
).
contains
(
"
2
"
).
click
();
cy
.
get
(
"
[data-cy=button]
"
).
contains
(
"
*
"
).
click
();
cy
.
get
(
"
[data-cy=button]
"
).
contains
(
"
2
"
).
click
();
cy
.
get
(
"
[data-cy=button]
"
).
contains
(
"
+
"
).
click
();
cy
.
get
(
"
[data-cy=button]
"
).
contains
(
"
3
"
).
click
();
cy
.
get
(
"
[data-cy=button]
"
).
contains
(
"
/
"
).
click
();
cy
.
get
(
"
[data-cy=button]
"
).
contains
(
"
6
"
).
click
();
cy
.
get
(
"
[data-cy=button]
"
).
contains
(
"
=
"
).
click
();
cy
.
get
(
"
[data-cy=screen_value]
"
).
contains
(
"
8.5
"
);
});
it
(
"
reset function
"
,
()
=>
{
cy
.
visit
(
"
http://localhost:4173
/
"
);
cy
.
visit
(
"
/
"
);
cy
.
get
(
"
[data-cy=button]
"
).
contains
(
"
7
"
).
click
();
cy
.
get
(
"
[data-cy=button]
"
).
contains
(
"
C
"
).
click
();
cy
.
get
(
"
[data-cy=screen_value]
"
).
contains
(
"
0
"
);
...
...
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