Fix broken credential form tests after id change

This commit is contained in:
mabashian
2020-08-26 10:10:51 -04:00
committed by Keith Grant
parent 43ac5a0574
commit e830da97f3

View File

@@ -136,14 +136,14 @@ describe('<CredentialForm />', () => {
test('should display cred type subform when scm type select has a value', async () => { test('should display cred type subform when scm type select has a value', async () => {
await act(async () => { await act(async () => {
await wrapper await wrapper
.find('AnsibleSelect[id="credential_type"]') .find('AnsibleSelect[id="credential-type"]')
.invoke('onChange')(null, 1); .invoke('onChange')(null, 1);
}); });
wrapper.update(); wrapper.update();
machineFieldExpects(); machineFieldExpects();
await act(async () => { await act(async () => {
await wrapper await wrapper
.find('AnsibleSelect[id="credential_type"]') .find('AnsibleSelect[id="credential-type"]')
.invoke('onChange')(null, 2); .invoke('onChange')(null, 2);
}); });
wrapper.update(); wrapper.update();
@@ -152,7 +152,7 @@ describe('<CredentialForm />', () => {
test('should update expected fields when gce service account json file uploaded', async () => { test('should update expected fields when gce service account json file uploaded', async () => {
await act(async () => { await act(async () => {
await wrapper await wrapper
.find('AnsibleSelect[id="credential_type"]') .find('AnsibleSelect[id="credential-type"]')
.invoke('onChange')(null, 10); .invoke('onChange')(null, 10);
}); });
wrapper.update(); wrapper.update();
@@ -212,7 +212,7 @@ describe('<CredentialForm />', () => {
test('should show error when error thrown parsing JSON', async () => { test('should show error when error thrown parsing JSON', async () => {
await act(async () => { await act(async () => {
await wrapper await wrapper
.find('AnsibleSelect[id="credential_type"]') .find('AnsibleSelect[id="credential-type"]')
.invoke('onChange')(null, 10); .invoke('onChange')(null, 10);
}); });
wrapper.update(); wrapper.update();