feat: Introduce Playwright for UI testing
Instead of using Robot Framework which does not run during a `mvn install`. Playwright seems to be the better approach. We can now write them as normal JUnit test and they are executed during a build. Additionally this PR solves some interesting bugs found during writing Playwright tests: - A reset of a lesson removes all assignments as a result another user wouldn't see any assignments - If someone solves an assignment the assignment automatically got solved for a new user since the assignment included the `solved` flag which immediately got copied to new lesson progress. - Introduction of assignment progress linking a assignment not directly to all users.
This commit is contained in:
@ -2,13 +2,18 @@
|
||||
-- For the normal WebGoat server there is a bean which already provided the schema (and creates it see DatabaseInitialization)
|
||||
CREATE SCHEMA IF NOT EXISTS CONTAINER;
|
||||
|
||||
create
|
||||
table CONTAINER.assignment
|
||||
create table CONTAINER.assignment
|
||||
(
|
||||
solved boolean not null,
|
||||
id bigint generated by default as identity (start with 1),
|
||||
name varchar(255),
|
||||
path varchar(255),
|
||||
id bigint generated by default as identity (start with 1),
|
||||
name varchar(255),
|
||||
path varchar(255),
|
||||
primary key (id)
|
||||
);
|
||||
create table CONTAINER.assignment_progress
|
||||
(
|
||||
solved boolean not null,
|
||||
assignment_id bigint unique,
|
||||
id bigint generated by default as identity (start with 1),
|
||||
primary key (id)
|
||||
);
|
||||
create table CONTAINER.lesson_progress
|
||||
@ -55,8 +60,10 @@ create table CONTAINER.email
|
||||
title VARCHAR(255)
|
||||
);
|
||||
|
||||
alter table CONTAINER.assignment_progress
|
||||
add constraint FK7o6abukma83ku3xrge9sy0qnr foreign key (assignment_id) references CONTAINER.assignment;
|
||||
alter table CONTAINER.lesson_progress_assignments
|
||||
add constraint FKbd9xavuwr1rxbcqhcu3jckyro foreign key (assignments_id) references CONTAINER.assignment;
|
||||
add constraint FKrw89vmnela8kj0nbg1xdws5bt foreign key (assignments_id) references CONTAINER.assignment_progress;
|
||||
alter table CONTAINER.lesson_progress_assignments
|
||||
add constraint FKl8vg2qfqhmsnt18qqcyydq7iu foreign key (lesson_progress_id) references CONTAINER.lesson_progress;
|
||||
alter table CONTAINER.user_progress_lesson_progress
|
||||
|
Reference in New Issue
Block a user