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
Bug 1803257: Test pipeline v2 #4147
Bug 1803257: Test pipeline v2 #4147
Conversation
7f2c2f0
to
d62796c
Compare
|
|
582125d
to
1ef54ce
Compare
/test analyze |
@@ -120,4 +133,70 @@ describe('Pipeline', async () => { | |||
true, | |||
); | |||
}); | |||
it('start pipeline scenario', async () => { |
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.
Please add a description of the test that this function performs. Also - please add comments to the code as it is not always possible to understand the action that the "user" is performing in the UI .
); | ||
await browser.wait(until.visibilityOf(pipelineTable)); | ||
expect( | ||
pipelineTableBody.element(by.css('[data-test-id="sample-app-pipeline"]')).isPresent(), |
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.
The definition of the UI element being accessed should be in the test's corresponding view file and not here in the test code.
await pipelineFilter.click(); | ||
await pipelineFilter.sendKeys('sample-app-pipeline'); | ||
await browser.wait( | ||
until.visibilityOf(pipelineTableBody.element(by.css('[data-test-id="sample-app-pipeline"]'))), |
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.
The definition of the UI element being accessed should be in the test's corresponding view file and not here in the test code.
browser.sleep(5000); | ||
await pipelineStart.click(); | ||
await browser.wait( | ||
until.visibilityOf(element(by.cssContainingText('h2', 'Pipeline Run Overview'))), |
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.
The definition of the UI element being accessed should be in the test's corresponding view file and not here in the test code.
}); | ||
await pipelinecheckStatus(); | ||
await browser.wait(until.visibilityOf(pipelineTableBody)); | ||
await element(by.css('[data-test-id="sample-app-pipeline"]')).click(); |
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.
The definition of the UI element being accessed should be in the test's corresponding view file and not here in the test code.
await element(by.css('[data-test-id="sample-app-pipeline"]')).click(); | ||
await browser.wait(until.visibilityOf(pipelineRun)); | ||
await pipelineRun.click(); | ||
const pipelines = element(by.css(`[data-test-id="${runName}"]`)); |
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.
The definition of the UI element being accessed should be in the test's corresponding view file and not here in the test code.
await browser.wait(until.visibilityOf(pipelineActionList)); | ||
await pipelineActionList.click(); | ||
await pipelineStartLastRun.click(); | ||
await browser.wait(until.elementToBeClickable(pipelineRuns), 5000); |
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.
The timeout value of 5000 msec should be defined in a constant.
}); | ||
await pipelineSelect(runName).click(); | ||
await pipelineRunLogs.click(); | ||
// browser.wait(function() { |
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 should not leave commented out code in the repo.
// return element(by.className('odc-pipeline-run-logs__tasklist')).isLoaded() | ||
// }); | ||
|
||
await browser.wait(until.presenceOf(element(by.className('odc-pipeline-run-logs__tasklist')))); |
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.
The definition of the UI element being accessed should be in the test's corresponding view file and not here in the test code.
// }); | ||
|
||
await browser.wait(until.presenceOf(element(by.className('odc-pipeline-run-logs__tasklist')))); | ||
await element(by.className('odc-pipeline-run-logs__tasklist')) |
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.
The definition of the UI element being accessed should be in the test's corresponding view file and not here in the test code.
.getText() | ||
.then(function(text) { | ||
const sample = text.replace(/\s+/g, ' '); | ||
// expect(text.replace(/\s+/g, ' ')).toContain('install-deps compile code-sanity e2e-tests'); |
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.
More commented out code - we should remove this.
await pipelineActionList.click(); | ||
await pipelineStartLastRun.click(); | ||
await browser.wait(until.elementToBeClickable(pipelineRuns), 5000); | ||
await browser.sleep(4000); |
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 had success if I replaced the sleep statement with:
await browser.wait(until.elementToBeClickable(pipelineRuns), 5000);
//// await browser.sleep(4000);
await pipelineRuns.click();
await browser.wait(until.visibilityOf(pipelineTableBody));
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.
It's not working on my machine
// return element(by.className('odc-pipeline-run-logs__tasklist')).isLoaded() | ||
// }); | ||
|
||
await browser.wait(until.presenceOf(element(by.className('odc-pipeline-run-logs__tasklist')))); |
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 had success if I replaced the classname with:
await browser.wait(until.presenceOf(element(by.className('odc-pipeline-topology-graph'))));
await element(by.className('odc-pipeline-topology-graph'))
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.
It's not working for me
@@ -1,6 +1,6 @@ | |||
import { browser, $, ExpectedConditions as until, by, element } from 'protractor'; | |||
|
|||
export const operatorModal = $('.pf-c-modal-box'); | |||
export const operatorModal = $('.co-catalog-page__overlay'); |
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.
@sanketpathak FYI this change will prevent me from providing an official approval. You'll need to seek out Christian or another dev from the frontend OWNERS file... so they can get both dev-console & OLM.
Also, will this impact any integration tests in OLM?
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 change is necessary as the above modal element is using pattern fly class which is quite unreliable and tests are failing because of it.
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 wasn't directly inquiring if this was a needed change - I was inquiring if it will impact other tests. I was also mentioning because of this change, I am unable to give an approved
label... so the best I can give is lgtm
- the same as Len.
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.
/assign
Spoke with Sanket, he'll update this PR with Len's feedback + the comments before I do my review.
Still getting used to reading protractor code, so these comments will hopefully help. Once that's done I'll try to make this review a high priority.
d9d2e5a
to
2fc94f0
Compare
/bugzilla refresh |
@spadgett: This pull request references Bugzilla bug 1803257, which is invalid:
Comment In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/bugzilla refresh |
@sanketpathak: This pull request references Bugzilla bug 1803257, which is valid. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/retest |
2c4fb37
to
948095b
Compare
@@ -146,7 +146,7 @@ export const NavBar = withRouter<NavBarProps>(({ pages, basePath }) => { | |||
'co-m-horizontal-nav-item--active': matchUrl && matchUrl.isExact, | |||
}); | |||
return ( | |||
<li className={klass} key={name}> | |||
<li className={klass} key={name} data-test-id={`horizontal-nav-${name}`}> |
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.
Why isn't this on the actionable link?
export const pipelineSelect = function(name) { | ||
const newpipelineSelect = element(by.css(`[data-test-id="${name}"]`)); | ||
return newpipelineSelect; | ||
}; |
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.
export const pipelineSelect = (name) => element(by.css(`[data-test-id="${name}"]`));
948095b
to
a075823
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: christianvogt, sanketpathak The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest Please review the full test history for this PR and help us cut down flakes. |
1 similar comment
/retest Please review the full test history for this PR and help us cut down flakes. |
@sanketpathak: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
/retest Please review the full test history for this PR and help us cut down flakes. |
@sanketpathak: All pull requests linked via external trackers have merged. Bugzilla bug 1803257 has been moved to the MODIFIED state. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/cherrypick release-4.4 |
@sanketpathak: new pull request created: #4555 In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
No description provided.