|
|
@ -90,7 +90,7 @@ describe('Plugin details page', () => { |
|
|
|
afterEach(() => { |
|
|
|
afterEach(() => { |
|
|
|
jest.clearAllMocks(); |
|
|
|
jest.clearAllMocks(); |
|
|
|
config.pluginAdminExternalManageEnabled = false; |
|
|
|
config.pluginAdminExternalManageEnabled = false; |
|
|
|
config.licenseInfo.hasValidLicense = false; |
|
|
|
config.licenseInfo.enabledFeatures = {}; |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
afterAll(() => { |
|
|
|
afterAll(() => { |
|
|
@ -325,7 +325,7 @@ describe('Plugin details page', () => { |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
it('should display an install button for enterprise plugins if license is valid', async () => { |
|
|
|
it('should display an install button for enterprise plugins if license is valid', async () => { |
|
|
|
config.licenseInfo.hasValidLicense = true; |
|
|
|
config.licenseInfo.enabledFeatures = { 'enterprise.plugins': true }; |
|
|
|
|
|
|
|
|
|
|
|
const { queryByRole } = renderPluginDetails({ id, isInstalled: false, isEnterprise: true }); |
|
|
|
const { queryByRole } = renderPluginDetails({ id, isInstalled: false, isEnterprise: true }); |
|
|
|
|
|
|
|
|
|
|
@ -333,7 +333,7 @@ describe('Plugin details page', () => { |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
it('should not display install button for enterprise plugins if license is invalid', async () => { |
|
|
|
it('should not display install button for enterprise plugins if license is invalid', async () => { |
|
|
|
config.licenseInfo.hasValidLicense = false; |
|
|
|
config.licenseInfo.enabledFeatures = {}; |
|
|
|
|
|
|
|
|
|
|
|
const { queryByRole, queryByText } = renderPluginDetails({ id, isInstalled: true, isEnterprise: true }); |
|
|
|
const { queryByRole, queryByText } = renderPluginDetails({ id, isInstalled: true, isEnterprise: true }); |
|
|
|
|
|
|
|
|
|
|
@ -772,7 +772,7 @@ describe('Plugin details page', () => { |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
it('should not display an install button for enterprise plugins if license is valid', async () => { |
|
|
|
it('should not display an install button for enterprise plugins if license is valid', async () => { |
|
|
|
config.licenseInfo.hasValidLicense = true; |
|
|
|
config.licenseInfo.enabledFeatures = { 'enterprise.plugins': true }; |
|
|
|
const { queryByRole, queryByText } = renderPluginDetails({ id, isInstalled: false, isEnterprise: true }); |
|
|
|
const { queryByRole, queryByText } = renderPluginDetails({ id, isInstalled: false, isEnterprise: true }); |
|
|
|
|
|
|
|
|
|
|
|
await waitFor(() => expect(queryByText(PluginTabLabels.OVERVIEW)).toBeInTheDocument()); |
|
|
|
await waitFor(() => expect(queryByText(PluginTabLabels.OVERVIEW)).toBeInTheDocument()); |
|
|
|