From ad7be5372df63a94f15681c6ffaa5185799d7c6d Mon Sep 17 00:00:00 2001 From: Francesco Torchia Date: Mon, 20 Jan 2025 13:52:29 +0100 Subject: [PATCH] Remove class selector from fleet.cattle.io.test.ts Signed-off-by: Francesco Torchia --- shell/edit/__tests__/fleet.cattle.io.gitrepo.test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/shell/edit/__tests__/fleet.cattle.io.gitrepo.test.ts b/shell/edit/__tests__/fleet.cattle.io.gitrepo.test.ts index 96bbee8b877..a035d41d1ce 100644 --- a/shell/edit/__tests__/fleet.cattle.io.gitrepo.test.ts +++ b/shell/edit/__tests__/fleet.cattle.io.gitrepo.test.ts @@ -35,18 +35,18 @@ describe('view: fleet.cattle.io.gitrepo should', () => { it('should have self-healing checkbox and tooltip', () => { const correctDriftCheckbox = wrapper.find('[data-testid="GitRepo-correctDrift-checkbox"]'); - const tooltip = wrapper.findAll('[data-testid="GitRepo-correctDrift-checkbox"] .v-popper--has-tooltip'); + const tooltip = wrapper.find('[data-testid="GitRepo-correctDrift-checkbox"]'); - expect(tooltip).toHaveLength(1); + expect(tooltip.element.classList).toContain('v-popper--has-tooltip'); expect(correctDriftCheckbox.exists()).toBeTruthy(); expect(correctDriftCheckbox.attributes().value).toBeFalsy(); }); it('should have keep-resources checkbox and tooltip', () => { const correctDriftCheckbox = wrapper.find('[data-testid="GitRepo-keepResources-checkbox"]'); - const tooltip = wrapper.findAll('[data-testid="GitRepo-keepResources-checkbox"] .v-popper--has-tooltip'); + const tooltip = wrapper.find('[data-testid="GitRepo-keepResources-checkbox"]'); - expect(tooltip).toHaveLength(1); + expect(tooltip.element.classList).toContain('v-popper--has-tooltip'); expect(correctDriftCheckbox.exists()).toBeTruthy(); expect(correctDriftCheckbox.attributes().value).toBeFalsy(); });