-
Notifications
You must be signed in to change notification settings - Fork 667
add integration tests for route creation #1695
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
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: yapei The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
| await networkingView.createUnsecureRoute(unsecureRouteName, unsecureServiceName); | ||
| await networkingView.visitRoutesDetailsPage(appHost, testName, unsecureRouteName); | ||
| await crudView.isLoaded(); | ||
| const hostSearchLabel = 'LOCATION'; |
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.
This will likely break after #1465. But it would be much better to add a data-test- attribute to find the value.
| expect(items[hostnameFoundIndex].getText()).toBe(`http://${ hostNameInYAML }`); | ||
| }); | ||
| expect($$('.co-m-pane__body').get(1).getText()).toContain('TLS Settings'); | ||
| expect($$('.co-m-pane__body').get(1).getText()).toContain('TLS is not enabled'); |
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.
This is fragile. Please add a data-test- attribute.
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.
Sorry I was still testing against 4.1 cluster, bridged to OKD 4.2 cluster.
Sam, I didn't see data-test attribute is added for TLS Settings section
<div class="co-m-pane__body">
<h2 class="co-section-heading">
TLS Settings
</h2>
TLS is not enabled.
</div>
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.
| const createRouteForm = $('.co-create-route'); | ||
| const saveButton = $('#save-changes'); | ||
|
|
||
| const chooseFromList = async(itemName: string) => { |
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.
We might want to pull this into a file like form.view.ts so it can be reused elsewhere for any dropdown.
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.
Do we need a different file name for common views? I'm wondering if getResourceJSON, isValueInJSONPath in secrets.view.ts can be moved out as well
| await networkingView.visitRoutesDetailsPage(appHost, testName, unsecureRouteName); | ||
| await crudView.isLoaded(); | ||
| const hostSearchLabel = 'LOCATION'; | ||
| const hostnameFoundIndex = await networkingView.getKeyIndex(await $$('dt'), hostSearchLabel, async(label) => { |
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.
This is fragile. Please use a data-test- attribute
| return result === value; | ||
| }; | ||
|
|
||
| export const getPathInJSON = (path: string, name: string, namespace: string, kind: string) => { |
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'd change this to simply return the object instead of taking in a path. Then the caller can use the object in any way.
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.
Sounds much better, I will update
|
|
/test e2e-aws-console |
Hi Sam, is this a compatibility issue? when I run locally it passed, I feel like it's an issue of incompatible version between |
|
/test e2e-aws-console |
|
I will test the PR against latest code, |
|
/test e2e-aws |
|
@spadgett I've updated the code again, can you please help review? Thanks |
|
Will close and open a new one |

This PR adds an test case to verify unsecure route is correctly created and hostname is correctly shown on console
@rhamilto Can you please help review? Thanks very much