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

V3 #3

Draft
wants to merge 37 commits into
base: auth-small-removal
Choose a base branch
from
Draft

V3 #3

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
56411d6
flaky test fixes
Feb 13, 2024
898b08e
use force to click download yaml
Feb 13, 2024
04acac3
use downloadKubeConfig fn
Feb 13, 2024
e0d7356
clean up cloud creds in beforeAll
Feb 13, 2024
6a2c258
remove duplicate line
Feb 16, 2024
f7593e9
add waitForPage fn
Feb 17, 2024
f05a2bb
Fix displaying false vsphere errors (#10473)
momesgin Feb 20, 2024
ccb88e8
Fix default values not being set when a new pool is added in edit mod…
momesgin Feb 20, 2024
065ab35
change label text to a more meaningful copy + add test (#10466)
aalves08 Feb 21, 2024
4334f1a
Add the Port PR workflow
rak-phillip Feb 21, 2024
f2f2ad8
Merge pull request #10478 from rak-phillip/feature/10218-backport-action
rak-phillip Feb 21, 2024
d879e6a
Relay an error message when the backport fails
rak-phillip Feb 22, 2024
9263fe3
Merge pull request #10494 from rak-phillip/feature/10218-backport-act…
rak-phillip Feb 22, 2024
62c0cff
Merge pull request #10442 from yonasberhe23/fix_flaky_cluster_mngr_tests
yonasberhe23 Feb 22, 2024
08f9fcb
Use `[...]` to evaluate conditional expression
rak-phillip Feb 22, 2024
d4b7d70
Disable projects fetching in ClusterTools page when multi-cluster-man…
torchiaf Feb 22, 2024
cd27435
add e2e test to test issue 10056 (#10474)
aalves08 Feb 23, 2024
37162fe
Remove useless mock data
torchiaf Feb 23, 2024
f0de56c
Merge pull request #10492 from codyrancher/auth-small-removal
codyrancher Feb 23, 2024
230dabc
Merge pull request #10498 from rak-phillip/feature/10218-backport-act…
rak-phillip Feb 23, 2024
a8679f0
Merge pull request #10493 from torchiaf/10458-mcm-disabled-cluster-tool
torchiaf Feb 26, 2024
6c08d48
[Workflow] Explicitly set milestone env variable
rak-phillip Feb 26, 2024
3097bab
[Workflow] Get the original PR body
rak-phillip Feb 26, 2024
0334f58
[Workflow] Add original assignee to the new PR
rak-phillip Feb 26, 2024
a1aac27
Merge pull request #10513 from rak-phillip/feature/10511-port-pr
rak-phillip Feb 26, 2024
2e783c7
Removing everything related to scrollTrigger.
codyrancher Feb 21, 2024
79b935a
Removing unused $nuxt.{suffixes} that I found
codyrancher Feb 21, 2024
7b80242
Replace the use of Vue[installKey]
codyrancher Feb 28, 2024
d1d3dc5
Removing some ssr rehydration code since we're not doing ssr
codyrancher Feb 28, 2024
39f5b71
Remove the remaining $nuxt.$on,$off,$emit and replace with the use of…
codyrancher Feb 28, 2024
9d845ad
Replacing usages of the .$nuxt on vue instances with globalApp refere…
codyrancher Feb 28, 2024
ce7cc2f
Removing SSR dead code
codyrancher Feb 28, 2024
9edef35
Fixing an issue where extensions could still be referencing window.$n…
codyrancher Feb 28, 2024
0b693da
Migrating another $nuxt over to the window.$globalApp
codyrancher Feb 28, 2024
2ac9f09
Removed the usage of Vue.config.$nux
codyrancher Feb 28, 2024
af097dc
Removed the usage of Vue.util.defineReactive
codyrancher Feb 29, 2024
54df7cc
Re-run missing check
cnotv Mar 11, 2024
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
101 changes: 101 additions & 0 deletions .github/workflows/port-pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
name: Port PR

on:
issue_comment:
types:
- created

jobs:
port-pr:
runs-on: ubuntu-latest
if: (startsWith(github.event.comment.body, '/backport') || startsWith(github.event.comment.body, '/forwardport')) && github.event.issue.pull_request
steps:
- name: Check org membership
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
if gh api orgs/${GITHUB_REPOSITORY_OWNER}/members --paginate | jq -e --arg GITHUB_ACTOR "$GITHUB_ACTOR" '.[] | select(.login == $GITHUB_ACTOR)' > /dev/null; then
echo "${GITHUB_ACTOR} is a member"
echo "is_member=true" >> $GITHUB_ENV
else
echo "${GITHUB_ACTOR} is not a member" >> $GITHUB_STEP_SUMMARY
echo "is_member=false" >> $GITHUB_ENV
fi
- name: Check milestone
if: ${{ env.is_member == 'true' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ORIGINAL_ISSUE_NUMBER: ${{ github.event.issue.number }}
COMMENT_BODY: ${{ github.event.comment.body }}
run: |
BODY_MILESTONE=$(echo "${COMMENT_BODY}" | awk '{ print $2 }')
# Sanitize input
MILESTONE=${BODY_MILESTONE//[^a-zA-Z0-9\-\.]/}
if gh api repos/${GITHUB_REPOSITORY}/milestones --paginate | jq -e --arg MILESTONE "$MILESTONE" '.[] | select(.title == $MILESTONE)' > /dev/null; then
echo "Milestone exists"
echo "milestone_exists=true" >> $GITHUB_ENV
echo "milestone=${MILESTONE}" >> $GITHUB_ENV
else
echo "Milestone ${MILESTONE} does not exist" >> $GITHUB_STEP_SUMMARY
gh issue comment -R ${GITHUB_REPOSITORY} ${ORIGINAL_ISSUE_NUMBER} --body "Not creating port issue, milestone ${MILESTONE} does not exist or is not an open milestone"
echo "milestone_exists=false" >> $GITHUB_ENV
fi
- name: Get target branch
if: ${{ env.is_member == 'true' }} && ${{ env.milestone_exists == 'true' }}
env:
COMMENT_BODY: ${{ github.event.comment.body }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
TYPE=$(echo "${COMMENT_BODY}" | awk '{ print $1 }' | sed -e 's_/__')
echo "Type: ${TYPE}" >> $GITHUB_STEP_SUMMARY
echo "type=${TYPE}" >> $GITHUB_ENV
TARGET_BRANCH=$(echo "${COMMENT_BODY}" | awk '{ print $3 }')
echo "Target brach: ${TARGET_BRANCH}" >> $GITHUB_STEP_SUMMARY
echo "target_branch=${TARGET_BRANCH}" >> $GITHUB_ENV
if gh api repos/${GITHUB_REPOSITORY}/branches --paginate | jq -e --arg TARGET_BRANCH "$TARGET_BRANCH" '.[] | select(.name == $TARGET_BRANCH)' > /dev/null; then
echo "target_branch_exists=true" >> $GITHUB_ENV
else
echo "target_branch_exists=false" >> $GITHUB_ENV
fi
- name: Checkout
if: ${{ env.is_member == 'true' }} && ${{ env.milestone_exists == 'true' }} && ${{ env.target_branch_exists == 'true' }}
uses: actions/checkout@v4
with:
ref: ${{ env.target_branch }}
fetch-depth: '0'
token: ${{ secrets.GITHUB_TOKEN }}
- name: Port PR
if: ${{ env.is_member == 'true' }} && ${{ env.milestone_exists == 'true' }} && ${{ env.target_branch_exists == 'true' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ORIGINAL_ISSUE_NUMBER: ${{ github.event.issue.number }}
TYPE: ${{ env.type }}
TARGET_BRANCH: ${{ env.target_branch }}
MILESTONE: ${{ env.milestone }}
run: |
PATCH_FILE=$(mktemp)
gh pr diff $ORIGINAL_ISSUE_NUMBER --patch > $PATCH_FILE
BRANCH="gha-portpr-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}"
echo "branch=${BRANCH}" >> $GITHUB_ENV
git config --global user.email "[email protected]"
git config --global user.name "Rancher Dashboard Port Bot"
git checkout -b $BRANCH
git am -3 "$PATCH_FILE" 2> error.log
GIT_AM_EXIT_CODE=$?

if [ "$GIT_AM_EXIT_CODE" -ne 0 ]; then
ERROR_MESSAGE=$(cat error.log)
FORMATTED_ERROR_MESSAGE=$(printf "\n```\n%s\n```" "$ERROR_MESSAGE")
gh issue comment ${ORIGINAL_ISSUE_NUMBER} --body "Not creating port PR, there was an error running git am -3: $FORMATTED_ERROR_MESSAGE"
else
git push origin $BRANCH
ORIGINAL_PR=$(gh pr view ${ORIGINAL_ISSUE_NUMBER} --json title,body,assignee)
ORIGINAL_TITLE=$(echo "${ORIGINAL_PR}" | jq -r .title)
ORIGINAL_ASSIGNEE=$(echo "${ORIGINAL_PR}" | jq -r '.assignee.login // empty')
BODY=$(mktemp)
echo -e "This is an automated request to port PR #${ORIGINAL_ISSUE_NUMBER} by @${GITHUB_ACTOR}\n\n" > $BODY
echo -e "Original PR body:\n\n" >> $BODY
echo "${ORIGINAL_PR}" | jq -r .body >> $BODY
NEW_PR=$(gh pr create --title="[${TYPE} ${MILESTONE}] ${ORIGINAL_TITLE}" --body-file="${BODY}" --head "${BRANCH}" --base "${TARGET_BRANCH}" --milestone "${MILESTONE}" --assignee "${ORIGINAL_ASSIGNEE}")
echo "Port PR created: ${NEW_PR}" >> $GITHUB_STEP_SUMMARY
fi
4 changes: 4 additions & 0 deletions cypress/e2e/po/components/checkbox-input.po.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ export default class CheckboxInputPo extends ComponentPo {
return this.input().find('span.checkbox-custom').should('not.have.attr', 'aria-checked', 'true');
}

getCheckboxLabel(): Cypress.Chainable {
return this.input().find('.checkbox-label').invoke('text');
}

isDisabled(): Cypress.Chainable {
return this.input().then((el) => {
expect(el).attr('class').to.include('disabled');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@ export default class ClusterManagerCreatePagePo extends ClusterManagerCreateImpo
return new ToggleSwitchPo('.toggle-container', this.self());
}

rkeToggleExistance(assertion: string) {
this.self().find('.toggle-container').should(assertion);
}

gridElementExistance(groupIndex = 0, itemIndex = 0, assertion: string) {
this.self().find(`[data-testid="cluster-manager-create-grid-${ groupIndex }-${ itemIndex }"]`).should(assertion);
}

selectKubeProvider(index: number) {
return this.resourceDetail().cruResource().selectSubType(0, index).click();
}
Expand Down
4 changes: 4 additions & 0 deletions cypress/e2e/po/pages/preferences.po.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ export default class PreferencesPagePo extends PagePo {
return new CheckboxInputPo('[data-testid="prefs__hideDescriptions"]');
}

verifyHideDescriptionsCheckboxLabel() {
return this.hideDescriptionsCheckbox().getCheckboxLabel().should('equal', 'Hide Type Description banners above resource lists ');
}

landingPageRadioBtn(): RadioGroupInputPo {
return new RadioGroupInputPo('[data-testid="prefs__landingPagePreference"]');
}
Expand Down
7 changes: 7 additions & 0 deletions cypress/e2e/po/side-bars/product-side-nav.po.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,11 @@ export default class ProductNavPo extends ComponentPo {
return this.self().should('exist').find('.child.nav-type a .label').contains(label)
.click({ force: true });
}

/**
* Check existance of menu group by label
*/
navToSideMenuGroupByLabelExistance(label: string, assertion: string): Cypress.Chainable {
return this.self().should('exist').contains('.accordion.has-children', label).should(assertion);
}
}
3 changes: 3 additions & 0 deletions cypress/e2e/tests/pages/manager/cloud-credentials.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ describe('Cloud Credentials', { testIsolation: 'off', tags: ['@manager', '@jenki

before(() => {
cy.login();
});

beforeEach(() => {
cy.createE2EResourceName('cloudCredential').as('cloudCredentialName');
});

Expand Down
60 changes: 55 additions & 5 deletions cypress/e2e/tests/pages/manager/cluster-manager.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { snapshot } from '@/cypress/e2e/blueprints/manager/cluster-snapshots';
import HomePagePo from '@/cypress/e2e/po/pages/home.po';
import { nodeDriveResponse } from '@/cypress/e2e/tests/pages/manager/mock-responses';
import LabeledSelectPo from '@/cypress/e2e/po/components/labeled-select.po';
import ProductNavPo from '@/cypress/e2e/po/side-bars/product-side-nav.po';

// At some point these will come from somewhere central, then we can make tools to remove resources from this or all runs
const runTimestamp = +new Date();
Expand All @@ -43,6 +44,43 @@ describe('Cluster Manager', { testIsolation: 'off', tags: ['@manager', '@adminUs
cy.login();
});

// testing https://github.com/rancher/dashboard/issues/9823
it('Toggling the user preference "rke1-ui" to false should not display RKE toggle on cluster creation screen and hide RKE1 resources from nav', () => {
cy.intercept('GET', 'v1/management.cattle.io.features?*', {
type: 'collection',
resourceType: 'management.cattle.io.feature',
data: [
{
id: 'rke1-ui',
type: 'management.cattle.io.feature',
kind: 'Feature',
spec: { value: false },
status: {
default: true,
description: 'Disable RKE1 provisioning',
dynamic: false,
lockedValue: false
}
}
]
}).as('featuresGet');

const clusterCreate = new ClusterManagerCreatePagePo();

clusterCreate.goTo();
clusterCreate.waitForPage();

// seems like the waitForPage does await for full DOM render, so let's wait for a simple assertion
// like "gridElementExists" to make sure we aren't creating a fake assertion with the toggle
clusterCreate.gridElementExistance(0, 0, 'exist');
clusterCreate.rkeToggleExistance('not.exist');

const sideNav = new ProductNavPo();

// check that the nav group isn't visible anymore
sideNav.navToSideMenuGroupByLabelExistance('RKE1 Configuration', 'not.exist');
});

describe('All providers', () => {
providersList.forEach((prov) => {
prov.conditions.forEach((condition) => {
Expand Down Expand Up @@ -91,6 +129,15 @@ describe('Cluster Manager', { testIsolation: 'off', tags: ['@manager', '@adminUs
clusterList.createCluster();

createRKE2ClusterPage.waitForPage();

// Test for https://github.com/rancher/dashboard/issues/9823 (default is feature flag 'rke1-ui' = true)
createRKE2ClusterPage.rkeToggleExistance('exist');

const sideNav = new ProductNavPo();

sideNav.navToSideMenuGroupByLabelExistance('RKE1 Configuration', 'exist');
// EO test for https://github.com/rancher/dashboard/issues/9823

createRKE2ClusterPage.rkeToggle().set('RKE2/K3s');

createRKE2ClusterPage.selectCustom(0);
Expand Down Expand Up @@ -165,13 +212,15 @@ describe('Cluster Manager', { testIsolation: 'off', tags: ['@manager', '@adminUs

it('can download KubeConfig', () => {
clusterList.goTo();
cy.intercept('POST', '/v3/clusters/**').as('generateKubeconfig');
clusterList.list().actionMenu(rke2CustomName).getMenuItem('Download KubeConfig').click();
cy.wait('@generateKubeconfig').its('response.statusCode').should('eq', 200);

const downloadedFilename = path.join(downloadsFolder, `${ rke2CustomName }.yaml`);

cy.readFile(downloadedFilename).then((buffer) => {
// This will throw an exception which will fail the test if not valid yaml
const obj = jsyaml.load(buffer);
const obj: any = jsyaml.load(buffer);

// Basic checks on the downloaded YAML
expect(obj.clusters.length).to.equal(1);
Expand Down Expand Up @@ -392,7 +441,7 @@ describe('Cluster Manager', { testIsolation: 'off', tags: ['@manager', '@adminUs
editImportedClusterPage.waitForPage('mode=edit');
});

it('can delete cluster by bulk actions', { viewportHeight: 1000, viewportWidth: 660 }, () => {
it('can delete cluster by bulk actions', () => {
clusterList.goTo();
clusterList.sortableTable().rowElementWithName(importGenericName).should('exist', { timeout: 15000 });
clusterList.sortableTable().rowSelectCtlWithName(importGenericName).set();
Expand Down Expand Up @@ -445,7 +494,7 @@ describe('Cluster Manager', { testIsolation: 'off', tags: ['@manager', '@adminUs
clusterList.list().resourceTable().sortableTable().rowElementWithName('local')
.click();
clusterList.list().openBulkActionDropdown();
clusterList.list().bulkActionButton('Download YAML').click();
clusterList.list().bulkActionButton('Download YAML').click({ force: true });
const downloadedFilename = path.join(downloadsFolder, `local.yaml`);

cy.readFile(downloadedFilename).then((buffer) => {
Expand All @@ -465,8 +514,9 @@ describe('Cluster Manager', { testIsolation: 'off', tags: ['@manager', '@adminUs
ClusterManagerListPagePo.navTo();
clusterList.list().resourceTable().sortableTable().rowElementWithName('local')
.click();
clusterList.list().openBulkActionDropdown();
clusterList.list().bulkActionButton('Download KubeConfig').click();
cy.intercept('POST', '/v3/clusters/local?action=generateKubeconfig').as('generateKubeConfig');
clusterList.list().downloadKubeConfig().click({ force: true });
cy.wait('@generateKubeConfig').its('response.statusCode').should('eq', 200);
const downloadedFilename = path.join(downloadsFolder, 'local.yaml');

cy.readFile(downloadedFilename).then((buffer) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,24 @@ describe('Provision Node driver RKE2 cluster', { testIsolation: 'off', tags: ['@
before(() => {
cy.login();
HomePagePo.goTo();

// clean up cloud credentials
cy.getRancherResource('v3', 'cloudcredentials', null, null).then((resp: Cypress.Response<any>) => {
const body = resp.body;

if (body.pagination['total'] > 0) {
for (const i in body.data) {
const id = body.data[i]['id'];

cy.deleteRancherResource('v3', 'cloudcredentials', id);
}
} else {
cy.log('There are no existing cloud credentials to delete');
}
});
});

beforeEach(() => {
cy.createE2EResourceName('rke2ec2cluster').as('rke2Ec2ClusterName');
cy.createE2EResourceName('ec2cloudcredential').as('ec2CloudCredentialName');
});
Expand All @@ -36,7 +54,9 @@ describe('Provision Node driver RKE2 cluster', { testIsolation: 'off', tags: ['@
cloudCredForm.accessKey().set(Cypress.env('awsAccessKey'));
cloudCredForm.secretKey().set(Cypress.env('awsSecretKey'), true);
cloudCredForm.defaultRegion().toggle();
cloudCredForm.defaultRegion().clickOptionWithLabel('us-west-2');
cloudCredForm.defaultRegion().clickOptionWithLabel('us-west-1');

cy.intercept('GET', '/v1/management.cattle.io.users?exclude=metadata.managedFields').as('pageLoad');
cloudCredForm.saveCreateForm().cruResource().saveAndWaitForRequests('POST', '/v3/cloudcredentials').then((req) => {
expect(req.response?.statusCode).to.equal(201);
cloudcredentialId = req.response?.body.id;
Expand All @@ -45,6 +65,7 @@ describe('Provision Node driver RKE2 cluster', { testIsolation: 'off', tags: ['@

const loadingPo = new LoadingPo('.loading-indicator');

cy.wait('@pageLoad').its('response.statusCode').should('eq', 200);
loadingPo.checkNotExists();
createRKE2ClusterPage.nameNsDescription().name().set(this.rke2Ec2ClusterName);
createRKE2ClusterPage.nameNsDescription().description().set(`${ this.rke2Ec2ClusterName }-description`);
Expand All @@ -57,7 +78,7 @@ describe('Provision Node driver RKE2 cluster', { testIsolation: 'off', tags: ['@
createRKE2ClusterPage.basicsTab().kubernetesVersions().clickOption(1);

createRKE2ClusterPage.machinePoolTab().networks().toggle();
createRKE2ClusterPage.machinePoolTab().networks().clickOption(3);
createRKE2ClusterPage.machinePoolTab().networks().clickOptionWithLabel('maxdualstack-vpc');

cy.intercept('POST', 'v1/provisioning.cattle.io.clusters').as('createRke2Cluster');
createRKE2ClusterPage.create();
Expand Down
5 changes: 5 additions & 0 deletions cypress/e2e/tests/pages/manager/drivers.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ describe('Drivers', { testIsolation: 'off', tags: ['@manager', '@adminUser'] },
const downloadUrl = 'https://github.com/rancher-plugins/kontainer-engine-driver-example/releases/download/v0.2.3/kontainer-engine-driver-example-copy1-linux-amd64';

RkeDriversPagePo.navTo();
driversPage.waitForPage();
driversPage.addClusterDriver().click();
driversPage.createEditClusterDriver().formInput(2).set(downloadUrl);
cy.intercept('POST', '/v3/kontainerdriver').as('createDriver');
Expand All @@ -40,6 +41,7 @@ describe('Drivers', { testIsolation: 'off', tags: ['@manager', '@adminUser'] },
const downloadUrl = 'https://github.com/rancher-plugins/kontainer-engine-driver-example/releases/download/v0.2.3/kontainer-engine-driver-example-copy2-linux-amd64';

RkeDriversPagePo.navTo();
driversPage.waitForPage();
driversPage.list().rowActionMenuOpen(`Example`);
driversPage.actionMenu().selectMenuItemByLabel(`Edit`);
driversPage.createEditClusterDriver().formInput(2).set(downloadUrl);
Expand All @@ -51,6 +53,7 @@ describe('Drivers', { testIsolation: 'off', tags: ['@manager', '@adminUser'] },

it('can deactivate a cluster driver', () => {
RkeDriversPagePo.navTo();
driversPage.waitForPage();
driversPage.list().rowActionMenuOpen(`Example`);
driversPage.actionMenu().selectMenuItemByLabel(`Deactivate`);
cy.intercept('POST', '/v3/kontainerDrivers/*').as('deactivateDriver');
Expand All @@ -61,6 +64,7 @@ describe('Drivers', { testIsolation: 'off', tags: ['@manager', '@adminUser'] },

it('can activate a cluster driver', () => {
RkeDriversPagePo.navTo();
driversPage.waitForPage();
driversPage.list().rowActionMenuOpen(`Example`);
cy.intercept('POST', '/v3/kontainerDrivers/*').as('activateDriver');
driversPage.actionMenu().selectMenuItemByLabel(`Activate`);
Expand All @@ -70,6 +74,7 @@ describe('Drivers', { testIsolation: 'off', tags: ['@manager', '@adminUser'] },

it('can delete a cluster driver', () => {
RkeDriversPagePo.navTo();
driversPage.waitForPage();
driversPage.list().rowActionMenuOpen(`Example`);
driversPage.actionMenu().selectMenuItemByLabel(`Delete`);
cy.intercept('DELETE', '/v3/kontainerDrivers/*').as('deleteDriver');
Expand Down
5 changes: 4 additions & 1 deletion cypress/e2e/tests/pages/manager/machine-deployments.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ describe('MachineDeployments', { testIsolation: 'off', tags: ['@manager', '@admi

before(() => {
cy.login();
});

beforeEach(() => {
cy.createE2EResourceName('machinedeployments').as('machineDeploymentsName');
});

Expand Down Expand Up @@ -103,7 +106,7 @@ describe('MachineDeployments', { testIsolation: 'off', tags: ['@manager', '@admi

it('can download YAML', function() {
MachineDeploymentsPagePo.navTo();
machineDeploymentsPage.list().actionMenu(this.machineDeploymentsName).getMenuItem('Download YAML').click();
machineDeploymentsPage.list().actionMenu(this.machineDeploymentsName).getMenuItem('Download YAML').click({ force: true });

const downloadedFilename = path.join(downloadsFolder, `${ this.machineDeploymentsName }.yaml`);

Expand Down
Loading