Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
UI
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
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
Show more breadcrumbs
Coscine
frontend
apps
UI
Commits
189231e8
Commit
189231e8
authored
1 year ago
by
Petar Hristov
Browse files
Options
Downloads
Patches
Plain Diff
Linter
parent
95cd33e6
Branches
Issue/2882-quota
No related tags found
1 merge request
!356
Fix: Resource mapping with missing type options
Pipeline
#1317716
passed
1 year ago
Stage: build
Stage: test
Stage: code-analysis
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/modules/project/pages/Quota.spec.ts
+9
-14
9 additions, 14 deletions
src/modules/project/pages/Quota.spec.ts
with
9 additions
and
14 deletions
src/modules/project/pages/Quota.spec.ts
+
9
−
14
View file @
189231e8
...
...
@@ -21,22 +21,17 @@ import { routes } from "@/router";
import
Vue
from
"
vue
"
;
import
{
getTestShibbolethUserState
}
from
"
@/data/mockup/testUser
"
;
import
{
getTestResourceState
,
testResourceType
,
}
from
"
@/data/mockup/testResource
"
;
import
{
getTestResourceState
}
from
"
@/data/mockup/testResource
"
;
import
{
testProjectState
}
from
"
@/data/mockup/testProject
"
;
import
{
useProjectStore
}
from
"
../store
"
;
import
useResourceStore
from
"
@/modules/resource/store
"
;
import
{
ProjectQuotaDto
,
ResourceQuotaDto
,
}
from
"
@coscine/api-client/dist/types/Coscine.Api
"
;
import
{
ExtendedResourceTypeInformationDto
,
QuotaUnit
}
from
"
@/modules/resource/types
"
;
function
sleep
(
ms
:
number
)
{
return
new
Promise
((
resolve
)
=>
setTimeout
(
resolve
,
ms
));
}
import
{
ExtendedResourceTypeInformationDto
,
QuotaUnit
,
}
from
"
@/modules/resource/types
"
;
// Define the Vue instance type (computed properties)
interface
QuotaPageComponent
extends
Vue
{
...
...
@@ -97,9 +92,9 @@ describe("Quota.vue", async () => {
isQuotaAdjustable
:
true
,
isQuotaAvailable
:
true
,
isEnabled
:
true
,
}
]
as
ExtendedResourceTypeInformationDto
[]
|
null
}
}
,
]
as
ExtendedResourceTypeInformationDto
[]
|
null
;
}
,
},
})
as
Wrapper
<
QuotaPageComponent
>
;
});
...
...
@@ -113,7 +108,7 @@ describe("Quota.vue", async () => {
expect
(
options
.
length
).
toBeGreaterThan
(
1
);
expect
(
options
.
at
(
1
).
text
()).
toContain
(
"
Resource Type 1
"
);
expect
(
options
.
at
(
2
).
text
()).
toContain
(
"
Resource Type 2
"
);
})
})
;
test
(
"
Should adjust the project resource type quota
"
,
async
()
=>
{
await
wrapper
.
setData
({
...
...
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