Skip to content

Commit

Permalink
Fixed UnitInput value not being set correctly in monitoring (#12438)
Browse files Browse the repository at this point in the history
* fixed UnitInput value not being set correctly in monitoring

* Tweak to improve e2e test reliability

---------

Co-authored-by: Neil MacDougall <nmacdougall@suse.com>
  • Loading branch information
eva-vashkevich and nwmac authored Oct 31, 2024
1 parent 69fa9ec commit 3c808b4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cypress/e2e/tests/pages/fleet/gitrepo.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ describe('Git Repo', { testIsolation: 'off', tags: ['@fleet', '@adminUser'] }, (
prefPage.languageDropdownMenu().isOpened();

cy.intercept('PUT', 'v1/userpreferences/*').as(`prefUpdateEnUs`);
prefPage.languageDropdownMenu().clickOption(1);
prefPage.languageDropdownMenu().clickOptionWithLabel('English');
cy.wait('@prefUpdateEnUs').then(({ response }) => {
expect(response?.statusCode).to.eq(200);
expect(response?.body.data).to.have.property('locale', 'en-us');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ export default {
return undefined;
},
set(v) {
this.value['for'] = [null, undefined].includes(v ? undefined : `${ v }s`);
this.value['for'] = [null, undefined].includes(v) ? undefined : `${ v }s`;
}
}
},
Expand Down
2 changes: 1 addition & 1 deletion shell/edit/monitoring.coreos.com.prometheusrule/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export default {
},
updateGroupInterval(group, interval) {
group['interval'] = [null, undefined].includes(interval ? undefined : `${ interval }s`);
group['interval'] = [null, undefined].includes(interval) ? undefined : `${ interval }s`;
},
getGroupInterval(interval) {
Expand Down

0 comments on commit 3c808b4

Please sign in to comment.