-
Notifications
You must be signed in to change notification settings - Fork 362
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
WIP: misc/license unit tests #1559
base: master
Are you sure you want to change the base?
Conversation
}); | ||
|
||
// Check that user is informed about a license that will expire. | ||
expect(screen.getByText(/Your Redpanda Enterprise license will expire in 27 days/)).toBeInTheDocument(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this may be sensitive to some timezone changes, we always default to GMT timezone, maybe you can say
const DAYS = 28
... expire in ${DAYS - 1}
return Math.floor(Date.now() / 1000) + daysOffset * 86400; | ||
}; | ||
|
||
vi.mock('../../state/backendApi', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you may need to keep the rest of the API intact, you can do so by
async (importOriginal) => {
const actual = await importOriginal();
return { ...actual, api: { ...actual.api, someChangeGoesHere };
}
58ae3b2
to
b099101
Compare
No description provided.