Skip to content

Commit

Permalink
tests: check directly input instead of just class
Browse files Browse the repository at this point in the history
  • Loading branch information
soleksy-splunk committed Oct 2, 2024
1 parent 2974e0f commit c48e596
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions ui/src/components/EntityModal/EntityModal.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,9 @@ describe('Oauth field disabled on edit - diableonEdit property', () => {
render(<EntityModal {...props} handleRequestClose={handleRequestClose} />);
};

const getDisabledOauthField = () =>
document.getElementsByClassName('oauth_oauth_text_jest_test')[1];
const getDisabledOauthField = () => document.querySelector('.oauth_oauth_text_jest_test input');

const getDisabledBasicField = () =>
document.getElementsByClassName('basic_oauth_text_jest_test')[1];
const getDisabledBasicField = () => document.querySelector('.basic_oauth_text_jest_test input');

it('Oauth Oauth - disableonEdit = true, oauth field not disabled on create', async () => {
setUpConfigWithDisabedOauth();
Expand Down Expand Up @@ -144,8 +142,7 @@ describe('Options - Enable field property', () => {
render(<EntityModal {...props} handleRequestClose={handleRequestClose} />);
};

const getDisabledOauthField = () =>
document.getElementsByClassName('oauth_oauth_text_jest_test')[1];
const getDisabledOauthField = () => document.querySelector('.oauth_oauth_text_jest_test input');

it('Oauth Oauth - Enable field equal false, so field disabled', async () => {
setUpConfigWithDisabledComplitelyOauthField();
Expand Down

0 comments on commit c48e596

Please sign in to comment.