Merge pull request #289 from bclozel:gh-286

* pr/289:
  Polish contribution
  Deselect incompatible deps when changing Boot version
  Upgrade to JQuery 3.1.0
This commit is contained in:
Stephane Nicoll 2016-09-16 17:25:20 +02:00
commit ddf3686612
5 changed files with 29 additions and 8 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -126,10 +126,13 @@ $(function () {
var versions = new Versions();
$("#dependencies div.checkbox").each(function (idx, item) {
if ($(item).attr('data-range') === 'null' || versions.matchRange($(item).attr('data-range'))(versionRange)) {
$(item).show();
$("input", item).removeAttr("disabled");
$(item).removeClass("disabled");
} else {
$(item).hide();
$("input", item).prop('checked', false);
$(item).addClass("disabled");
$("input", item).attr("disabled", true);
removeTag($("input", item).val());
}
});
};

View File

@ -168,7 +168,7 @@
and <a href="https://run.pivotal.io">Pivotal Web Services</a></p>
</div>
</footer>
<script src="/js/jquery-1.11.3.min.js"></script>
<script src="/js/jquery-3.1.0.min.js"></script>
<script src="/js/typeahead.bundle.min.js"></script>
<script src="/js/mousetrap.min.js"></script>
<script src="/js/start.js"></script>

View File

@ -153,6 +153,25 @@ class ProjectGenerationSmokeTests extends AbstractInitializrControllerIntegratio
}
}
@Test
void selectDependencyAndChangeToIncompatibleVersionRemovesIt() {
toHome {
selectDependency(page, 'Data JPA')
selectDependency(page, 'org.acme:bur')
page.bootVersion = '1.0.2.RELEASE' // Bur isn't available anymore
page.generateProject.click()
at HomePage
assertSimpleProject()
.isMavenProject()
.pomAssert()
.hasSpringBootParent('1.0.2.RELEASE')
.hasDependenciesCount(2)
.hasSpringBootStarterDependency('data-jpa')
.hasSpringBootStarterTest()
}
}
ProjectAssert assertSimpleProject() {
zipProjectAssert(from('demo.zip'))
.hasBaseDir("demo")