From f80b575a74d453aa26486e696a785655eaad2912 Mon Sep 17 00:00:00 2001 From: Rhys Evans <EvansRM17@cardiff.ac.uk> Date: Thu, 7 Dec 2023 10:14:53 +0000 Subject: [PATCH] working on maps fix, added node/open layers dependencies --- build.gradle | 3 +++ src/main/resources/static/css/styling.css | 2 +- .../SmartTownsApplicationTests.java | 19 ++++++++++--------- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/build.gradle b/build.gradle index 0bdcc02b..a0a09e8f 100644 --- a/build.gradle +++ b/build.gradle @@ -2,6 +2,7 @@ plugins { id 'java' id 'org.springframework.boot' version '3.1.5' id 'io.spring.dependency-management' version '1.1.3' + id "com.github.node-gradle.node" version "7.0.1" } group = 'Team.5' @@ -34,6 +35,8 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testImplementation 'org.springframework.boot:spring-boot-starter-test' implementation 'org.springframework.boot:spring-boot-starter-validation' + // https://mvnrepository.com/artifact/org.webjars/openlayers + implementation group: 'org.webjars', name: 'openlayers', version: '5.2.0' } tasks.named('bootBuildImage') { diff --git a/src/main/resources/static/css/styling.css b/src/main/resources/static/css/styling.css index 019ac115..167be5a4 100644 --- a/src/main/resources/static/css/styling.css +++ b/src/main/resources/static/css/styling.css @@ -1,2 +1,2 @@ /*@import "../../templates/towns/mapsTest/node_modules/ol/ol.css";*/ -@import "../node_modules/ol/ol.css"; +@import "../../templates/towns/mapsTest/node_modules/ol/ol.css"; diff --git a/src/test/java/Team5/SmartTowns/SmartTownsApplicationTests.java b/src/test/java/Team5/SmartTowns/SmartTownsApplicationTests.java index aa1735bc..3ae121d8 100644 --- a/src/test/java/Team5/SmartTowns/SmartTownsApplicationTests.java +++ b/src/test/java/Team5/SmartTowns/SmartTownsApplicationTests.java @@ -32,18 +32,19 @@ class SmartTownsApplicationTests { private static JdbcTemplate jdbc; @BeforeAll public static void before() { - location = new Location(); } - @BeforeAll - public static void before2() { - locationRepo = new locationRepositoryJDBC(jdbc); } + location = new Location(); + locationRepo = new locationRepositoryJDBC(jdbc);} +// @BeforeAll +// public static void before2() { +// locationRepo = new locationRepositoryJDBC(jdbc); } // @Autowired // private locationRepository locationRepository; - @Test - public void whenAddingLocationsNonApprovedLocationsDontShowInTrails(){ - /// Discover number of approved/unapproved locations before adding tests - List<Location> approvedNumber = locationRepo.approvedLocations(); - } +// @Test +// public void whenAddingLocationsNonApprovedLocationsDontShowInTrails(){ +// /// Discover number of approved/unapproved locations before adding tests +// List<Location> approvedNumber = locationRepo.approvedLocations(); +// } //// Location loc1= new Location("TestFail", "Test@PleaseFail.test", "Fail Description here", //// "Caerphilly", 103, false); //// Location loc2= new Location("TestFail", "Test@PleaseFail2.test", "Fail Description here", -- GitLab