Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
24552217
Commit
24552217
authored
Mar 27, 2020
by
Vitaly Slobodin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Migrate ee/billings to Jest
Closes
https://gitlab.com/gitlab-org/gitlab/-/issues/194270
parent
bd187a56
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
17 deletions
+8
-17
ee/spec/frontend/billings/components/subscription_table_row_spec.js
...ontend/billings/components/subscription_table_row_spec.js
+1
-1
ee/spec/frontend/billings/helpers.js
ee/spec/frontend/billings/helpers.js
+0
-0
ee/spec/frontend/billings/store/modules/subscription/actions_spec.js
...ntend/billings/store/modules/subscription/actions_spec.js
+7
-13
ee/spec/javascripts/billings/mock_data.js
ee/spec/javascripts/billings/mock_data.js
+0
-3
No files found.
ee/spec/
javascripts
/billings/components/subscription_table_row_spec.js
→
ee/spec/
frontend
/billings/components/subscription_table_row_spec.js
View file @
24552217
import
Vue
from
'
vue
'
;
import
Vue
from
'
vue
'
;
import
component
from
'
ee/billings/components/subscription_table_row.vue
'
;
import
component
from
'
ee/billings/components/subscription_table_row.vue
'
;
import
mountComponent
from
'
spec/
helpers/vue_mount_component_helper
'
;
import
mountComponent
from
'
helpers/vue_mount_component_helper
'
;
import
{
dateInWords
}
from
'
~/lib/utils/datetime_utility
'
;
import
{
dateInWords
}
from
'
~/lib/utils/datetime_utility
'
;
describe
(
'
Subscription Table Row
'
,
()
=>
{
describe
(
'
Subscription Table Row
'
,
()
=>
{
...
...
ee/spec/
javascripts
/billings/helpers.js
→
ee/spec/
frontend
/billings/helpers.js
View file @
24552217
File moved
ee/spec/
javascripts/billings/stores
/modules/subscription/actions_spec.js
→
ee/spec/
frontend/billings/store
/modules/subscription/actions_spec.js
View file @
24552217
import
MockAdapter
from
'
axios-mock-adapter
'
;
import
MockAdapter
from
'
axios-mock-adapter
'
;
import
testAction
from
'
spec/
helpers/vuex_action_helper
'
;
import
testAction
from
'
helpers/vuex_action_helper
'
;
import
state
from
'
ee/billings/stores/modules/subscription/state
'
;
import
state
from
'
ee/billings/stores/modules/subscription/state
'
;
import
*
as
types
from
'
ee/billings/stores/modules/subscription/mutation_types
'
;
import
*
as
types
from
'
ee/billings/stores/modules/subscription/mutation_types
'
;
...
@@ -22,7 +22,7 @@ describe('subscription actions', () => {
...
@@ -22,7 +22,7 @@ describe('subscription actions', () => {
});
});
describe
(
'
setNamespaceId
'
,
()
=>
{
describe
(
'
setNamespaceId
'
,
()
=>
{
it
(
'
should commit the correct mutuation
'
,
done
=>
{
it
(
'
should commit the correct mutuation
'
,
()
=>
{
const
namespaceId
=
1
;
const
namespaceId
=
1
;
testAction
(
testAction
(
...
@@ -36,7 +36,6 @@ describe('subscription actions', () => {
...
@@ -36,7 +36,6 @@ describe('subscription actions', () => {
},
},
],
],
[],
[],
done
,
);
);
});
});
});
});
...
@@ -54,7 +53,7 @@ describe('subscription actions', () => {
...
@@ -54,7 +53,7 @@ describe('subscription actions', () => {
.
replyOnce
(
200
,
mockDataSubscription
.
gold
);
.
replyOnce
(
200
,
mockDataSubscription
.
gold
);
});
});
it
(
'
should dispatch the request and success actions
'
,
done
=>
{
it
(
'
should dispatch the request and success actions
'
,
()
=>
{
testAction
(
testAction
(
actions
.
fetchSubscription
,
actions
.
fetchSubscription
,
{},
{},
...
@@ -67,7 +66,6 @@ describe('subscription actions', () => {
...
@@ -67,7 +66,6 @@ describe('subscription actions', () => {
payload
:
mockDataSubscription
.
gold
,
payload
:
mockDataSubscription
.
gold
,
},
},
],
],
done
,
);
);
});
});
});
});
...
@@ -77,34 +75,32 @@ describe('subscription actions', () => {
...
@@ -77,34 +75,32 @@ describe('subscription actions', () => {
mock
.
onGet
(
/
\/
api
\/
v4
\/
namespaces
\/\d
+
\/
gitlab_subscription
(
.*
)
$/
).
replyOnce
(
404
,
{});
mock
.
onGet
(
/
\/
api
\/
v4
\/
namespaces
\/\d
+
\/
gitlab_subscription
(
.*
)
$/
).
replyOnce
(
404
,
{});
});
});
it
(
'
should dispatch the request and error actions
'
,
done
=>
{
it
(
'
should dispatch the request and error actions
'
,
()
=>
{
testAction
(
testAction
(
actions
.
fetchSubscription
,
actions
.
fetchSubscription
,
{},
{},
mockedState
,
mockedState
,
[],
[],
[{
type
:
'
requestSubscription
'
},
{
type
:
'
receiveSubscriptionError
'
}],
[{
type
:
'
requestSubscription
'
},
{
type
:
'
receiveSubscriptionError
'
}],
done
,
);
);
});
});
});
});
});
});
describe
(
'
requestSubscription
'
,
()
=>
{
describe
(
'
requestSubscription
'
,
()
=>
{
it
(
'
should commit the request mutation
'
,
done
=>
{
it
(
'
should commit the request mutation
'
,
()
=>
{
testAction
(
testAction
(
actions
.
requestSubscription
,
actions
.
requestSubscription
,
{},
{},
state
,
state
,
[{
type
:
types
.
REQUEST_SUBSCRIPTION
}],
[{
type
:
types
.
REQUEST_SUBSCRIPTION
}],
[],
[],
done
,
);
);
});
});
});
});
describe
(
'
receiveSubscriptionSuccess
'
,
()
=>
{
describe
(
'
receiveSubscriptionSuccess
'
,
()
=>
{
it
(
'
should commit the success mutation
'
,
done
=>
{
it
(
'
should commit the success mutation
'
,
()
=>
{
testAction
(
testAction
(
actions
.
receiveSubscriptionSuccess
,
actions
.
receiveSubscriptionSuccess
,
mockDataSubscription
.
gold
,
mockDataSubscription
.
gold
,
...
@@ -116,20 +112,18 @@ describe('subscription actions', () => {
...
@@ -116,20 +112,18 @@ describe('subscription actions', () => {
},
},
],
],
[],
[],
done
,
);
);
});
});
});
});
describe
(
'
receiveSubscriptionError
'
,
()
=>
{
describe
(
'
receiveSubscriptionError
'
,
()
=>
{
it
(
'
should commit the error mutation
'
,
done
=>
{
it
(
'
should commit the error mutation
'
,
()
=>
{
testAction
(
testAction
(
actions
.
receiveSubscriptionError
,
actions
.
receiveSubscriptionError
,
{},
{},
mockedState
,
mockedState
,
[{
type
:
types
.
RECEIVE_SUBSCRIPTION_ERROR
}],
[{
type
:
types
.
RECEIVE_SUBSCRIPTION_ERROR
}],
[],
[],
done
,
);
);
});
});
});
});
...
...
ee/spec/javascripts/billings/mock_data.js
deleted
100644 → 0
View file @
bd187a56
import
mockData
from
'
../../frontend/billings/mock_data
'
;
export
default
mockData
;
Write
Preview
Markdown
is supported
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