提交 f7efc5f8 编写于 作者: D Dennis Tang

update tests

上级 2e4bea09
......@@ -47,7 +47,7 @@ describe('GkeProjectIdDropdown', () => {
});
it('returns project billing validation text', () => {
vm.isValidatingProjectBilling = true;
vm.setIsValidatingProjectBilling(true);
expect(vm.toggleText).toBe(LABELS.VALIDATING_PROJECT_BILLING);
});
......
......@@ -50,6 +50,19 @@ describe('GCP Cluster Dropdown Store Actions', () => {
});
});
describe('setIsValidatingProjectBilling', () => {
it('should set machine type', done => {
testAction(
actions.setIsValidatingProjectBilling,
true,
{ isValidatingProjectBilling: null },
[{ type: 'SET_IS_VALIDATING_PROJECT_BILLING', payload: true }],
[],
done,
);
});
});
describe('async fetch methods', () => {
window.gapi = gapi();
......@@ -74,10 +87,16 @@ describe('GCP Cluster Dropdown Store Actions', () => {
true,
{
selectedProject: selectedProjectMock,
selectedZone: '',
selectedMachineType: '',
projectHasBillingEnabled: null,
},
[{ type: 'SET_PROJECT_BILLING_STATUS', payload: true }],
[],
[
{ type: 'SET_ZONE', payload: '' },
{ type: 'SET_MACHINE_TYPE', payload: '' },
{ type: 'SET_PROJECT_BILLING_STATUS', payload: true },
],
[{ type: 'setIsValidatingProjectBilling', payload: false }],
done,
);
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册