test: Update tests
This commit is contained in:
parent
2080425753
commit
d98dd02fa3
6 changed files with 14 additions and 20 deletions
|
|
@ -105,12 +105,10 @@ describe('Step Details', () => {
|
|||
// enter invalid image name
|
||||
const invalidName = 'a'.repeat(101);
|
||||
await enterBlueprintName(invalidName);
|
||||
expect(await getNextButton()).toHaveClass('pf-m-disabled');
|
||||
expect(await getNextButton()).toBeDisabled();
|
||||
|
||||
// enter valid image name
|
||||
await enterBlueprintName();
|
||||
expect(await getNextButton()).not.toHaveClass('pf-m-disabled');
|
||||
expect(await getNextButton()).toBeEnabled();
|
||||
});
|
||||
|
||||
|
|
@ -123,12 +121,10 @@ describe('Step Details', () => {
|
|||
// enter invalid image description
|
||||
const invalidDescription = 'a'.repeat(251);
|
||||
await enterBlueprintDescription(invalidDescription);
|
||||
expect(await getNextButton()).toHaveClass('pf-m-disabled');
|
||||
expect(await getNextButton()).toBeDisabled();
|
||||
|
||||
// enter valid image description
|
||||
await enterBlueprintDescription();
|
||||
expect(await getNextButton()).not.toHaveClass('pf-m-disabled');
|
||||
expect(await getNextButton()).toBeEnabled();
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -239,7 +239,7 @@ describe('repository snapshot tab - ', () => {
|
|||
name: /select all/i,
|
||||
});
|
||||
// eslint-disable-next-line testing-library/no-node-access
|
||||
expect(bulkSelectCheckbox.closest('div')).toHaveClass('pf-m-disabled');
|
||||
expect(bulkSelectCheckbox.closest('div')).toBeDisabled();
|
||||
});
|
||||
|
||||
test('button Reset works to empty the snapshot date', async () => {
|
||||
|
|
|
|||
|
|
@ -184,20 +184,20 @@ describe('Step Upload to AWS', () => {
|
|||
await goToAwsStep();
|
||||
|
||||
const nextButton = await getNextButton();
|
||||
expect(nextButton).toHaveClass('pf-m-disabled');
|
||||
expect(nextButton).toBeDisabled();
|
||||
|
||||
await chooseManualOption();
|
||||
expect(nextButton).toHaveClass('pf-m-disabled');
|
||||
expect(nextButton).toBeDisabled();
|
||||
|
||||
await enterAccountId();
|
||||
expect(nextButton).not.toHaveClass('pf-m-disabled');
|
||||
expect(nextButton).toBeEnabled();
|
||||
|
||||
await chooseSourcesOption();
|
||||
await waitFor(() => expect(nextButton).toHaveClass('pf-m-disabled'));
|
||||
await waitFor(() => expect(nextButton).toBeDisabled());
|
||||
|
||||
await getSourceDropdown();
|
||||
await selectSource();
|
||||
await waitFor(() => expect(nextButton).not.toHaveClass('pf-m-disabled'));
|
||||
await waitFor(() => expect(nextButton).toBeEnabled());
|
||||
});
|
||||
|
||||
test('compose request share_with_sources field is correct', async () => {
|
||||
|
|
|
|||
|
|
@ -150,13 +150,11 @@ describe('Step Upload to Google', () => {
|
|||
await waitFor(async () =>
|
||||
user.type(await screen.findByTestId('principal'), 'a')
|
||||
);
|
||||
expect(await getNextButton()).toHaveClass('pf-m-disabled');
|
||||
expect(await getNextButton()).toBeDisabled();
|
||||
|
||||
await waitFor(async () =>
|
||||
user.type(await screen.findByTestId('principal'), 'test@test.com')
|
||||
);
|
||||
expect(await getNextButton()).not.toHaveClass('pf-m-disabled');
|
||||
expect(await getNextButton()).toBeEnabled();
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue