Skip to content

Commit

Permalink
Merge pull request #9361 from makambalaji/odc-6023-dev-console-add-fl…
Browse files Browse the repository at this point in the history
…ow-testcases-ci-integration

ODC-6023-update devconsole-ci-tests
  • Loading branch information
openshift-merge-robot committed Jul 15, 2021
2 parents f6dd80e + 2b97809 commit 73e5757
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ export enum switchPerspective {
}

export enum operators {
PipelinesOperator = 'Pipeline',
ServerlessOperator = 'Serverless',
VirtualizationOperator = 'Virtualization',
PipelinesOperator = 'Red Hat OpenShift Pipelines',
ServerlessOperator = 'Red Hat OpenShift Serverless',
VirtualizationOperator = 'OpenShift Virtualization',
RedHatIntegrationCamelK = 'Red Hat Integration - Camel K',
ApacheCamelKOperator = 'Camel K Operator',
KnativeApacheCamelOperator = 'Knative Apache Camel Operator',
EclipseCheOperator = 'Eclipse Che',
GitOpsOperator = 'GitOps',
GitOpsOperator = 'Red Hat OpenShift GitOps',
WebTerminalOperator = 'Web Terminal',
ApacheKafka = 'Red Hat Integration - AMQ Streams',
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,18 +105,18 @@ export const catalogPO = {
cardType: 'span.pf-c-badge',
create: 'button[type="submit"]',
cancel: '[data-test-id="reset-button"]',
cardList: '[role="rowgroup"]',
cardList: '[role="grid"]',
cardHeader: '.pf-c-badge.pf-m-read',
groupByMenu: 'pf-c-dropdown__menu',
catalogTypeLink: 'li.vertical-tabs-pf-tab.shown.text-capitalize.co-catalog-tab__empty',
catalogTypes: {
operatorBacked: '[data-test="kind-cluster-service-version"]',
helmCharts: 'a[href="/?catalogType=HelmChart"]',
builderImage: 'ul:nth-child(3) > li:nth-child(1) > a', // This needs to be changed
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: '[data-test="tab EventSource"]',
},
cards: {
mariaDBTemplate: 'a[data-test="Template-MariaDB"] .catalog-tile-pf-title',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,21 @@ export const operatorsPO = {
operatorHub: {
numOfItems: 'div.co-catalog-page__num-items',
install: '[data-test="install-operator"]',
pipelinesOperatorCard: '[data-test^="openshift-pipelines-operator"]',
serverlessOperatorCard: '[data-test^=serverless-operator]',
virtualizationOperatorCard: '[data-test^="kubevirt-hyperconverged"]',
redHatCamelKOperatorCard: '[data-test^="red-hat-camel-k"]',
pipelinesOperatorCard:
'[data-test="openshift-pipelines-operator-rh-redhat-operators-openshift-marketplace"]',
serverlessOperatorCard:
'[data-test="serverless-operator-redhat-operators-openshift-marketplace"]',
virtualizationOperatorCard:
'[data-test="kubevirt-hyperconverged-redhat-operators-openshift-marketplace"]',
redHatCamelKOperatorCard:
'[data-test="red-hat-camel-k-redhat-operators-openshift-marketplace"]',
installingOperatorModal: '#operator-install-page',
gitOpsOperatorCard: '[data-test^="openshift-gitops-operator"]',
gitOpsOperatorCard:
'[data-test="openshift-gitops-operator-redhat-operators-openshift-marketplace"]',
webTerminalOperatorCard: '[data-test="web-terminal-redhat-operators-openshift-marketplace"]',
apacheCamelKOperatorCard: '[data-test^="camel-k-community"]',
knativeApacheCamelKOperatorCard: '[data-test^="knative-camel-operator-community"]',
apacheCamelKOperatorCard: '[data-test="camel-k-community-operators-openshift-marketplace"]',
knativeApacheCamelKOperatorCard:
'[data-test="knative-camel-operator-community-operators-openshift-marketplace"]',
apacheKafkaOperatorCard: '[data-test^="amq-streams-redhat-operators"]',
redHatSourceType: '[data-test-group-name="catalogSourceDisplayName"] [title="Red Hat"]',
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ export const catalogPage = {
.its('length')
.should('be.greaterThan', 0);
},
verifyChartCardsAvailable: () => {
verifyHelmChartCardsAvailable: () => {
cy.get(catalogPO.cardList)
.should('exist')
.find(catalogPO.cardHeader)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,5 @@ Then('user will see the cards of Event Sources', () => {
});

Then('user will see the cards of Helm Charts', () => {
catalogPage.verifyChartCardsAvailable();
catalogPage.verifyHelmChartCardsAvailable();
});
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ const CatalogCategories: React.FC<CatalogCategoriesProp> = ({
onActivate={() => onSelectCategory(id)}
hasActiveDescendant={hasActiveDescendant(selectedCategory, category)}
shown={toplevelCategory}
data-test={`tab ${id}`}
>
{subcategories && (
<VerticalTabs restrictTabs activeTab={isActiveTab(selectedCategoryID, category)}>
Expand All @@ -54,7 +55,7 @@ const CatalogCategories: React.FC<CatalogCategoriesProp> = ({
};

return (
<VerticalTabs restrictTabs activeTab={activeTab}>
<VerticalTabs restrictTabs activeTab={activeTab} data-test="catalog-categories">
{_.map(categories, (category) => renderTabs(category, selectedCategory, true))}
</VerticalTabs>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const CatalogTypeSelector: React.FC<CatalogTypeSelectorProps> = ({
{t('devconsole~Type')}
<FieldLevelHelp>{typeDescriptions}</FieldLevelHelp>
</Title>
<VerticalTabs>
<VerticalTabs data-test="catalog-types">
{catalogTypes.map((type) => {
const { value, label } = type;
const typeCount = catalogTypeCounts[value];
Expand All @@ -49,7 +49,7 @@ const CatalogTypeSelector: React.FC<CatalogTypeSelectorProps> = ({
};

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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Then('user will see the list of Chart Repositories', () => {
});

Then('user will see the cards of Helm Charts', () => {
catalogPage.verifyChartCardsAvailable();
catalogPage.verifyHelmChartCardsAvailable();
});

Then('user will see Filter by Keyword field', () => {
Expand Down

0 comments on commit 73e5757

Please sign in to comment.