From e777911567ad0a5b57e2d9cf50f60e9f4272cd5d Mon Sep 17 00:00:00 2001 From: dmcintyr-akamai Date: Mon, 2 Feb 2026 11:49:56 -0500 Subject: [PATCH 1/4] refine filter to linode clone --- .../e2e/core/linodes/clone-linode.spec.ts | 30 ++++++++++++------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/packages/manager/cypress/e2e/core/linodes/clone-linode.spec.ts b/packages/manager/cypress/e2e/core/linodes/clone-linode.spec.ts index 43dce38bf2c..45cb48d03d8 100644 --- a/packages/manager/cypress/e2e/core/linodes/clone-linode.spec.ts +++ b/packages/manager/cypress/e2e/core/linodes/clone-linode.spec.ts @@ -145,18 +145,26 @@ describe('clone linode', () => { // Change the way to check the clone progress due to M3-9860 cy.wait('@cloneEvents').then((xhr) => { const eventData: Event[] = xhr.response?.body?.data; - const cloneEvent = eventData.filter( - (event: Event) => event['action'] === 'linode_clone' + const cloneEvents = eventData.filter( + (event: Event) => + event['action'] === 'linode_clone' && + event.entity && + event.entity.label === newLinodeLabel ); - cy.get('[id="menu-button--notification-events-menu"]') - .should('be.visible') - .click(); - cy.get(`[data-qa-event="${cloneEvent[0]['id']}"]`).should('be.visible'); - cy.get('[data-testid="linear-progress"]').should('be.visible'); - // The progress bar should disappear when the clone is done. - cy.get('[data-testid="linear-progress"]', { - timeout: LINODE_CLONE_TIMEOUT, - }).should('not.exist'); + const cloneEvent = cloneEvents[0]; + if (cloneEvent) { + cy.get('[id="menu-button--notification-events-menu"]').as( + 'btnEventsMenu' + ); + cy.get('@btnEventsMenu').scrollIntoView(); + cy.get('@btnEventsMenu').should('be.visible').click(); + cy.get(`[data-qa-event="${cloneEvent['id']}"]`).should('be.visible'); + cy.get('[data-testid="linear-progress"]').should('be.visible'); + // The progress bar should disappear when the clone is done. + cy.get('[data-testid="linear-progress"]', { + timeout: LINODE_CLONE_TIMEOUT, + }).should('not.exist'); + } }); cy.visit('/linodes'); From 33d40fe65b03f8645f2710c5fd84648a1d717633 Mon Sep 17 00:00:00 2001 From: dmcintyr-akamai Date: Mon, 2 Feb 2026 12:00:01 -0500 Subject: [PATCH 2/4] Added changeset: Fix flakey clone-linode.spec.ts --- packages/manager/.changeset/pr-13353-tests-1770051601619.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 packages/manager/.changeset/pr-13353-tests-1770051601619.md diff --git a/packages/manager/.changeset/pr-13353-tests-1770051601619.md b/packages/manager/.changeset/pr-13353-tests-1770051601619.md new file mode 100644 index 00000000000..1d92e0087bf --- /dev/null +++ b/packages/manager/.changeset/pr-13353-tests-1770051601619.md @@ -0,0 +1,5 @@ +--- +"@linode/manager": Tests +--- + +Fix flakey clone-linode.spec.ts ([#13353](https://github.com/linode/manager/pull/13353)) From b097616051b4463a80e75d9ab715773c4d406f0d Mon Sep 17 00:00:00 2001 From: dmcintyr-akamai Date: Mon, 2 Feb 2026 16:43:56 -0500 Subject: [PATCH 3/4] Apply suggestion from @dwiley-akamai Co-authored-by: Dajahi Wiley <114682940+dwiley-akamai@users.noreply.github.com> --- packages/manager/.changeset/pr-13353-tests-1770051601619.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/manager/.changeset/pr-13353-tests-1770051601619.md b/packages/manager/.changeset/pr-13353-tests-1770051601619.md index 1d92e0087bf..1bc2ebf6dd1 100644 --- a/packages/manager/.changeset/pr-13353-tests-1770051601619.md +++ b/packages/manager/.changeset/pr-13353-tests-1770051601619.md @@ -2,4 +2,4 @@ "@linode/manager": Tests --- -Fix flakey clone-linode.spec.ts ([#13353](https://github.com/linode/manager/pull/13353)) +Fix flaky clone-linode.spec.ts ([#13353](https://github.com/linode/manager/pull/13353)) From 81085cbb3878d9aa03c020e6e812082eedfd576a Mon Sep 17 00:00:00 2001 From: dmcintyr-akamai Date: Tue, 3 Feb 2026 12:38:21 -0500 Subject: [PATCH 4/4] simpify, remove queries to event data --- .../e2e/core/linodes/clone-linode.spec.ts | 48 ++++--------------- 1 file changed, 10 insertions(+), 38 deletions(-) diff --git a/packages/manager/cypress/e2e/core/linodes/clone-linode.spec.ts b/packages/manager/cypress/e2e/core/linodes/clone-linode.spec.ts index 45cb48d03d8..434d839b5ef 100644 --- a/packages/manager/cypress/e2e/core/linodes/clone-linode.spec.ts +++ b/packages/manager/cypress/e2e/core/linodes/clone-linode.spec.ts @@ -16,10 +16,7 @@ import { dcPricingMockLinodeTypes, dcPricingRegionDifferenceNotice, } from 'support/constants/dc-specific-pricing'; -import { - LINODE_CLONE_TIMEOUT, - LINODE_CREATE_TIMEOUT, -} from 'support/constants/linodes'; +import { LINODE_CREATE_TIMEOUT } from 'support/constants/linodes'; import { mockGetLinodeConfigs } from 'support/intercepts/configs'; import { interceptEvents } from 'support/intercepts/events'; import { mockAppendFeatureFlags } from 'support/intercepts/feature-flags'; @@ -47,7 +44,7 @@ import { } from 'support/util/random'; import { chooseRegion, extendRegion } from 'support/util/regions'; -import type { Event, Linode } from '@linode/api-v4'; +import type { Linode } from '@linode/api-v4'; /** * Returns the Cloud Manager URL to clone a given Linode. @@ -138,42 +135,17 @@ describe('clone linode', () => { const newLinodeId = xhr.response?.body?.id; assert.equal(xhr.response?.statusCode, 200); cy.url().should('endWith', `linodes/${newLinodeId}/metrics`); - }); - ui.toast.assertMessage(`Your Linode ${newLinodeLabel} is being created.`); - - // Change the way to check the clone progress due to M3-9860 - cy.wait('@cloneEvents').then((xhr) => { - const eventData: Event[] = xhr.response?.body?.data; - const cloneEvents = eventData.filter( - (event: Event) => - event['action'] === 'linode_clone' && - event.entity && - event.entity.label === newLinodeLabel + ui.toast.assertMessage( + `Your Linode ${newLinodeLabel} is being created.` ); - const cloneEvent = cloneEvents[0]; - if (cloneEvent) { - cy.get('[id="menu-button--notification-events-menu"]').as( - 'btnEventsMenu' - ); - cy.get('@btnEventsMenu').scrollIntoView(); - cy.get('@btnEventsMenu').should('be.visible').click(); - cy.get(`[data-qa-event="${cloneEvent['id']}"]`).should('be.visible'); - cy.get('[data-testid="linear-progress"]').should('be.visible'); - // The progress bar should disappear when the clone is done. - cy.get('[data-testid="linear-progress"]', { - timeout: LINODE_CLONE_TIMEOUT, - }).should('not.exist'); - } + // breadcrumb link + cy.get('[data-testid="editable-text').within(() => { + cy.findByText(newLinodeLabel).should('be.visible'); + }); + // status of new clone is offline + cy.findByText('OFFLINE').should('be.visible'); }); - - cy.visit('/linodes'); - cy.findByText(newLinodeLabel, { timeout: LINODE_CLONE_TIMEOUT }).should( - 'be.visible' - ); - cy.findByText(linode.label, { timeout: LINODE_CLONE_TIMEOUT }).should( - 'be.visible' - ); }); });