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

UI bug fix: Kubernetes Role filter replace with explicit input filter #27178

Merged
merged 15 commits into from
Jun 3, 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
Prev Previous commit
Next Next commit
address pr feedback
  • Loading branch information
Monkeychip committed May 23, 2024
commit 128de0203526ed7a05299c705c8e27904e387e7f
8 changes: 1 addition & 7 deletions ui/lib/kubernetes/addon/components/page/roles.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,7 @@ export default class RolesPageComponent extends Component {

navigate(pageFilter) {
const route = `${this.mountPoint}.roles.index`;
const args = [route];

args.push({
queryParams: {
pageFilter: pageFilter ? pageFilter : null,
},
});
const args = [route, { queryParams: { pageFilter: pageFilter || null } }];
this.router.transitionTo(...args);
}

Expand Down
12 changes: 3 additions & 9 deletions ui/tests/integration/components/filter-input-explicit-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ module('Integration | Component | filter-input-explicit', function (hooks) {
});

test('it renders', async function (assert) {
assert.expect(2);
this.query = 'foo';
await this.renderComponent();

Expand All @@ -40,10 +39,7 @@ module('Integration | Component | filter-input-explicit', function (hooks) {

test('it should call handleSearch on submit', async function (assert) {
assert.expect(1);

this.handleSearch = () => {
assert.ok(true, 'handleSearch was called');
};
this.handleSearch.calledOnce;

await this.renderComponent();
await typeIn(GENERAL.filterInputExplicit, 'bar');
Expand All @@ -53,14 +49,12 @@ module('Integration | Component | filter-input-explicit', function (hooks) {
test('it should send keydown event on keydown', async function (assert) {
assert.expect(3); // handle key down called twice

this.handleKeyDown = () => {
assert.ok(true, 'handleKeydown was called');
};
assert.true(this.handleKeydown.calledTwice);

await this.renderComponent();
await typeIn(GENERAL.filterInputExplicit, 'a');
await typeIn(GENERAL.filterInputExplicit, 'b');

assert.ok(this.handleSearch.notCalled);
assert.true(this.handleSearch.notCalled);
});
});
Loading