Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2,037 changes: 2,037 additions & 0 deletions browser-logs/out.html

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import PagePo from '@/cypress/e2e/po/pages/page.po';
import { BaseDetailPagePo } from '@/cypress/e2e/po/pages/base/base-detail-page.po';
import MachinePoolsListPo from '@/cypress/e2e/po/lists/machine-pools-list.po';
import ClusterConditionsListPo from '~/cypress/e2e/po/lists/cluster-conditions-list.po';
import ClusterProvisioningLogPo from '~/cypress/e2e/po/lists/cluster-provisioning-log.po';
Expand All @@ -7,10 +7,11 @@ import ClusterSnapshotsListPo from '~/cypress/e2e/po/lists/cluster-snapshots-lis
import TabbedPo from '~/cypress/e2e/po/components/tabbed.po';
import ClusterRecentEventsListPo from '~/cypress/e2e/po/lists/cluster-recent-events-list.po';
import DetailDrawer from '@/cypress/e2e/po/side-bars/detail-drawer.po';

/**
* Covers core functionality that's common to the dashboard's cluster detail pages
*/
export default abstract class ClusterManagerDetailPagePo extends PagePo {
export default abstract class ClusterManagerDetailPagePo extends BaseDetailPagePo {
private static createPath(clusterId: string, clusterName: string, tab?: string) {
const namespace = clusterName === 'local' ? 'fleet-local' : 'fleet-default';

Expand Down Expand Up @@ -45,8 +46,8 @@ export default abstract class ClusterManagerDetailPagePo extends PagePo {
return this.self().get('code');
}

machinePoolsList() {
return new MachinePoolsListPo(this.self().find('[data-testid="sortable-table-list-container"]'));
poolsList(tabId: 'machine' | 'node') {
return new MachinePoolsListPo(this.self().find(`#${ tabId }-pools [data-testid="sortable-table-list-container"]`));
}

conditionsList() {
Expand Down
23 changes: 23 additions & 0 deletions cypress/e2e/po/lists/machine-pools-list.po.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import BaseResourceList from '@/cypress/e2e/po/lists/base-resource-list.po';
import ResourceTablePo from '@/cypress/e2e/po/components/resource-table.po';
import TooltipPo from '@/cypress/e2e/po/components/tooltip.po';
import { GetOptions } from '@/cypress/e2e/po/components/component.po';

export default class MachinePoolsListPo extends BaseResourceList {
details(name: string, index: number) {
Expand All @@ -9,4 +11,25 @@ export default class MachinePoolsListPo extends BaseResourceList {
downloadYamlButton() {
return new ResourceTablePo(this.self()).downloadYamlButton();
}

machinePoolCount(poolName: string, count: number | RegExp, options?: GetOptions) {
return this.resourceTable().sortableTable().groupElementWithName(poolName)
.find('.group-header-buttons')
.contains(count, options);
}

scaleDownButton(poolName: string) {
return this.resourceTable().sortableTable().groupElementWithName(poolName)
.find('[data-testid="scale-down-button"]');
}

scaleUpButton(poolName: string) {
return this.resourceTable().sortableTable().groupElementWithName(poolName)
.find('[data-testid="scale-up-button"]');
}

scaleButtonTooltip(poolName: string, button: 'plus' | 'minus'): TooltipPo {
return new TooltipPo(this.resourceTable().sortableTable().groupElementWithName(poolName)
.find(`.group-header-buttons button .icon-${ button }`));
}
}
5 changes: 5 additions & 0 deletions cypress/e2e/po/prompts/genericPrompt.po.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import ComponentPo from '@/cypress/e2e/po/components/component.po';
import CardPo from '@/cypress/e2e/po/components/card.po';
import LabeledSelectPo from '@/cypress/e2e/po/components/labeled-select.po';
import CheckboxInputPo from '@/cypress/e2e/po/components/checkbox-input.po';

export default class GenericPrompt extends ComponentPo {
card = new CardPo();
Expand All @@ -17,6 +18,10 @@ export default class GenericPrompt extends ComponentPo {
return new LabeledSelectPo(selector);
}

checkbox(selector = '[data-checkbox-ctrl]') {
return new CheckboxInputPo(this.self().get(selector));
}

clickActionButton(text: string) {
return this.card.getActionButton().contains(text).click();
}
Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/tests/pages/fleet/fleet-clusters.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { WorkloadsDeploymentsListPagePo } from '@/cypress/e2e/po/pages/explorer/
import * as path from 'path';
import * as jsyaml from 'js-yaml';
import { HeaderPo } from '@/cypress/e2e/po/components/header.po';
import { LONG_TIMEOUT_OPT, MEDIUM_TIMEOUT_OPT } from '@/cypress/support/utils/timeouts';
import { LONG_TIMEOUT_OPT, MEDIUM_TIMEOUT_OPT, VERY_LONG_TIMEOUT_OPT } from '@/cypress/support/utils/timeouts';
import { FeatureFlagsPagePo } from '@/cypress/e2e/po/pages/global-settings/feature-flags.po';
import LoadingPo from '@/cypress/e2e/po/components/loading.po';

Expand Down Expand Up @@ -84,7 +84,7 @@ describe('Fleet Clusters - bundle manifests are deployed from the BundleDeployme
it('data is populated in fleet cluster list and detail view', () => {
ClusterManagerListPagePo.navTo();
clusterList.waitForPage();
clusterList.list().state(clusterName).contains('Active', { timeout: 700000 });
clusterList.list().state(clusterName).contains('Active', VERY_LONG_TIMEOUT_OPT);

// create gitrepo
cy.createRancherResource('v1', 'fleet.cattle.io.gitrepos', gitRepoTargetAllClustersRequest(namespace, gitRepo, gitRepoUrl, branch, paths)).then(() => {
Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/tests/pages/manager/cluster-manager.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -547,8 +547,8 @@ describe('Cluster Manager', { testIsolation: 'off', tags: ['@manager', '@adminUs
clusterDetail.selectTab(tabbedPo, '[data-testid="btn-node-pools"]');

clusterDetail.waitForPage(undefined, 'node-pools');
clusterDetail.machinePoolsList().details('machine-', 2).should('be.visible');
clusterDetail.machinePoolsList().downloadYamlButton().should('be.disabled');
clusterDetail.poolsList('node').details('machine-', 2).should('be.visible');
clusterDetail.poolsList('node').downloadYamlButton().should('be.disabled');
});

it(`Show Configuration allows to edit config and view yaml for local cluster`, () => {
Expand Down
Loading
Loading