Skip to content
Snippets Groups Projects
Commit fc6013f2 authored by Ruben Backx's avatar Ruben Backx :coffee:
Browse files

Merge branch 'development' into 'master'

Version 2.2.2

See merge request !720
parents 8ef6036a 72d1cfce
Branches
Tags
3 merge requests!828Draft: UI component for allowed requests for students with multiple roles,!720Version 2.2.2,!581Draft: Resolve "Add report button to feedback page"
...@@ -477,7 +477,7 @@ a11y: ...@@ -477,7 +477,7 @@ a11y:
- if: $CI_COMMIT_BRANCH == "development" - if: $CI_COMMIT_BRANCH == "development"
stage: live checks stage: live checks
variables: variables:
ally_urls: "https://queue.eiptest.ewi.tudelft.nl" a11y_urls: "https://queue.eiptest.ewi.tudelft.nl"
# Accessibility testing # Accessibility testing
browser_performance: browser_performance:
......
...@@ -9,6 +9,16 @@ All notable changes to this project will be documented in this file. ...@@ -9,6 +9,16 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [2.2.2]
### Added
### Changed
### Fixed
- The about page was not accessible. [@rwbackx](https://gitlab.ewi.tudelft.nl/rwbackx)
- When copying a session, the rooms would not get copied over properly. [@rwbackx](https://gitlab.ewi.tudelft.nl/rwbackx)
## [2.2.1] ## [2.2.1]
### Added ### Added
......
...@@ -8,15 +8,13 @@ This guide has the following goals ...@@ -8,15 +8,13 @@ This guide has the following goals
5. Cover the process of submitting your changes! ([Submitting your changes](#submitting-your-changes)) 5. Cover the process of submitting your changes! ([Submitting your changes](#submitting-your-changes))
## Getting access ## ## Getting access ##
To get started developing for the Queue, you will need to request access. You can fork the repository [on gitlab.com](https://gitlab.com/eip-ewi/queue).
We do this to prevent Queue development from becoming unmanageable and to keep track of bug bounties effectively. Everybody should be able to do this provided they have a gitlab.com account.
If you are a TU Delft student or employee, please use a gitlab.com account created with your TU Delft email address.
This repository is bidirectionally mirrored,
so any merged contributions will be automatically pushed to this repository.
To request access, you will need to send an email to eip-ewi@tudelft.nl. After you created a fork, you can continue to the next steps.
In this email, please detail why you want to help out with the Queue and what you want to contribute to specifically.
Please also disclose your `gitlab.ewi.tudelft.nl` username.
When you get granted access, you will be given your own fork of the project in which you can edit your code.
After you get this access, you can continue to the next steps.
## Project setup ## ## Project setup ##
......
...@@ -2,15 +2,18 @@ ...@@ -2,15 +2,18 @@
A queueing system to be used at labs at EWI (tudelft.nl). A queueing system to be used at labs at EWI (tudelft.nl).
## Contributing
Please read our [contribution guide](CONTRIBUTING.md).
## Requirements ## Requirements
- Java 8+ - Java 17+
## Project setup ## Project setup
In order to have the project setup properly for development a few steps need to be taken. In order to have the project setup properly for development a few steps need to be taken.
1. First the config file should be moved from the template into the actual properties file 1. First the config file should be moved from the template into the actual properties file
by executing `cp src/main/resources/application.yaml.template src/main/resources/application.yaml` by executing `cp src/main/resources/application.yaml.template src/main/resources/application.yaml`
from the root directory of the project. from the root directory of the project.
......
...@@ -6,7 +6,7 @@ import org.springframework.boot.gradle.tasks.run.BootRun ...@@ -6,7 +6,7 @@ import org.springframework.boot.gradle.tasks.run.BootRun
import java.nio.file.Files import java.nio.file.Files
group = "nl.tudelft.ewi.queue" group = "nl.tudelft.ewi.queue"
version = "2.2.1" version = "2.2.2"
val javaVersion = JavaVersion.VERSION_17 val javaVersion = JavaVersion.VERSION_17
...@@ -280,6 +280,16 @@ tasks.withType<Test>().configureEach { ...@@ -280,6 +280,16 @@ tasks.withType<Test>().configureEach {
showStandardStreams = false showStandardStreams = false
} }
} }
tasks.getByName<Test>("test") {
filter {
excludeTestsMatching("e2e.*")
}
}
tasks.register<Test>("e2eTest") {
filter {
includeTestsMatching("e2e.*")
}
}
dependencies { dependencies {
/////// Spring dependencies /////// /////// Spring dependencies ///////
...@@ -406,6 +416,8 @@ dependencies { ...@@ -406,6 +416,8 @@ dependencies {
testImplementation("org.springframework.boot:spring-boot-starter-test") testImplementation("org.springframework.boot:spring-boot-starter-test")
testImplementation("org.springframework.security:spring-security-test") testImplementation("org.springframework.security:spring-security-test")
testImplementation("com.microsoft.playwright:playwright:1.38.0")
/////// Annotation processing dependencies /////// /////// Annotation processing dependencies ///////
annotationProcessor("javax.annotation:javax.annotation-api") annotationProcessor("javax.annotation:javax.annotation-api")
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
<div class="flex gap-7"> <div class="flex gap-7">
<a class="link" th:href="@{/privacy}">Privacy statement</a> <a class="link" th:href="@{/privacy}">Privacy statement</a>
<a class="link" th:href="@{/about}">About</a>
</div> </div>
</footer> </footer>
</html> </html>
...@@ -18,15 +18,13 @@ ...@@ -18,15 +18,13 @@
--> -->
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorate="~{layout}"> <html lang="en" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorate="~{container}">
<body> <body>
<section layout:fragment="content"> <main layout:fragment="content">
<div class="page-header"> <h1 class="font-800 mb-5">About Queue</h1>
<h1>About Queue</h1> <div class="grid col-2 | md:col-1">
</div> <div>
<div class="row"> <h2 class="font-500 mb-3">What is Queue?</h2>
<div class="col-sm-12 col-md-6">
<p class="h3">What is Queue?</p>
<p> <p>
Queue is a system that serves as a replacement for a physical queue. It was originally intended for lab sessions, where Queue is a system that serves as a replacement for a physical queue. It was originally intended for lab sessions, where
students work on their own and can ask questions to student assistants. As the number of students grows, it becomes harder and students work on their own and can ask questions to student assistants. As the number of students grows, it becomes harder and
...@@ -35,18 +33,16 @@ ...@@ -35,18 +33,16 @@
</p> </p>
</div> </div>
<div class="col-sm-12 col-md-6"> <div>
<p class="h3">Why Queue?</p> <h2 class="font-500 mb-3">Why Queue?</h2>
<p> <p>
Queue is a simple to use tool with many advanced capabilities and customisation options included. With the problem of managing Queue is a simple to use tool with many advanced capabilities and customisation options included. With the problem of managing
and keeping track of questions out of the way, the student assistants can do what they do best: teach. and keeping track of questions out of the way, the student assistants can do what they do best: teach.
</p> </p>
</div> </div>
</div>
<div class="row"> <div>
<div class="col-sm-12 col-md-6"> <p class="font-500 mb-3">How does Queue work?</p>
<p class="h3">How does Queue work?</p>
<p> <p>
Queue transforms a physical queue into a virtual one by taking all the requests of the students and putting them in the right Queue transforms a physical queue into a virtual one by taking all the requests of the students and putting them in the right
order. Student assistants can then, one by one, take those requests and handle them individually. Additionally, (the) Queue is order. Student assistants can then, one by one, take those requests and handle them individually. Additionally, (the) Queue is
...@@ -54,43 +50,41 @@ ...@@ -54,43 +50,41 @@
</p> </p>
</div> </div>
<div class="col-sm-12 col-md-6"> <div>
<p class="h3">History of Queue</p> <p class="font-500 mb-3">History of Queue</p>
<p> <p>
Queue started as a literal physical queue that eventually evolved into a management system with a spreadsheet. This short-term Queue started as a literal physical queue that eventually evolved into a management system with a spreadsheet. This short-term
solution wasn't the best and thus the idea of Queue was born. Shortly after, a student was hired and Queue 0.1 was not only a solution wasn't the best and thus the idea of Queue was born. Shortly after, a student was hired and Queue 0.1 was not only a
dream anymore. After that, a Surf grant helped to further development and the team grew to a size of 8 students. dream anymore. After that, a Surf grant helped to further development and the team grew to a size of 8 students.
</p> </p>
</div> </div>
</div>
<div class="row"> <div>
<div class="col-sm-12 col-md-6"> <p class="font-500 mb-3">How do I report bugs?</p>
<p class="h3">How do I report bugs?</p>
<p> <p>
Because Queue is an open-source project, one can go to the Because Queue is an open-source project, one can go to the
<a href="https://gitlab.ewi.tudelft.nl/eip/labrador/queue" target="_blank">Queue repository</a> <!-- prettier-ignore -->
, choose Issues in the menu and open a new issue. There are templates for submitting features and bugs and it should be <th:block><a class="link" href="https://gitlab.ewi.tudelft.nl/eip/labrador/queue" target="_blank">Queue repository</a>,</th:block>
choose Issues in the menu and open a new issue. There are templates for submitting features and bugs and it should be
straightforward from there. straightforward from there.
</p> </p>
</div> </div>
<div class="col-sm-12 col-md-6"> <div>
<p class="h3">How do I contribute?</p> <p class="font-500 mb-3">How do I contribute?</p>
<p> <p>
There are two main ways of contributing: working on an open-standing issue or tackling a bug bounty and earn something extra. There are two main ways of contributing: working on an open-standing issue or tackling a bug bounty and earn something extra.
The Queue contains an The Queue contains an
<a href="https://gitlab.ewi.tudelft.nl/eip/labrador/queue/-/issues" target="_blank">issues list</a> <a class="link" href="https://gitlab.ewi.tudelft.nl/eip/labrador/queue/-/issues" target="_blank">issues list</a>
and a filter for all the and a filter for all the
<a href="https://gitlab.ewi.tudelft.nl/eip/labrador/queue/-/issues?label_name[]=BugBounty" target="_blank">bug bounties</a> <!-- prettier-ignore -->
. For reading the rules of contributing check the <th:block><a class="link" href="https://gitlab.ewi.tudelft.nl/eip/labrador/queue/-/issues?label_name[]=BugBounty" target="_blank">bug bounties</a>.</th:block>
<a href="https://gitlab.ewi.tudelft.nl/eip/labrador/queue/-/blob/development/CONTRIBUTING.md" target="_blank"> For reading the rules of contributing check the
CONTRIBUTING.md <!-- prettier-ignore -->
</a> <th:block><a class="link" href="https://gitlab.ewi.tudelft.nl/eip/labrador/queue/-/blob/development/CONTRIBUTING.md" target="_blank">CONTRIBUTING.md</a>.</th:block>
.
</p> </p>
</div> </div>
</div> </div>
</section> </main>
</body> </body>
</html> </html>
...@@ -212,6 +212,7 @@ ...@@ -212,6 +212,7 @@
<li th:each="lab : ${sharedLabs[shared.id]}" class="flex align-center gap-3"> <li th:each="lab : ${sharedLabs[shared.id]}" class="flex align-center gap-3">
<a <a
href="#" href="#"
class="link"
th:href="@{/lab/{id}(id=${lab.id})}" th:href="@{/lab/{id}(id=${lab.id})}"
th:text="|${lab.name} ${#temporals.format(lab.slot.opensAt, 'dd MMMM yyyy HH:mm')} - ${#temporals.format(lab.slot.closesAt, 'dd MMMM yyyy HH:mm')} ${lab.slotOccupationString}|"></a> th:text="|${lab.name} ${#temporals.format(lab.slot.opensAt, 'dd MMMM yyyy HH:mm')} - ${#temporals.format(lab.slot.closesAt, 'dd MMMM yyyy HH:mm')} ${lab.slotOccupationString}|"></a>
......
...@@ -113,7 +113,13 @@ ...@@ -113,7 +113,13 @@
<label for="room-select">Rooms</label> <label for="room-select">Rooms</label>
<div> <div>
<select multiple id="room-select" th:field="*{rooms}" data-select disabled data-placeholder="Pick a room"> <select
multiple
id="room-select"
th:field="*{rooms}"
data-select
th:disabled="${#lists.isEmpty(dto.roomDetails())}"
data-placeholder="Pick a room">
<th:block th:each="room : ${rooms}"> <th:block th:each="room : ${rooms}">
<option <option
th:value="${room.id}" th:value="${room.id}"
...@@ -124,6 +130,9 @@ ...@@ -124,6 +130,9 @@
</th:block> </th:block>
</select> </select>
</div> </div>
<script th:unless="${#lists.isEmpty(dto.roomDetails())}">
document.addEventListener("ComponentsLoaded", updateRooms);
</script>
<label for="online-mode-select">Online Modes</label> <label for="online-mode-select">Online Modes</label>
<div> <div>
......
/*
* Queue - A Queueing system that can be used to handle labs in higher education
* Copyright (C) 2016-2021 Delft University of Technology
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package e2e;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.TestInstance;
import com.microsoft.playwright.Browser;
import com.microsoft.playwright.BrowserContext;
import com.microsoft.playwright.Page;
import com.microsoft.playwright.Playwright;
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
public abstract class EndToEndTest {
protected Playwright playwright;
protected Browser browser;
protected BrowserContext context;
protected Page page;
public EndToEndTest() {
this.playwright = Playwright.create();
this.browser = playwright.webkit().launch();
}
@BeforeEach
void createContext() {
context = browser.newContext();
page = browser.newPage();
}
@AfterAll
void close() {
playwright.close();
}
}
/*
* Queue - A Queueing system that can be used to handle labs in higher education
* Copyright (C) 2016-2021 Delft University of Technology
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package e2e;
import java.nio.file.Paths;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.TestInstance;
import com.microsoft.playwright.Page;
import com.microsoft.playwright.options.AriaRole;
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
public class ExampleEndToEndTest extends EndToEndTest {
@Test
void takeScreenShot() {
page.navigate("localhost:8081");
page.screenshot(new Page.ScreenshotOptions().setPath(Paths.get("build/screenshots/test.png")));
}
@Test
void login() {
page.navigate("http://localhost:8081/");
page.getByRole(AriaRole.LINK, new Page.GetByRoleOptions().setName("Click here to log in")).click();
page.getByLabel("Username").click();
page.getByLabel("Username").fill("cseteacher1");
page.getByLabel("Username").press("Tab");
page.getByLabel("Password").fill("cseteacher1");
page.getByLabel("Password").press("Enter");
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment