Skip to content

Commit 3be1a69

Browse files
authored
Merge pull request kaakaww#34 from kaakaww/integration-test-suites
change the `/hidden/x` path to be more dynamic
2 parents cc96823 + 648e181 commit 3be1a69

File tree

2 files changed

+26
-10
lines changed

2 files changed

+26
-10
lines changed

src/main/java/hawk/controller/HiddenController.java

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import org.springframework.stereotype.Controller;
44
import org.springframework.ui.Model;
55
import org.springframework.web.bind.annotation.GetMapping;
6+
import org.springframework.web.bind.annotation.PathVariable;
67

78
@Controller
89
public class HiddenController {
@@ -14,8 +15,26 @@ public String index(Model model) {
1415
}
1516

1617
@GetMapping("/hidden/hidden2")
17-
public String jwtAuth(Model model) {
18-
model.addAttribute("title", "Rando hidden page");
18+
public String hidden(Model model) {
19+
model.addAttribute("Rando hidden page");
1920
return "hidden2";
2021
}
22+
23+
@GetMapping("/hidden/cypress")
24+
public String cypress(Model model) {
25+
model.addAttribute("title", "Hidden Page, found and tested with cypress tests");
26+
return "hidden";
27+
}
28+
29+
@GetMapping("/hidden/selenium")
30+
public String selenium(Model model) {
31+
model.addAttribute("title", "Hidden Page, found and tested with selenium tests");
32+
return "hidden";
33+
}
34+
35+
@GetMapping("/hidden/playwright")
36+
public String playwright(Model model) {
37+
model.addAttribute("title", "Hidden Page, found and tested with playwright tests");
38+
return "hidden";
39+
}
2140
}

src/main/resources/templates/hidden2.html

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
<!DOCTYPE html>
2-
<html lang="en">
3-
<head>
4-
<meta charset="UTF-8">
5-
<title><!DOCTYPE html>
6-
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="https://www.thymeleaf.org"
7-
xmlns:sec="https://www.thymeleaf.org/thymeleaf-extras-springsecurity3">
8-
<head>
2+
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="https://www.thymeleaf.org"
3+
xmlns:sec="https://www.thymeleaf.org/thymeleaf-extras-springsecurity3">
4+
<head>
95
<title th:text="${title}"></title>
10-
<th:block th:replace="general.html :: head"/>
6+
<th:block th:replace="general.html :: head"/>
7+
</head>
118

129
<style>
1310
#results {

0 commit comments

Comments
 (0)