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
ODC-6023-update devconsole-ci-tests #9361
ODC-6023-update devconsole-ci-tests #9361
Conversation
/retest |
1 similar comment
/retest |
@@ -11,7 +11,7 @@ | |||
"clean-reports": "rm -rf ../../../gui_test_screenshots", | |||
"cypress-merge": "mochawesome-merge ../../../gui_test_screenshots/cypress_report*.json > ../../../gui_test_screenshots/cypress.json", | |||
"cypress-generate": "marge -o ../../../gui_test_screenshots/ -f cypress-report -t 'OpenShift DevConsole Cypress Test Results' -p 'OpenShift Cypress Test Results' --showPassed false --assetsDir ../../../gui_test_screenshots/cypress/assets ../../../gui_test_screenshots/cypress.json", | |||
"test-headless": "node --max-old-space-size=4096 ../../../node_modules/.bin/cypress run --env openshift=true --browser ${BRIDGE_E2E_BROWSER_NAME:=chrome} --headless --spec \"features/*/project-creation.feature\";", | |||
"test-headless": "node --max-old-space-size=4096 ../../../node_modules/.bin/cypress run --env openshift=true --browser ${BRIDGE_E2E_BROWSER_NAME:=chrome} --headless --spec \"features/addFlow/*.feature\";", |
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.
Should this package.json
script test all features (smoke 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.
Yes @jerolimov, it executes all Add flow test cases based on the tags mentioned in cypress.json
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.
Buy why? Why not all? :)
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.
If we need to execute all, it takes more time.. which is not required for CI
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.
/retest |
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.
If you like you can also add the following data-tests attributes and change this here to this new data-test references. Wdyt?
- In
CatalogCategories.tsx
I would recommend:
return (
<VerticalTabsTab
key={id}
title={label}
active={active}
className={tabClasses}
onActivate={() => onSelectCategory(id)}
hasActiveDescendant={hasActiveDescendant(selectedCategory, category)}
shown={toplevelCategory}
+ data-test={`tab ${id}`}
>
{subcategories && (
<VerticalTabs restrictTabs activeTab={isActiveTab(selectedCategoryID, category)}>
{_.map(subcategories, (subcategory) =>
renderTabs(subcategory, selectedCategoryID, false),
)}
</VerticalTabs>
)}
</VerticalTabsTab>
);
};
return (
- <VerticalTabs restrictTabs activeTab={activeTab}>
+ <VerticalTabs restrictTabs activeTab={activeTab} data-test="catalog-categories">
{_.map(categories, (category) => renderTabs(category, selectedCategory, true))}
</VerticalTabs>
);
- In
CatalogTypeSelector.tsx
:
- <VerticalTabs>
+ <VerticalTabs data-test="catalog-types">
{catalogTypes.map((type) => {
const { value, label } = type;
const typeCount = catalogTypeCounts[value];
const queryParams = new URLSearchParams(search);
queryParams.set(CatalogQueryParams.TYPE, type.value);
const to = {
pathname,
search: `?${queryParams.toString()}`,
};
return typeCount > 0 ? (
- <li key={value} className="vertical-tabs-pf-tab">
+ <li key={value} className="vertical-tabs-pf-tab" data-test={`tab ${value}`}>
<Link to={to}>{`${label} (${typeCount})`}</Link>
</li>
) : null;
})}
</VerticalTabs>
Wdyt?
helmCharts: 'a[href$="catalogType=HelmChart"]', | ||
builderImage: 'a[href$="catalogType=BuilderImage"]', | ||
template: 'a[href$="catalogType=Template"]', |
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.
With the recommended change above you can simplify the sectors here:
helmCharts: 'a[href$="catalogType=HelmChart"]', | |
builderImage: 'a[href$="catalogType=BuilderImage"]', | |
template: 'a[href$="catalogType=Template"]', | |
helmCharts: '[data-test="tab HelmChart"]', | |
builderImage: '[data-test="tab BuilderImage"]', | |
template: '[data-test="tab Template"]', |
serviceClass: '[data-test="kind-cluster-service-class"]', | ||
managedServices: '[data-test="kind-managed-service"]', | ||
eventSources: 'a[href="/?catalogType=EventSource"]', | ||
eventSources: 'a[href$="catalogType=EventSource"]', |
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.
eventSources: 'a[href$="catalogType=EventSource"]', | |
eventSources: '[data-test="tab EventSource"]', |
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.
Run the cypress tests locally again, and run successfully. Selectors looks good.
/lgtm
Approve the test-data
frontend changes.
/approve
/retest
/retest Please review the full test history for this PR and help us cut down flakes. |
5 similar comments
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/hold |
/retest |
The E2E tests fails because of an OperatorHub I fixed now in #9479. We need to wait for this PR and after that this PR should be rebased and tested after that again. @makambalaji As mentioned in slack, I still got an issue with multiple entries in the |
updated the page objects |
/retest |
Tested this PR together with this two PRs. After that the headless tests run successfully on a shared cluster and a local cluster (crc). Sorry but I think we should wait until both are merged and then this PR should be rebased again.
|
Looks like pr's are merged |
/retest |
data-test attributes are included in this pr. due to that reason, scripts are verified on localhost instead of remote cluster once this pr is merged. will raise a separate pr for modifying devconsole/integration-tests/package.json to execute all addFlow scripts |
/unhold |
Re run the tests locally, and works fine. /lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jerolimov, makambalaji 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 |
Jira Id: https://issues.redhat.com/browse/ODC-6023
Description:
CI implemented for entire add flow
Browser & its version : Chrome 91
Pre-conditions/setup:
Checks for approving Epic scenarios Automation PR:
Refactoring criteria for approving Automation PR:
Execution Commands:
In below commands, please update url and password based on the cluster
Results: 18 test cases are executed in 19 min [duration]
Screenshots
Browser conformance: