diff --git a/cypress/e2e/po/components/namespace-filter.po.ts b/cypress/e2e/po/components/namespace-filter.po.ts index 4747326ffa6..154129d3b2f 100644 --- a/cypress/e2e/po/components/namespace-filter.po.ts +++ b/cypress/e2e/po/components/namespace-filter.po.ts @@ -30,7 +30,7 @@ export class NamespaceFilterPo extends ComponentPo { } searchByName(label: string) { - return this.self().find('.ns-controls > .ns-input').clear().type(label); + return this.self().find('.ns-controls > .ns-input > .ns-filter-input').clear().type(label); } clearSearchFilter() { diff --git a/cypress/e2e/tests/pages/explorer2/namespace-picker.spec.ts b/cypress/e2e/tests/pages/explorer2/namespace-picker.spec.ts index df30dfee8ff..815140b2c2b 100644 --- a/cypress/e2e/tests/pages/explorer2/namespace-picker.spec.ts +++ b/cypress/e2e/tests/pages/explorer2/namespace-picker.spec.ts @@ -154,6 +154,18 @@ describe('Namespace picker', { testIsolation: 'off' }, () => { namespacePicker.checkIcon().should('have.length', 1); }); + it('can filter after making a selection', { tags: ['@explorer2', '@adminUser', '@standardUser'] }, () => { + namespacePicker.toggle(); + + // Select 'Project: Default' + namespacePicker.clickOptionByLabel('Project: Default'); + namespacePicker.isChecked('Project: Default'); + namespacePicker.checkIcon().should('have.length', 1); + + namespacePicker.searchByName('cattle-logging-system'); + namespacePicker.getOptions().find('.ns-option').should('have.length.gte', 1); + }); + it('can filter options by name', { tags: ['@explorer2', '@adminUser', '@standardUser'] }, () => { namespacePicker.toggle();