Commit graph

11 commits

Author SHA1 Message Date
Aleksandar Todorov
e106a32431 Use getByTestId() instead of getByText
for asserting if user is on landing page b/c the text
"Create a new image" is present on both the landing page and the
wizard.
2020-11-24 14:55:40 +01:00
Aleksandar Todorov
0895a122f5 test: Cover the Create button with all valid values 2020-11-24 14:55:40 +01:00
Aleksandar Todorov
530988f1da Test CreateImageWizard with missing values 2020-11-24 14:55:40 +01:00
Sanne Raymaekers
33e9db6681 tests: More updates
- `npm run test:single` runs jest with `-w 1`, makes the output readable
- adds testIds to the radio buttons, I think it's a bit bugged where if
  you click the label it'll automatically switch to the first radio button
  (even if you click the label of the 2nd button)
- moved a misplaced wait
2020-11-18 16:38:23 +02:00
Aleksandar Todorov
da5df65394 Update verifyCancelButton
b/c when rendering the CreateImageWizard the container doesn't
include the main app headline
2020-11-18 16:38:23 +02:00
Aleksandar Todorov
bf7d551865 tests: mock the insights dependency to avoid failures 2020-11-18 16:38:23 +02:00
Aleksandar Todorov
48fcbda28d tests: simplify calls to waitForElementToBeRemoved and reorder
otherwise we get:

Error: The element(s) given to waitForElementToBeRemoved are
already removed. waitForElementToBeRemoved requires that the
element(s) exist(s) before waiting for removal.
2020-11-18 16:38:23 +02:00
Aleksandar Todorov
44fecec797 Add tests switching between fields in AmazonUploadComponent 2020-11-18 16:38:23 +02:00
Aleksandar Todorov
f01568c263 Add more test automation. Refs #40
- Make activation key input field required

- Registration step in CreateImageWizard
  - should allow choosing activation keys
  - should hide input fields when clicking Register the system later
2020-11-12 10:59:47 +01:00
Aleksandar Todorov
afe02e0f2e Add more tests for Create Image Wizard
- sanity validation of each of the 4 steps
- click through buttons Next/Back/Cancel

Notes:

- add data-testid attribute for the release select field b/c
there's no better way to query it
- add @testing-library/jest-dom for additional asserts
2020-11-09 10:52:33 +01:00
Aleksandar Todorov
a5e56eea2f Initial test for CreateImageWizard
very basic, make sure we can render all of the expected text
2020-11-03 16:48:46 +01:00