Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Terry Clancy 204 posts 944 karma points
    Apr 26, 2018 @ 07:17
    Terry Clancy
    0

    Our.Umbraco.Community.Tests causes missing “Culture and Hostnames” menu Item in Umbraco contextmenu

    Dear Umbraco Folk,

    As detailed at :

    https://stackoverflow.com/questions/29756510/missing-culture-and-hostnames-menuitem-in-umbraco-contextmenu/29756511#29756511

    use of Our.Umbraco.Community.Tests and the related Umbraco.Tests.dll when unit testing, results in the “Culture and Hostnames” missing as a menu Item in Umbraco contextmenu.

    As described at that locaton:

    When checking the permissions for a user the users default-permissions are fetched from the database as a string of chars; E.g. the admin users default-permissions are: CADMOSKTPIURZ:5F7
    
    Each letter will allow certain actions(IActions) to be allowed by the user. 
    
    The problem occurred because we had deployed the "Umbraco.Tests.dll" to the environment, which contained an IAction with the same permission-letter as the AssignDomain action ("ActionAssignDomain.cs"). This caused the "Cultures and Hostnames" menu-item to be removed from the resulting menu-item list. 
    

    My question is this: given all of the above how exactly should I then resolve this issue (without removing Umbraco.Tests) . I need to modify “Culture and Hostnames”.

    Thanks

    Terry Clancy

    ClanceZ

  • Dave Woestenborghs 3504 posts 12133 karma points MVP 8x admin c-trib
    May 02, 2018 @ 07:51
    Dave Woestenborghs
    0

    Hi Terry,

    These dll are only meant for being used in your test project. They should not be in the bin folder of your web application.

    Dave

  • Terry Clancy 204 posts 944 karma points
    May 31, 2018 @ 07:28
    Terry Clancy
    0

    Dave,

    Thank you for your response.

    I started trying to put by tests in a separate project but found I had so many dependencies on the web application that I needed to run it as part of that project to get my tests to run. They all run very nicely now - it seems to be a pity to force such a constraint.

    So, I assume you are saying that that is bad practice and I should revert to trying to separate tests into a different project. OK that will take some time and I am not sure if it is going to be possible so please confirm if my understanding is correct before I proceed and try and do that.

    Terry Clancy ClanceZ

  • Dave Woestenborghs 3504 posts 12133 karma points MVP 8x admin c-trib
    May 31, 2018 @ 07:35
    Dave Woestenborghs
    0

    Hi Terry,

    I always put my tests in a seperate project. Rule of thumb is one test project per VS project. Some times I even have 2 test projects per VS project to split up my unit and integration tests.

    I also never write any code, except for views in my web project. Only in my own class libraries. So I haven't faced the issue you are having.

    Dave

Please Sign in or register to post replies

Write your reply to:

Draft