Skip to content
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

CI/UI - Bump to Rancher 2.10 #85

Merged
merged 3 commits into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
6 changes: 3 additions & 3 deletions .github/workflows/ui-e2e.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This workflow calls the master E2E workflow with custom variables
name: UI-E2E
run-name: ${{ github.event_name == 'workflow_dispatch' && format('Rancher-`{0}` - `{1}` destroy={2}', inputs.rancher_version, inputs.grep_test_by_tag, inputs.destroy_runner) || github.event_name == 'schedule' && 'UI-E2E on Rancher-latest/devel/2.9' }}
run-name: ${{ github.event_name == 'workflow_dispatch' && format('Rancher-`{0}` - `{1}` destroy={2}', inputs.rancher_version, inputs.grep_test_by_tag, inputs.destroy_runner) || github.event_name == 'schedule' && 'UI-E2E on Rancher-latest/devel/2.10' }}

on:
workflow_dispatch:
Expand All @@ -15,7 +15,7 @@ on:
type: boolean
rancher_version:
description: Rancher Manager channel/version/head_version to use for installation
default: latest/devel/2.9
default: latest/devel/2.10
type: string
grep_test_by_tag:
description: Grep tags. For multiple selection separate with spaces. Keep always @install
Expand Down Expand Up @@ -45,7 +45,7 @@ jobs:
cluster_name: cluster-k3s
destroy_runner: ${{ github.event_name == 'schedule' && true || inputs.destroy_runner }}
capi_ui_version: dev
rancher_version: ${{ inputs.rancher_version || 'latest/devel/2.9' }}
rancher_version: ${{ inputs.rancher_version || 'latest/devel/2.10' }}
qase_run_id: ${{ inputs.qase_run_id || 'auto' }}
grep_test_by_tag: ${{ inputs.grep_test_by_tag || '@install @short' }}

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# rancher-turtles-e2e

