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
6cb9af8c
Commit
6cb9af8c
authored
Sep 25, 2019
by
Enrique Alcantara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add setSubnet action
parent
a3286fb8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
2 deletions
+15
-2
app/assets/javascripts/create_cluster/eks_cluster/components/eks_cluster_configuration_form.vue
...eks_cluster/components/eks_cluster_configuration_form.vue
+2
-2
spec/frontend/create_cluster/eks_cluster/components/eks_cluster_configuration_form_spec.js
...cluster/components/eks_cluster_configuration_form_spec.js
+13
-0
No files found.
app/assets/javascripts/create_cluster/eks_cluster/components/eks_cluster_configuration_form.vue
View file @
6cb9af8c
...
@@ -71,7 +71,7 @@ export default {
...
@@ -71,7 +71,7 @@ export default {
this
.
fetchRegions
();
this
.
fetchRegions
();
},
},
methods
:
{
methods
:
{
...
mapActions
([
'
setRegion
'
,
'
setVpc
'
]),
...
mapActions
([
'
setRegion
'
,
'
setVpc
'
,
'
setSubnet
'
]),
...
mapActions
({
...
mapActions
({
fetchRegions
:
'
regions/fetchItems
'
,
fetchRegions
:
'
regions/fetchItems
'
,
fetchVpcs
:
'
vpcs/fetchItems
'
,
fetchVpcs
:
'
vpcs/fetchItems
'
,
...
@@ -148,7 +148,7 @@ export default {
...
@@ -148,7 +148,7 @@ export default {
:empty-text=
"s__('ClusterIntegration|No subnet found')"
:empty-text=
"s__('ClusterIntegration|No subnet found')"
:has-errors=
"loadingSubnetsError"
:has-errors=
"loadingSubnetsError"
:error-message=
"s__('ClusterIntegration|Could not load subnets for the selected VPC')"
:error-message=
"s__('ClusterIntegration|Could not load subnets for the selected VPC')"
@
input=
"set
VpcAndFetchSubnets($event
)"
@
input=
"set
Subnet(
{ subnet: $event }
)"
/>
/>
<p
class=
"form-text text-muted"
v-html=
"subnetDropdownHelpText"
></p>
<p
class=
"form-text text-muted"
v-html=
"subnetDropdownHelpText"
></p>
</div>
</div>
...
...
spec/frontend/create_cluster/eks_cluster/components/eks_cluster_configuration_form_spec.js
View file @
6cb9af8c
...
@@ -27,6 +27,7 @@ describe('EksClusterConfigurationForm', () => {
...
@@ -27,6 +27,7 @@ describe('EksClusterConfigurationForm', () => {
actions
=
{
actions
=
{
setRegion
:
jest
.
fn
(),
setRegion
:
jest
.
fn
(),
setVpc
:
jest
.
fn
(),
setVpc
:
jest
.
fn
(),
setSubnet
:
jest
.
fn
(),
};
};
regionsActions
=
{
regionsActions
=
{
fetchItems
:
jest
.
fn
(),
fetchItems
:
jest
.
fn
(),
...
@@ -193,4 +194,16 @@ describe('EksClusterConfigurationForm', () => {
...
@@ -193,4 +194,16 @@ describe('EksClusterConfigurationForm', () => {
expect
(
subnetsActions
.
fetchItems
).
toHaveBeenCalledWith
(
expect
.
anything
(),
{
vpc
},
undefined
);
expect
(
subnetsActions
.
fetchItems
).
toHaveBeenCalledWith
(
expect
.
anything
(),
{
vpc
},
undefined
);
});
});
});
});
describe
(
'
when a subnet is selected
'
,
()
=>
{
const
subnet
=
{
name
:
'
subnet-1
'
};
beforeEach
(()
=>
{
findSubnetDropdown
().
vm
.
$emit
(
'
input
'
,
subnet
);
});
it
(
'
dispatches setSubnet action
'
,
()
=>
{
expect
(
actions
.
setSubnet
).
toHaveBeenCalledWith
(
expect
.
anything
(),
{
subnet
},
undefined
);
});
});
});
});
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