-
-
-
- {updatesAvailable ? 'Back to all Add-ons': 'Check for Updates'}
-
-
- Start all Modules
-
- {buttonsInstance}
-
-
-
+ {allowWebAdmin ?
+ isAdmin ?
+
+
+
+ {updatesAvailable ? 'Back to all Addons': 'Check for Updates'}
+
+
+ Start all Modules
+
+ {buttonsInstance}
+
+
+
+ : null
+ :
+ Settings, upload and check updates are disabled from the website at this time. The runtime property module.allow_web_admin must be set to true.
+
+
+ }
@@ -934,13 +1037,14 @@ export default class ManageApps extends React.Component {
{showMsg && alert}
', () => {
// simulate a selected file in order to render upload and clear buttons
renderedComponent.setState({
isSearched: true,
+ isAdmin: true,
files: [{
name: "test.zip",
type: "application/zip"
@@ -51,7 +52,7 @@ describe('
', () => {
it('should mount the AddAddon component in itself', () => {
expect(renderedComponent.find("AddAddon")).to.have.length(1);
});
-
+
it('Should render clear and upload buttons when file is selected', () => {
const AddAddon = renderedComponent.find("AddAddon").first();
expect(AddAddon.find("#upload-btn").first().length).to.equal(1);