[![UI-E2E_head_2.9](https://github.com/rancher-sandbox/rancher-turtles-e2e/actions/workflows/ui-e2e.yaml/badge.svg?branch=main)](https://github.com/rancher-sandbox/rancher-turtles-e2e/actions/workflows/ui-e2e.yaml)
[![UI-E2E_head_2.10](https://github.com/rancher-sandbox/rancher-turtles-e2e/actions/workflows/ui-e2e.yaml/badge.svg?branch=main)](https://github.com/rancher-sandbox/rancher-turtles-e2e/actions/workflows/ui-e2e.yaml)

What tests are doing:
1. Create the infra stack ( GCP runner, cert-manager, rancher )
Expand Down
6 changes: 3 additions & 3 deletions tests/cypress/latest/e2e/unit_tests/capa_eks_cluster.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,18 @@ describe('Import CAPA EKS', { tags: '@full' }, () => {

// Go to Cluster Management > CAPI > Clusters and check if the cluster has started provisioning
cy.checkCAPIMenu();
cy.contains('Provisioned ' + clusterName, { timeout: timeout });
cy.contains(new RegExp('Provisioned.*' + clusterName), { timeout: timeout });
})
);

it('Auto import child CAPA cluster', () => {
// Check child cluster is created and auto-imported
cy.goToHome();
cy.contains('Pending ' + clusterName);
cy.contains(new RegExp('Pending.*' + clusterName));

// Check cluster is Active
cy.clickButton('Manage');
cy.contains('Active ' + clusterName, { timeout: 300000 });
cy.contains(new RegExp('Active.*' + clusterName), { timeout: 300000 });
})

qase(32,
Expand Down
6 changes: 3 additions & 3 deletions tests/cypress/latest/e2e/unit_tests/capa_rke2_cluster.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,19 @@ describe('Import CAPA RKE2', { tags: '@full' }, () => {

// Go to Cluster Management > CAPI > Clusters and check if the cluster has started provisioning
cy.checkCAPIMenu();
cy.contains('Provisioned ' + clusterName, { timeout: timeout });
cy.contains(new RegExp('Provisioned.*' + clusterName), { timeout: timeout });
})
);

it('Auto import child CAPA cluster', () => {
// Check child cluster is created and auto-imported
cy.goToHome();
cy.contains('Pending ' + clusterName) || cy.contains('Active ' + clusterName);
cy.contains(new RegExp('Pending.*' + clusterName)) || cy.contains(new RegExp('Active.*' + clusterName));
// cy.getBySel('sortable-table-list-container')

// Check cluster is Active
cy.clickButton('Manage');
cy.contains('Active ' + clusterName, { timeout: 300000 });
cy.contains(new RegExp('Active.*' + clusterName), { timeout: 300000 });
})

qase(32,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@ describe('Import CAPD Kubeadm', { tags: '@short' }, () => {
it('Auto import child CAPD cluster', () => {
// Check child cluster is created and auto-imported
cy.goToHome();
cy.contains('Pending ' + clusterName, { timeout: timeout });
cy.contains(new RegExp('Pending.*' + clusterName), { timeout: timeout });

// Check cluster is Active
cy.clickButton('Manage');
cy.contains('Active ' + clusterName, { timeout: timeout });
cy.contains(new RegExp('Active.*' + clusterName), { timeout: timeout });
// TODO: Check MachineSet unavailable status and use checkCAPIClusterActive
cy.checkCAPIClusterProvisioned(clusterName);
})
Expand Down
4 changes: 2 additions & 2 deletions tests/cypress/latest/e2e/unit_tests/capd_rke2_cluster.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ describe('Import CAPD RKE2', { tags: '@short' }, () => {
it('Auto import child CAPD cluster', () => {
// Check child cluster is created and auto-imported
cy.goToHome();
cy.contains('Pending ' + clusterName, { timeout: timeout });
cy.contains(new RegExp('Pending.*' + clusterName), { timeout: timeout });

// Check cluster is Active
cy.clickButton('Manage');
cy.contains('Active ' + clusterName, { timeout: timeout });
cy.contains(new RegExp('Active.*' + clusterName), { timeout: timeout });
// TODO: Check MachineSet unavailable status and use checkCAPIClusterActive
cy.checkCAPIClusterProvisioned(clusterName);
})
Expand Down
6 changes: 3 additions & 3 deletions tests/cypress/latest/e2e/unit_tests/capz_cluster.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,18 +84,18 @@ describe('Import CAPZ', { tags: '@full' }, () => {
// Go to Cluster Management > CAPI > Clusters and check if the cluster has started provisioning
cypressLib.burgerMenuToggle();
cy.checkCAPIMenu();
cy.contains('Provisioned ' + clusterName, { timeout: timeout });
cy.contains(new RegExp('Provisioned.*' + clusterName), { timeout: timeout });
})
);

qase(22, it('Auto import child CAPZ cluster', () => {
// Check child cluster is created and auto-imported
cy.goToHome();
cy.contains('Pending ' + clusterName);
cy.contains(new RegExp('Pending.*' + clusterName));

// Check cluster is Active
cy.clickButton('Manage');
cy.contains('Active ' + clusterName, { timeout: 300000 });
cy.contains(new RegExp('Active.*' + clusterName), { timeout: 300000 });
})
);
qase(23, it('Install App on imported cluster', { retries: 1 }, () => {
Expand Down
10 changes: 5 additions & 5 deletions tests/cypress/latest/e2e/unit_tests/providers_setup.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ describe('Enable CAPI Providers', () => {
// Create Docker Infrastructure provider
cy.addInfraProvider('Docker', dockerProvider, 'capd-system');
var statusReady = 'Ready'
statusReady = statusReady.concat(' ', dockerProvider, ' infrastructure ', dockerProvider, ' ', kubeadmProviderVersion)
statusReady = statusReady.concat(dockerProvider, 'infrastructure', dockerProvider, kubeadmProviderVersion)
cy.contains(statusReady);
})
);
Expand All @@ -89,7 +89,7 @@ describe('Enable CAPI Providers', () => {
cy.checkCAPIMenu();
cy.contains('Providers').click();
var statusReady = 'Ready'
statusReady = statusReady.concat(' ', fleetProvider, ' addon ', fleetProvider, ' ', 'v0.4.0')
statusReady = statusReady.concat(fleetProvider, 'addon', fleetProvider, 'v0.4.0')
cy.contains(statusReady).scrollIntoView();
});
});
Expand All @@ -102,7 +102,7 @@ describe('Enable CAPI Providers', () => {
cypressLib.burgerMenuToggle();
cy.addInfraProvider('Amazon', amazonProvider, 'capa-system', amazonProvider);
var statusReady = 'Ready'
statusReady = statusReady.concat(' ', amazonProvider, ' infrastructure ', amazonProvider, ' ', 'v2.6.1')
statusReady = statusReady.concat(amazonProvider, 'infrastructure', amazonProvider, 'v2.6.1')
cy.contains(statusReady);
})
);
Expand All @@ -114,7 +114,7 @@ describe('Enable CAPI Providers', () => {
cypressLib.burgerMenuToggle();
cy.addInfraProvider('Google', googleProvider, 'capg-system', googleProvider);
var statusReady = 'Ready'
statusReady = statusReady.concat(' ', googleProvider, ' infrastructure ', googleProvider, ' ', 'v1.8.0')
statusReady = statusReady.concat(googleProvider, 'infrastructure', googleProvider, 'v1.8.0')
cy.contains(statusReady, { timeout: 120000 });
})
);
Expand All @@ -125,7 +125,7 @@ describe('Enable CAPI Providers', () => {
cypressLib.burgerMenuToggle();
cy.addInfraProvider('Azure', azureProvider, 'capz-system', azureProvider);
var statusReady = 'Ready'
statusReady = statusReady.concat(' ', azureProvider, ' infrastructure ', azureProvider)
statusReady = statusReady.concat(azureProvider, 'infrastructure', azureProvider)
cy.contains(statusReady, { timeout: 180000 });
})
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ describe('Install Turtles Operator', { tags: '@install' }, () => {
cy.byLabel('Arguments').as('label')
cy.get('@label').type(' --insecure-skip-verify=true')
cy.clickButton('Save');
cy.contains('Active' + ' ' + deployment);
cy.contains(new RegExp('Active.*' + deployment));
cy.namespaceReset();
})

Expand Down
2 changes: 1 addition & 1 deletion tests/cypress/latest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"homepage": "https://github.com/rancher/rancher-turtles-e2e",
"dependencies": {
"@cypress/grep": "^4.1.0",
"@rancher-ecp-qa/cypress-library": "1.1.0",
"@rancher-ecp-qa/cypress-library": "1.2.2",
"cy-verify-downloads": "^0.1.8",
"cypress": "^13.6.4",
"cypress-dark": "^1.8.3",
Expand Down
12 changes: 6 additions & 6 deletions tests/cypress/latest/support/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Cypress.Commands.add('createNamespace', (namespace) => {
cy.contains('Create Namespace').click();
cy.typeValue('Name', namespace);
cy.clickButton('Create');
cy.contains('Active' + ' ' + namespace);
cy.contains(new RegExp('Active.*' + namespace));
cy.namespaceReset();
});

Expand All @@ -81,17 +81,17 @@ Cypress.Commands.add('namespaceReset', () => {
// Command to check CAPI cluster Active status
Cypress.Commands.add('checkCAPIClusterActive', (clusterName) => {
cy.checkCAPIMenu();
cy.contains('Provisioned ' + clusterName, { timeout: 90000 });
cy.contains(new RegExp('Provisioned.*' + clusterName), { timeout: 90000 });
cy.contains('Machine Deployments').click();
cy.contains('Running ' + clusterName, { timeout: 90000 });
cy.contains(new RegExp('Running.*' + clusterName), { timeout: 90000 });
cy.contains('Machine Sets').click();
cy.contains('Active ' + clusterName, { timeout: 90000 });
cy.contains(new RegExp('Active.*' + clusterName), { timeout: 90000 });
});

// Command to check CAPI cluster Provisioned status
Cypress.Commands.add('checkCAPIClusterProvisioned', (clusterName) => {
cy.checkCAPIMenu();
cy.contains('Provisioned ' + clusterName, { timeout: 90000 });
cy.contains(new RegExp('Provisioned.*' + clusterName), { timeout: 90000 });
});

// Command to check CAPI cluster deletion status
Expand Down Expand Up @@ -411,7 +411,7 @@ Cypress.Commands.add('checkFleetGitRepo', (repoName, workspace) => {
if (!workspace) {
workspace = 'fleet-local';
}
cy.contains(workspace).should('be.visible').click();
cy.contains(workspace).click();
// Click the repo link
cy.contains(repoName).click();
cy.url().should("include", "fleet/fleet.cattle.io.gitrepo/" + workspace + "/" + repoName)
Expand Down
Loading