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
8ee3f516
Commit
8ee3f516
authored
Aug 30, 2021
by
Diana Zubova
Committed by
Andrew Fontaine
Aug 30, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fetch storage plans for purchase flow
parent
94468c74
Changes
26
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
105 additions
and
40 deletions
+105
-40
ee/app/assets/javascripts/subscriptions/buy_addons_shared/components/checkout.vue
...s/subscriptions/buy_addons_shared/components/checkout.vue
+3
-3
ee/app/assets/javascripts/subscriptions/buy_addons_shared/components/checkout/addon_purchase_details.vue
...ons_shared/components/checkout/addon_purchase_details.vue
+1
-1
ee/app/assets/javascripts/subscriptions/buy_addons_shared/components/order_summary.vue
...scriptions/buy_addons_shared/components/order_summary.vue
+0
-0
ee/app/assets/javascripts/subscriptions/buy_addons_shared/components/order_summary/summary_details.vue
...ddons_shared/components/order_summary/summary_details.vue
+0
-0
ee/app/assets/javascripts/subscriptions/buy_addons_shared/constants.js
.../javascripts/subscriptions/buy_addons_shared/constants.js
+1
-0
ee/app/assets/javascripts/subscriptions/buy_addons_shared/graphql.js
...ts/javascripts/subscriptions/buy_addons_shared/graphql.js
+0
-0
ee/app/assets/javascripts/subscriptions/buy_addons_shared/graphql/resolvers.js
...ipts/subscriptions/buy_addons_shared/graphql/resolvers.js
+0
-0
ee/app/assets/javascripts/subscriptions/buy_addons_shared/utils.js
...sets/javascripts/subscriptions/buy_addons_shared/utils.js
+0
-0
ee/app/assets/javascripts/subscriptions/buy_minutes/components/app.vue
.../javascripts/subscriptions/buy_minutes/components/app.vue
+3
-3
ee/app/assets/javascripts/subscriptions/buy_minutes/index.js
ee/app/assets/javascripts/subscriptions/buy_minutes/index.js
+2
-2
ee/app/assets/javascripts/subscriptions/buy_storage/components/app.vue
.../javascripts/subscriptions/buy_storage/components/app.vue
+56
-3
ee/app/assets/javascripts/subscriptions/buy_storage/index.js
ee/app/assets/javascripts/subscriptions/buy_storage/index.js
+15
-4
ee/app/assets/javascripts/vue_shared/purchase_flow/components/checkout/billing_address.vue
...red/purchase_flow/components/checkout/billing_address.vue
+0
-0
ee/app/assets/javascripts/vue_shared/purchase_flow/components/checkout/confirm_order.vue
...hared/purchase_flow/components/checkout/confirm_order.vue
+0
-0
ee/app/assets/javascripts/vue_shared/purchase_flow/components/checkout/payment_method.vue
...ared/purchase_flow/components/checkout/payment_method.vue
+0
-0
ee/app/assets/javascripts/vue_shared/purchase_flow/components/checkout/zuora.vue
...ts/vue_shared/purchase_flow/components/checkout/zuora.vue
+0
-0
ee/spec/frontend/subscriptions/buy_minutes/components/app_spec.js
...frontend/subscriptions/buy_minutes/components/app_spec.js
+8
-8
ee/spec/frontend/subscriptions/buy_minutes/components/checkout/addon_purchase_details_spec.js
...inutes/components/checkout/addon_purchase_details_spec.js
+2
-2
ee/spec/frontend/subscriptions/buy_minutes/components/checkout/billing_address_spec.js
...s/buy_minutes/components/checkout/billing_address_spec.js
+2
-2
ee/spec/frontend/subscriptions/buy_minutes/components/checkout/confirm_order_spec.js
...ons/buy_minutes/components/checkout/confirm_order_spec.js
+1
-1
ee/spec/frontend/subscriptions/buy_minutes/components/checkout/payment_method_spec.js
...ns/buy_minutes/components/checkout/payment_method_spec.js
+2
-2
ee/spec/frontend/subscriptions/buy_minutes/components/checkout/zuora_spec.js
...bscriptions/buy_minutes/components/checkout/zuora_spec.js
+2
-2
ee/spec/frontend/subscriptions/buy_minutes/components/order_summary/summary_details_spec.js
..._minutes/components/order_summary/summary_details_spec.js
+1
-1
ee/spec/frontend/subscriptions/buy_minutes/components/order_summary_spec.js
...ubscriptions/buy_minutes/components/order_summary_spec.js
+2
-2
ee/spec/frontend/subscriptions/buy_minutes/graphql/resolvers_spec.js
...ntend/subscriptions/buy_minutes/graphql/resolvers_spec.js
+2
-2
ee/spec/frontend/subscriptions/buy_minutes/utils_spec.js
ee/spec/frontend/subscriptions/buy_minutes/utils_spec.js
+2
-2
No files found.
ee/app/assets/javascripts/subscriptions/buy_
minutes
/components/checkout.vue
→
ee/app/assets/javascripts/subscriptions/buy_
addons_shared
/components/checkout.vue
View file @
8ee3f516
<
script
>
<
script
>
import
updateState
from
'
ee/subscriptions/graphql/mutations/update_state.mutation.graphql
'
;
import
updateState
from
'
ee/subscriptions/graphql/mutations/update_state.mutation.graphql
'
;
import
BillingAddress
from
'
ee/vue_shared/purchase_flow/components/checkout/billing_address.vue
'
;
import
ConfirmOrder
from
'
ee/vue_shared/purchase_flow/components/checkout/confirm_order.vue
'
;
import
PaymentMethod
from
'
ee/vue_shared/purchase_flow/components/checkout/payment_method.vue
'
;
import
{
GENERAL_ERROR_MESSAGE
}
from
'
ee/vue_shared/purchase_flow/constants
'
;
import
{
GENERAL_ERROR_MESSAGE
}
from
'
ee/vue_shared/purchase_flow/constants
'
;
import
createFlash
from
'
~/flash
'
;
import
createFlash
from
'
~/flash
'
;
import
{
s__
}
from
'
~/locale
'
;
import
{
s__
}
from
'
~/locale
'
;
import
AddonPurchaseDetails
from
'
./checkout/addon_purchase_details.vue
'
;
import
AddonPurchaseDetails
from
'
./checkout/addon_purchase_details.vue
'
;
import
BillingAddress
from
'
./checkout/billing_address.vue
'
;
import
ConfirmOrder
from
'
./checkout/confirm_order.vue
'
;
import
PaymentMethod
from
'
./checkout/payment_method.vue
'
;
export
default
{
export
default
{
components
:
{
AddonPurchaseDetails
,
BillingAddress
,
PaymentMethod
,
ConfirmOrder
},
components
:
{
AddonPurchaseDetails
,
BillingAddress
,
PaymentMethod
,
ConfirmOrder
},
...
...
ee/app/assets/javascripts/subscriptions/buy_
minutes
/components/checkout/addon_purchase_details.vue
→
ee/app/assets/javascripts/subscriptions/buy_
addons_shared
/components/checkout/addon_purchase_details.vue
View file @
8ee3f516
<
script
>
<
script
>
import
{
GlAlert
,
GlFormInput
,
GlSprintf
}
from
'
@gitlab/ui
'
;
import
{
GlAlert
,
GlFormInput
,
GlSprintf
}
from
'
@gitlab/ui
'
;
import
{
CI_MINUTES_PER_PACK
}
from
'
ee/subscriptions/buy_
minutes
/constants
'
;
import
{
CI_MINUTES_PER_PACK
}
from
'
ee/subscriptions/buy_
addons_shared
/constants
'
;
import
{
STEPS
}
from
'
ee/subscriptions/constants
'
;
import
{
STEPS
}
from
'
ee/subscriptions/constants
'
;
import
updateState
from
'
ee/subscriptions/graphql/mutations/update_state.mutation.graphql
'
;
import
updateState
from
'
ee/subscriptions/graphql/mutations/update_state.mutation.graphql
'
;
import
stateQuery
from
'
ee/subscriptions/graphql/queries/state.query.graphql
'
;
import
stateQuery
from
'
ee/subscriptions/graphql/queries/state.query.graphql
'
;
...
...
ee/app/assets/javascripts/subscriptions/buy_
minutes
/components/order_summary.vue
→
ee/app/assets/javascripts/subscriptions/buy_
addons_shared
/components/order_summary.vue
View file @
8ee3f516
File moved
ee/app/assets/javascripts/subscriptions/buy_
minutes
/components/order_summary/summary_details.vue
→
ee/app/assets/javascripts/subscriptions/buy_
addons_shared
/components/order_summary/summary_details.vue
View file @
8ee3f516
File moved
ee/app/assets/javascripts/subscriptions/buy_
minutes
/constants.js
→
ee/app/assets/javascripts/subscriptions/buy_
addons_shared
/constants.js
View file @
8ee3f516
/* eslint-disable @gitlab/require-i18n-strings */
/* eslint-disable @gitlab/require-i18n-strings */
export
const
planTags
=
{
export
const
planTags
=
{
CI_1000_MINUTES_PLAN
:
'
CI_1000_MINUTES_PLAN
'
,
CI_1000_MINUTES_PLAN
:
'
CI_1000_MINUTES_PLAN
'
,
STORAGE_PLAN
:
'
STORAGE_PLAN
'
,
};
};
/* eslint-enable @gitlab/require-i18n-strings */
/* eslint-enable @gitlab/require-i18n-strings */
export
const
CUSTOMER_CLIENT
=
'
customerClient
'
;
export
const
CUSTOMER_CLIENT
=
'
customerClient
'
;
...
...
ee/app/assets/javascripts/subscriptions/buy_
minutes
/graphql.js
→
ee/app/assets/javascripts/subscriptions/buy_
addons_shared
/graphql.js
View file @
8ee3f516
File moved
ee/app/assets/javascripts/subscriptions/buy_
minutes
/graphql/resolvers.js
→
ee/app/assets/javascripts/subscriptions/buy_
addons_shared
/graphql/resolvers.js
View file @
8ee3f516
File moved
ee/app/assets/javascripts/subscriptions/buy_
minutes
/utils.js
→
ee/app/assets/javascripts/subscriptions/buy_
addons_shared
/utils.js
View file @
8ee3f516
File moved
ee/app/assets/javascripts/subscriptions/buy_minutes/components/app.vue
View file @
8ee3f516
...
@@ -4,10 +4,10 @@ import { GlEmptyState } from '@gitlab/ui';
...
@@ -4,10 +4,10 @@ import { GlEmptyState } from '@gitlab/ui';
import
*
as
Sentry
from
'
@sentry/browser
'
;
import
*
as
Sentry
from
'
@sentry/browser
'
;
import
StepOrderApp
from
'
ee/vue_shared/purchase_flow/components/step_order_app.vue
'
;
import
StepOrderApp
from
'
ee/vue_shared/purchase_flow/components/step_order_app.vue
'
;
import
{
ERROR_FETCHING_DATA_HEADER
,
ERROR_FETCHING_DATA_DESCRIPTION
}
from
'
~/ensure_data
'
;
import
{
ERROR_FETCHING_DATA_HEADER
,
ERROR_FETCHING_DATA_DESCRIPTION
}
from
'
~/ensure_data
'
;
import
Checkout
from
'
../../buy_addons_shared/components/checkout.vue
'
;
import
OrderSummary
from
'
../../buy_addons_shared/components/order_summary.vue
'
;
import
{
planTags
,
CUSTOMER_CLIENT
}
from
'
../../buy_addons_shared/constants
'
;
import
plansQuery
from
'
../../graphql/queries/plans.customer.query.graphql
'
;
import
plansQuery
from
'
../../graphql/queries/plans.customer.query.graphql
'
;
import
{
planTags
,
CUSTOMER_CLIENT
}
from
'
../constants
'
;
import
Checkout
from
'
./checkout.vue
'
;
import
OrderSummary
from
'
./order_summary.vue
'
;
export
default
{
export
default
{
name
:
'
BuyCIMinutesApp
'
,
name
:
'
BuyCIMinutesApp
'
,
...
...
ee/app/assets/javascripts/subscriptions/buy_minutes/index.js
View file @
8ee3f516
import
Vue
from
'
vue
'
;
import
Vue
from
'
vue
'
;
import
ensureData
from
'
~/ensure_data
'
;
import
ensureData
from
'
~/ensure_data
'
;
import
apolloProvider
from
'
../buy_addons_shared/graphql
'
;
import
{
writeInitialDataToApolloCache
}
from
'
../buy_addons_shared/utils
'
;
import
App
from
'
./components/app.vue
'
;
import
App
from
'
./components/app.vue
'
;
import
apolloProvider
from
'
./graphql
'
;
import
{
writeInitialDataToApolloCache
}
from
'
./utils
'
;
export
default
(
el
)
=>
{
export
default
(
el
)
=>
{
if
(
!
el
)
{
if
(
!
el
)
{
...
...
ee/app/assets/javascripts/subscriptions/buy_storage/components/app.vue
View file @
8ee3f516
<
script
>
<
script
>
import
emptySvg
from
'
@gitlab/svgs/dist/illustrations/security-dashboard-empty-state.svg
'
;
import
{
GlEmptyState
}
from
'
@gitlab/ui
'
;
import
*
as
Sentry
from
'
@sentry/browser
'
;
import
StepOrderApp
from
'
ee/vue_shared/purchase_flow/components/step_order_app.vue
'
;
import
StepOrderApp
from
'
ee/vue_shared/purchase_flow/components/step_order_app.vue
'
;
import
{
ERROR_FETCHING_DATA_HEADER
,
ERROR_FETCHING_DATA_DESCRIPTION
}
from
'
~/ensure_data
'
;
import
Checkout
from
'
../../buy_addons_shared/components/checkout.vue
'
;
import
OrderSummary
from
'
../../buy_addons_shared/components/order_summary.vue
'
;
import
{
planTags
,
CUSTOMER_CLIENT
}
from
'
../../buy_addons_shared/constants
'
;
import
plansQuery
from
'
../../graphql/queries/plans.customer.query.graphql
'
;
export
default
{
export
default
{
name
:
'
BuyStorageApp
'
,
components
:
{
components
:
{
Checkout
,
GlEmptyState
,
OrderSummary
,
StepOrderApp
,
StepOrderApp
,
},
},
i18n
:
{
ERROR_FETCHING_DATA_HEADER
,
ERROR_FETCHING_DATA_DESCRIPTION
,
},
emptySvg
,
data
()
{
return
{
hasError
:
false
,
};
},
apollo
:
{
plans
:
{
client
:
CUSTOMER_CLIENT
,
query
:
plansQuery
,
variables
:
{
tags
:
[
planTags
.
STORAGE_PLAN
],
},
update
(
data
)
{
if
(
!
data
?.
plans
?.
length
)
{
this
.
hasError
=
true
;
return
null
;
}
return
data
.
plans
;
},
error
(
error
)
{
this
.
hasError
=
true
;
Sentry
.
captureException
(
error
);
},
},
},
};
};
</
script
>
</
script
>
<
template
>
<
template
>
<step-order-app>
<gl-empty-state
<template
#checkout
></
template
>
v-if=
"hasError"
<
template
#order-summary
></
template
>
:title=
"$options.i18n.ERROR_FETCHING_DATA_HEADER"
:description=
"$options.i18n.ERROR_FETCHING_DATA_DESCRIPTION"
:svg-path=
"`data:image/svg+xml;utf8,$
{encodeURIComponent($options.emptySvg)}`"
/>
<step-order-app
v-else-if=
"!$apollo.loading"
>
<template
#checkout
>
<checkout
:plan=
"plans[0]"
/>
</
template
>
<
template
#order-summary
>
<order-summary
:plan=
"plans[0]"
/>
</
template
>
</step-order-app>
</step-order-app>
</template>
</template>
ee/app/assets/javascripts/subscriptions/buy_storage/index.js
View file @
8ee3f516
import
Vue
from
'
vue
'
;
import
Vue
from
'
vue
'
;
import
ensureData
from
'
~/ensure_data
'
;
import
apolloProvider
from
'
../buy_addons_shared/graphql
'
;
import
{
writeInitialDataToApolloCache
}
from
'
../buy_addons_shared/utils
'
;
import
App
from
'
./components/app.vue
'
;
import
App
from
'
./components/app.vue
'
;
export
default
(
el
)
=>
{
export
default
(
el
)
=>
{
if
(
!
el
)
{
return
null
;
}
const
extendedApp
=
ensureData
(
App
,
{
parseData
:
writeInitialDataToApolloCache
.
bind
(
null
,
apolloProvider
),
data
:
el
.
dataset
,
shouldLog
:
true
,
});
return
new
Vue
({
return
new
Vue
({
el
,
el
,
components
:
{
apolloProvider
,
App
,
},
render
(
createElement
)
{
render
(
createElement
)
{
return
createElement
(
App
);
return
createElement
(
extended
App
);
},
},
});
});
};
};
ee/app/assets/javascripts/
subscriptions/buy_minutes
/components/checkout/billing_address.vue
→
ee/app/assets/javascripts/
vue_shared/purchase_flow
/components/checkout/billing_address.vue
View file @
8ee3f516
File moved
ee/app/assets/javascripts/
subscriptions/buy_minutes
/components/checkout/confirm_order.vue
→
ee/app/assets/javascripts/
vue_shared/purchase_flow
/components/checkout/confirm_order.vue
View file @
8ee3f516
File moved
ee/app/assets/javascripts/
subscriptions/buy_minutes
/components/checkout/payment_method.vue
→
ee/app/assets/javascripts/
vue_shared/purchase_flow
/components/checkout/payment_method.vue
View file @
8ee3f516
File moved
ee/app/assets/javascripts/
subscriptions/buy_minutes
/components/checkout/zuora.vue
→
ee/app/assets/javascripts/
vue_shared/purchase_flow
/components/checkout/zuora.vue
View file @
8ee3f516
File moved
ee/spec/frontend/subscriptions/buy_minutes/components/app_spec.js
View file @
8ee3f516
...
@@ -4,6 +4,7 @@ import VueApollo from 'vue-apollo';
...
@@ -4,6 +4,7 @@ import VueApollo from 'vue-apollo';
import
App
from
'
ee/subscriptions/buy_minutes/components/app.vue
'
;
import
App
from
'
ee/subscriptions/buy_minutes/components/app.vue
'
;
import
StepOrderApp
from
'
ee/vue_shared/purchase_flow/components/step_order_app.vue
'
;
import
StepOrderApp
from
'
ee/vue_shared/purchase_flow/components/step_order_app.vue
'
;
import
waitForPromises
from
'
helpers/wait_for_promises
'
;
import
waitForPromises
from
'
helpers/wait_for_promises
'
;
import
{
planTags
}
from
'
../../../../../app/assets/javascripts/subscriptions/buy_addons_shared/constants
'
;
import
{
createMockApolloProvider
}
from
'
../spec_helper
'
;
import
{
createMockApolloProvider
}
from
'
../spec_helper
'
;
const
localVue
=
createLocalVue
();
const
localVue
=
createLocalVue
();
...
@@ -12,11 +13,10 @@ localVue.use(VueApollo);
...
@@ -12,11 +13,10 @@ localVue.use(VueApollo);
describe
(
'
App
'
,
()
=>
{
describe
(
'
App
'
,
()
=>
{
let
wrapper
;
let
wrapper
;
function
createComponent
(
options
=
{})
{
function
createComponent
(
apolloProvider
)
{
const
{
apolloProvider
,
propsData
}
=
options
;
return
shallowMount
(
App
,
{
return
shallowMount
(
App
,
{
localVue
,
localVue
,
propsData
,
propsData
:
{
plan
:
planTags
.
CI_1000_MINUTES_PLAN
}
,
apolloProvider
,
apolloProvider
,
});
});
}
}
...
@@ -28,7 +28,7 @@ describe('App', () => {
...
@@ -28,7 +28,7 @@ describe('App', () => {
describe
(
'
when data is received
'
,
()
=>
{
describe
(
'
when data is received
'
,
()
=>
{
it
(
'
should display the StepOrderApp
'
,
async
()
=>
{
it
(
'
should display the StepOrderApp
'
,
async
()
=>
{
const
mockApollo
=
createMockApolloProvider
();
const
mockApollo
=
createMockApolloProvider
();
wrapper
=
createComponent
(
{
apolloProvider
:
mockApollo
}
);
wrapper
=
createComponent
(
mockApollo
);
await
waitForPromises
();
await
waitForPromises
();
expect
(
wrapper
.
findComponent
(
StepOrderApp
).
exists
()).
toBe
(
true
);
expect
(
wrapper
.
findComponent
(
StepOrderApp
).
exists
()).
toBe
(
true
);
...
@@ -41,7 +41,7 @@ describe('App', () => {
...
@@ -41,7 +41,7 @@ describe('App', () => {
const
mockApollo
=
createMockApolloProvider
({
const
mockApollo
=
createMockApolloProvider
({
plansQueryMock
:
jest
.
fn
().
mockResolvedValue
({
data
:
null
}),
plansQueryMock
:
jest
.
fn
().
mockResolvedValue
({
data
:
null
}),
});
});
wrapper
=
createComponent
(
{
apolloProvider
:
mockApollo
}
);
wrapper
=
createComponent
(
mockApollo
);
await
waitForPromises
();
await
waitForPromises
();
expect
(
wrapper
.
findComponent
(
StepOrderApp
).
exists
()).
toBe
(
false
);
expect
(
wrapper
.
findComponent
(
StepOrderApp
).
exists
()).
toBe
(
false
);
...
@@ -52,7 +52,7 @@ describe('App', () => {
...
@@ -52,7 +52,7 @@ describe('App', () => {
const
mockApollo
=
createMockApolloProvider
({
const
mockApollo
=
createMockApolloProvider
({
plansQueryMock
:
jest
.
fn
().
mockResolvedValue
({
data
:
{
plans
:
null
}
}),
plansQueryMock
:
jest
.
fn
().
mockResolvedValue
({
data
:
{
plans
:
null
}
}),
});
});
wrapper
=
createComponent
(
{
apolloProvider
:
mockApollo
}
);
wrapper
=
createComponent
(
mockApollo
);
await
waitForPromises
();
await
waitForPromises
();
expect
(
wrapper
.
findComponent
(
StepOrderApp
).
exists
()).
toBe
(
false
);
expect
(
wrapper
.
findComponent
(
StepOrderApp
).
exists
()).
toBe
(
false
);
...
@@ -63,7 +63,7 @@ describe('App', () => {
...
@@ -63,7 +63,7 @@ describe('App', () => {
const
mockApollo
=
createMockApolloProvider
({
const
mockApollo
=
createMockApolloProvider
({
plansQueryMock
:
jest
.
fn
().
mockResolvedValue
({
data
:
{
plans
:
{}
}
}),
plansQueryMock
:
jest
.
fn
().
mockResolvedValue
({
data
:
{
plans
:
{}
}
}),
});
});
wrapper
=
createComponent
(
{
apolloProvider
:
mockApollo
}
);
wrapper
=
createComponent
(
mockApollo
);
await
waitForPromises
();
await
waitForPromises
();
expect
(
wrapper
.
findComponent
(
StepOrderApp
).
exists
()).
toBe
(
false
);
expect
(
wrapper
.
findComponent
(
StepOrderApp
).
exists
()).
toBe
(
false
);
...
@@ -76,7 +76,7 @@ describe('App', () => {
...
@@ -76,7 +76,7 @@ describe('App', () => {
const
mockApollo
=
createMockApolloProvider
({
const
mockApollo
=
createMockApolloProvider
({
plansQueryMock
:
jest
.
fn
().
mockRejectedValue
(
new
Error
(
'
An error happened!
'
)),
plansQueryMock
:
jest
.
fn
().
mockRejectedValue
(
new
Error
(
'
An error happened!
'
)),
});
});
wrapper
=
createComponent
(
{
apolloProvider
:
mockApollo
}
);
wrapper
=
createComponent
(
mockApollo
);
await
waitForPromises
();
await
waitForPromises
();
expect
(
wrapper
.
findComponent
(
StepOrderApp
).
exists
()).
toBe
(
false
);
expect
(
wrapper
.
findComponent
(
StepOrderApp
).
exists
()).
toBe
(
false
);
...
...
ee/spec/frontend/subscriptions/buy_minutes/components/checkout/addon_purchase_details_spec.js
View file @
8ee3f516
...
@@ -2,8 +2,8 @@ import { GlAlert } from '@gitlab/ui';
...
@@ -2,8 +2,8 @@ import { GlAlert } from '@gitlab/ui';
import
{
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
merge
}
from
'
lodash
'
;
import
{
merge
}
from
'
lodash
'
;
import
VueApollo
from
'
vue-apollo
'
;
import
VueApollo
from
'
vue-apollo
'
;
import
AddonPurchaseDetails
from
'
ee/subscriptions/buy_
minutes
/components/checkout/addon_purchase_details.vue
'
;
import
AddonPurchaseDetails
from
'
ee/subscriptions/buy_
addons_shared
/components/checkout/addon_purchase_details.vue
'
;
import
subscriptionsResolvers
from
'
ee/subscriptions/buy_
minutes
/graphql/resolvers
'
;
import
subscriptionsResolvers
from
'
ee/subscriptions/buy_
addons_shared
/graphql/resolvers
'
;
import
{
STEPS
}
from
'
ee/subscriptions/constants
'
;
import
{
STEPS
}
from
'
ee/subscriptions/constants
'
;
import
stateQuery
from
'
ee/subscriptions/graphql/queries/state.query.graphql
'
;
import
stateQuery
from
'
ee/subscriptions/graphql/queries/state.query.graphql
'
;
import
Step
from
'
ee/vue_shared/purchase_flow/components/step.vue
'
;
import
Step
from
'
ee/vue_shared/purchase_flow/components/step.vue
'
;
...
...
ee/spec/frontend/subscriptions/buy_minutes/components/checkout/billing_address_spec.js
View file @
8ee3f516
import
{
mount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
mount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
merge
}
from
'
lodash
'
;
import
{
merge
}
from
'
lodash
'
;
import
VueApollo
from
'
vue-apollo
'
;
import
VueApollo
from
'
vue-apollo
'
;
import
BillingAddress
from
'
ee/subscriptions/buy_minutes/components/checkout/billing_address.vue
'
;
import
{
resolvers
}
from
'
ee/subscriptions/buy_addons_shared/graphql/resolvers
'
;
import
{
resolvers
}
from
'
ee/subscriptions/buy_minutes/graphql/resolvers
'
;
import
{
STEPS
}
from
'
ee/subscriptions/constants
'
;
import
{
STEPS
}
from
'
ee/subscriptions/constants
'
;
import
stateQuery
from
'
ee/subscriptions/graphql/queries/state.query.graphql
'
;
import
stateQuery
from
'
ee/subscriptions/graphql/queries/state.query.graphql
'
;
import
BillingAddress
from
'
ee/vue_shared/purchase_flow/components/checkout/billing_address.vue
'
;
import
Step
from
'
ee/vue_shared/purchase_flow/components/step.vue
'
;
import
Step
from
'
ee/vue_shared/purchase_flow/components/step.vue
'
;
import
{
stateData
as
initialStateData
}
from
'
ee_jest/subscriptions/buy_minutes/mock_data
'
;
import
{
stateData
as
initialStateData
}
from
'
ee_jest/subscriptions/buy_minutes/mock_data
'
;
import
{
createMockApolloProvider
}
from
'
ee_jest/vue_shared/purchase_flow/spec_helper
'
;
import
{
createMockApolloProvider
}
from
'
ee_jest/vue_shared/purchase_flow/spec_helper
'
;
...
...
ee/spec/frontend/subscriptions/buy_minutes/components/checkout/confirm_order_spec.js
View file @
8ee3f516
...
@@ -2,9 +2,9 @@ import { GlButton, GlLoadingIcon } from '@gitlab/ui';
...
@@ -2,9 +2,9 @@ import { GlButton, GlLoadingIcon } from '@gitlab/ui';
import
{
createLocalVue
,
shallowMount
}
from
'
@vue/test-utils
'
;
import
{
createLocalVue
,
shallowMount
}
from
'
@vue/test-utils
'
;
import
VueApollo
from
'
vue-apollo
'
;
import
VueApollo
from
'
vue-apollo
'
;
import
Api
from
'
ee/api
'
;
import
Api
from
'
ee/api
'
;
import
ConfirmOrder
from
'
ee/subscriptions/buy_minutes/components/checkout/confirm_order.vue
'
;
import
{
STEPS
}
from
'
ee/subscriptions/constants
'
;
import
{
STEPS
}
from
'
ee/subscriptions/constants
'
;
import
stateQuery
from
'
ee/subscriptions/graphql/queries/state.query.graphql
'
;
import
stateQuery
from
'
ee/subscriptions/graphql/queries/state.query.graphql
'
;
import
ConfirmOrder
from
'
ee/vue_shared/purchase_flow/components/checkout/confirm_order.vue
'
;
import
{
GENERAL_ERROR_MESSAGE
}
from
'
ee/vue_shared/purchase_flow/constants
'
;
import
{
GENERAL_ERROR_MESSAGE
}
from
'
ee/vue_shared/purchase_flow/constants
'
;
import
{
stateData
as
initialStateData
}
from
'
ee_jest/subscriptions/buy_minutes/mock_data
'
;
import
{
stateData
as
initialStateData
}
from
'
ee_jest/subscriptions/buy_minutes/mock_data
'
;
import
{
createMockApolloProvider
}
from
'
ee_jest/vue_shared/purchase_flow/spec_helper
'
;
import
{
createMockApolloProvider
}
from
'
ee_jest/vue_shared/purchase_flow/spec_helper
'
;
...
...
ee/spec/frontend/subscriptions/buy_minutes/components/checkout/payment_method_spec.js
View file @
8ee3f516
import
{
mount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
mount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
merge
}
from
'
lodash
'
;
import
{
merge
}
from
'
lodash
'
;
import
VueApollo
from
'
vue-apollo
'
;
import
VueApollo
from
'
vue-apollo
'
;
import
PaymentMethod
from
'
ee/subscriptions/buy_minutes/components/checkout/payment_method.vue
'
;
import
{
resolvers
}
from
'
ee/subscriptions/buy_addons_shared/graphql/resolvers
'
;
import
{
resolvers
}
from
'
ee/subscriptions/buy_minutes/graphql/resolvers
'
;
import
{
STEPS
}
from
'
ee/subscriptions/constants
'
;
import
{
STEPS
}
from
'
ee/subscriptions/constants
'
;
import
stateQuery
from
'
ee/subscriptions/graphql/queries/state.query.graphql
'
;
import
stateQuery
from
'
ee/subscriptions/graphql/queries/state.query.graphql
'
;
import
PaymentMethod
from
'
ee/vue_shared/purchase_flow/components/checkout/payment_method.vue
'
;
import
Step
from
'
ee/vue_shared/purchase_flow/components/step.vue
'
;
import
Step
from
'
ee/vue_shared/purchase_flow/components/step.vue
'
;
import
{
stateData
as
initialStateData
}
from
'
ee_jest/subscriptions/buy_minutes/mock_data
'
;
import
{
stateData
as
initialStateData
}
from
'
ee_jest/subscriptions/buy_minutes/mock_data
'
;
import
{
createMockApolloProvider
}
from
'
ee_jest/vue_shared/purchase_flow/spec_helper
'
;
import
{
createMockApolloProvider
}
from
'
ee_jest/vue_shared/purchase_flow/spec_helper
'
;
...
...
ee/spec/frontend/subscriptions/buy_minutes/components/checkout/zuora_spec.js
View file @
8ee3f516
...
@@ -3,10 +3,10 @@ import { shallowMount, createLocalVue } from '@vue/test-utils';
...
@@ -3,10 +3,10 @@ import { shallowMount, createLocalVue } from '@vue/test-utils';
import
AxiosMockAdapter
from
'
axios-mock-adapter
'
;
import
AxiosMockAdapter
from
'
axios-mock-adapter
'
;
import
{
merge
}
from
'
lodash
'
;
import
{
merge
}
from
'
lodash
'
;
import
VueApollo
from
'
vue-apollo
'
;
import
VueApollo
from
'
vue-apollo
'
;
import
Zuora
from
'
ee/subscriptions/buy_minutes/components/checkout/zuora.vue
'
;
import
{
resolvers
}
from
'
ee/subscriptions/buy_addons_shared/graphql/resolvers
'
;
import
{
resolvers
}
from
'
ee/subscriptions/buy_minutes/graphql/resolvers
'
;
import
{
STEPS
}
from
'
ee/subscriptions/constants
'
;
import
{
STEPS
}
from
'
ee/subscriptions/constants
'
;
import
stateQuery
from
'
ee/subscriptions/graphql/queries/state.query.graphql
'
;
import
stateQuery
from
'
ee/subscriptions/graphql/queries/state.query.graphql
'
;
import
Zuora
from
'
ee/vue_shared/purchase_flow/components/checkout/zuora.vue
'
;
import
{
stateData
as
initialStateData
}
from
'
ee_jest/subscriptions/buy_minutes/mock_data
'
;
import
{
stateData
as
initialStateData
}
from
'
ee_jest/subscriptions/buy_minutes/mock_data
'
;
import
{
createMockApolloProvider
}
from
'
ee_jest/vue_shared/purchase_flow/spec_helper
'
;
import
{
createMockApolloProvider
}
from
'
ee_jest/vue_shared/purchase_flow/spec_helper
'
;
import
axios
from
'
~/lib/utils/axios_utils
'
;
import
axios
from
'
~/lib/utils/axios_utils
'
;
...
...
ee/spec/frontend/subscriptions/buy_minutes/components/order_summary/summary_details_spec.js
View file @
8ee3f516
import
{
GlSprintf
}
from
'
@gitlab/ui
'
;
import
{
GlSprintf
}
from
'
@gitlab/ui
'
;
import
SummaryDetails
from
'
ee/subscriptions/buy_
minutes
/components/order_summary/summary_details.vue
'
;
import
SummaryDetails
from
'
ee/subscriptions/buy_
addons_shared
/components/order_summary/summary_details.vue
'
;
import
{
shallowMountExtended
}
from
'
helpers/vue_test_utils_helper
'
;
import
{
shallowMountExtended
}
from
'
helpers/vue_test_utils_helper
'
;
describe
(
'
SummaryDetails
'
,
()
=>
{
describe
(
'
SummaryDetails
'
,
()
=>
{
...
...
ee/spec/frontend/subscriptions/buy_minutes/components/order_summary_spec.js
View file @
8ee3f516
import
{
shallowMount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
merge
}
from
'
lodash
'
;
import
{
merge
}
from
'
lodash
'
;
import
VueApollo
from
'
vue-apollo
'
;
import
VueApollo
from
'
vue-apollo
'
;
import
OrderSummary
from
'
ee/subscriptions/buy_
minutes
/components/order_summary.vue
'
;
import
OrderSummary
from
'
ee/subscriptions/buy_
addons_shared
/components/order_summary.vue
'
;
import
subscriptionsResolvers
from
'
ee/subscriptions/buy_
minutes
/graphql/resolvers
'
;
import
subscriptionsResolvers
from
'
ee/subscriptions/buy_
addons_shared
/graphql/resolvers
'
;
import
stateQuery
from
'
ee/subscriptions/graphql/queries/state.query.graphql
'
;
import
stateQuery
from
'
ee/subscriptions/graphql/queries/state.query.graphql
'
;
import
purchaseFlowResolvers
from
'
ee/vue_shared/purchase_flow/graphql/resolvers
'
;
import
purchaseFlowResolvers
from
'
ee/vue_shared/purchase_flow/graphql/resolvers
'
;
import
{
import
{
...
...
ee/spec/frontend/subscriptions/buy_minutes/graphql/resolvers_spec.js
View file @
8ee3f516
import
Api
from
'
ee/api
'
;
import
Api
from
'
ee/api
'
;
import
*
as
SubscriptionsApi
from
'
ee/api/subscriptions_api
'
;
import
*
as
SubscriptionsApi
from
'
ee/api/subscriptions_api
'
;
import
{
resolvers
}
from
'
ee/subscriptions/buy_
minutes
/graphql/resolvers
'
;
import
{
resolvers
}
from
'
ee/subscriptions/buy_
addons_shared
/graphql/resolvers
'
;
import
{
ERROR_FETCHING_COUNTRIES
,
ERROR_FETCHING_STATES
}
from
'
ee/subscriptions/constants
'
;
import
{
ERROR_FETCHING_COUNTRIES
,
ERROR_FETCHING_STATES
}
from
'
ee/subscriptions/constants
'
;
import
createFlash
from
'
~/flash
'
;
import
createFlash
from
'
~/flash
'
;
...
@@ -49,7 +49,7 @@ const countries = [
...
@@ -49,7 +49,7 @@ const countries = [
const
states
=
{
California
:
'
CA
'
};
const
states
=
{
California
:
'
CA
'
};
describe
(
'
~/subscriptions/buy_
minutes
/graphql/resolvers
'
,
()
=>
{
describe
(
'
~/subscriptions/buy_
addons_shared
/graphql/resolvers
'
,
()
=>
{
describe
(
'
Query
'
,
()
=>
{
describe
(
'
Query
'
,
()
=>
{
describe
(
'
countries
'
,
()
=>
{
describe
(
'
countries
'
,
()
=>
{
describe
(
'
on success
'
,
()
=>
{
describe
(
'
on success
'
,
()
=>
{
...
...
ee/spec/frontend/subscriptions/buy_minutes/utils_spec.js
View file @
8ee3f516
import
apolloProvider
from
'
ee/subscriptions/buy_
minutes
/graphql
'
;
import
apolloProvider
from
'
ee/subscriptions/buy_
addons_shared
/graphql
'
;
import
{
writeInitialDataToApolloCache
}
from
'
ee/subscriptions/buy_
minutes
/utils
'
;
import
{
writeInitialDataToApolloCache
}
from
'
ee/subscriptions/buy_
addons_shared
/utils
'
;
import
stateQuery
from
'
ee/subscriptions/graphql/queries/state.query.graphql
'
;
import
stateQuery
from
'
ee/subscriptions/graphql/queries/state.query.graphql
'
;
import
{
mockNamespaces
,
mockParsedNamespaces
}
from
'
./mock_data
'
;
import
{
mockNamespaces
,
mockParsedNamespaces
}
from
'
./mock_data
'
;
...
...
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