-
Notifications
You must be signed in to change notification settings - Fork 20
Add automation to importers UI #715
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,78 @@ | ||
| Feature: Importer Explorer - View importers details | ||
| Background: Authentication | ||
| Given User is authenticated | ||
|
|
||
| Scenario: The user navigates to Importers Explorer page | ||
| Given The user navigates to TPA URL page successfully | ||
| When The user selects the importers menu option | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since we can expect a similar step in other scenarios, too, it would make sense to make this one re-usable, e.g. |
||
| Then Application navigates to Importers page | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We already have a similar step here. We should make it general and re-usable and move it to a shared file in |
||
| Then Call to Action button for each importer should be visible | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't believe this is up-to-date, anymore. |
||
|
|
||
| Scenario: The user can see that the filter icon appears in importers page | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The scenario also checks for headers, so the scenario should probably something more general, like |
||
| Given The user navigates to TPA URL page | ||
| When The user selects the importers overview page | ||
| Then The column headers should be visible | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The names of the actual headers should definitely be a part of the feature file, otherwise this step is pretty vague. |
||
| Then There should be a filter icon displayed | ||
|
|
||
| Scenario: The user can search a text in search text box with pressing 'Enter' in the keyboard | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Probably should be called something more general, like |
||
| Given The user navigates to TPA URL landing page | ||
| When The user selects the importers option | ||
| Then A search text box appears | ||
| Then The user types "<importerName>" in the search text box and presses Enter key | ||
| Then Importer total results is 1 | ||
|
|
||
| Examples: | ||
| | importerName | | ||
| | cve | | ||
|
|
||
| Scenario: The user can expand all importers to see their logs | ||
| Given The user navigates to TPA URL dashboard page | ||
| When The importers option is selected on the left menu | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this the same step as Actually, now that I look at it, we have the same step in this file called by a different name in pretty much every scenario:
And so on. We should think of step names as function names, because that's what they are. If you want to do the same thing multiple times, you call the same function. The step name really just calls a function described by a human readable name, otherwise it's the same thing. |
||
| Then The user expands all the importers rows | ||
| Then All the importers rows should be expanded | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Probably a step where the logs are checked to be visible should be here, too. |
||
|
|
||
| Scenario: Pagination controls on importer explorer page | ||
| Given The user navigates to TPA URL page home page | ||
| When The user selects the importers option from left menu | ||
| Then The importers page should be displayed with pagination and correct paging values | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should be specific here about what that means. |
||
| And It should not be possible to move between pages accordingly | ||
| And It should not be possible to add page numbers in the pagination text box | ||
|
|
||
| Scenario: When the user clicks on the Call to Action button he can see the relevant options | ||
| Given The user navigates to TPA home page | ||
| When The importers option is selected on left menu | ||
| Then The importers page should be displayed | ||
| Then The user clicks on all the Call to Action buttons and Enable, Disable and Run options will be displayed | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is also outdated. |
||
|
|
||
|
|
||
| Scenario: The user is able to disable an enabled importer | ||
| Given The user navigates to TPA home landing page | ||
| When The importers option is selected on the menu | ||
| Then The importers page should be displayed properly | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a very vague step and should already be checked for in |
||
| Then The user has clicked on the Call to Action button under an enabled importer and disables the importer | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. By default, all importers are disabled on a locally-run instance, so we probably need to add some preliminary checks and maybe we should start with enabling a disabled importer. |
||
|
|
||
|
|
||
| Scenario: The user is not able to disable an already disabled importer | ||
| Given The user navigates to TPA home dashboard page | ||
| When The importers option is selected on the main menu | ||
| Then The importers page should be displayed successfully | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Again this is the same problem as above. We don't need to check for this here and we also shouldn't call for the same thing under multiple different names. |
||
| Then The user has clicked on the Call to Action icon under a disabled importer and the Disable option is not visible | ||
|
|
||
| Scenario: The user is able to enable a disabled importer | ||
| Given The user navigates to TPA dashboard home page | ||
| When The importers option is selected on the context menu | ||
| Then The importers page should be displayed appropreiately | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as above. |
||
| Then The user has clicked on the Kebab icon under a disabled importer and enables it | ||
| Then There should be a label of Scheduled or progress bar displayed under the specific importer | ||
|
|
||
| Scenario: The user can run an enabled importer | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So the order of scenarios should be:
And there probably should probably be scenarios including stopping a running importer etc. |
||
| Given The user navigates to TPA home dashboard landing page | ||
| When The importers option is selected on left context menu | ||
| Then The importers page should be displayed as designed | ||
| Then The user has clicked on the Call to Action icon under an enabled importer and then selects Run | ||
| Then There should be a confirmation message and a progress bar displayed under the relevant importer | ||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is better to avoid these extra 'navigate to homepage' generic steps. And especially repeating them in every scenario too.
Background-Given User is authenticated(similar to existing advisory/sbom/vulnerability-explorer tests)-- That can be expected to result in You being already on TPA website (so have left menu available)
Also if similar step would be needed, then:
Scenariosunder theFeatureneed such step it would be better to add it toBackgroundinstead/uploador/importerswhich are way faster and do not slow test execution that much, as also do not cause that big load on the backendThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@queria @ikanias FYI, this has been addressed in this PR. If we expect the user to be authenticated, then we should already expect them to be at the
/importerspage, so this step is now unnecessary.