Тесты SpecFlow не работают в OrchardCMS 1.4 - PullRequest
0 голосов
/ 21 марта 2012

Как запустить тесты SpecFlow в OrchardCMS 1.4?

Шаги:

  1. Загрузите OrchardCMS с здесь .
  2. Запустите тест UsersFeature.ICanCreateANewUser ().(БЕЗ СОЗДАНИЯ ВСЕХ РЕШЕНИЙ!)
  3. Результат сессий модульного тестирования - окно сеанса:

    <code>...
    error:   Unable to locate <input> name SiteName in page html:
    
    <html>
    <head>
        <title>A 'script' named 'jQuery' could not be found.</title>
        <style>
        ...
        </style>
    </head>
    
    <body bgcolor="white">
            <span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1>
            <h2> <i>A 'script' named 'jQuery' could not be found.</i> </h2></span>
    ...
    
        <b> Description: </b>An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
    
        <br><br>
    
        <b> Exception Details: </b>System.InvalidOperationException: A 'script' named 'jQuery' could not be found.<br><br>
    
        <b>Source Error:</b> <br><br>
    
        <table width=100% bgcolor="#ffffcc">
           <tr>
              <td>
                  <code><pre>
    
    Line 259:                    throw new                InvalidOperationException(String.Format(CultureInfo.CurrentCulture, &quot;A &#39;{1}&#39; named &#39;{0}&#39; could not be found.&quot;, settings.Name, settings.Type));
    Line 260:                }
    <font color=red>Line 261:                ExpandDependencies(resource, settings,         allResources);
    </font>Line 262:            }
    Line 263:            requiredResources = (from DictionaryEntry entry in allResources

    ИсточникФайл: ... OrchardCMS_1.4 \ src \ Orchard \ UI \ Resources \ ResourceManager.cs Строка: 261

    Трассировка стека:

Это показано для каждого теста в SpecFlow, который я пробовал.

Ответы [ 2 ]

0 голосов
/ 22 марта 2012

Не построено все решение.Следовательно, модуль Jquery не был построен, и там нет файлов сценариев JQuery.Глупая ошибка!

0 голосов
/ 21 марта 2012

пробовали ли вы с привлечением источника, а не с загрузкой версии 1.4?

...