Commit Graph

477 Commits

Author SHA1 Message Date
740fc85bce RSpec redirect: Allow specifying a location through a block 2023-11-23 14:42:10 +01:00
7f30fbe221 RSpec: Ensure that locales are present for i18n-js 2023-11-23 14:42:10 +01:00
1e08f2cc9c add hidden_feedback to custom CodeOcean test-attributes 2023-11-17 00:56:49 +01:00
3f8f4cee5b update converters and im-/exporters to accommodate for changes in proforma gem 2023-11-17 00:56:49 +01:00
bcbb2d2eb6 Generate truly random email addresses in factory
Previously, it could happen under some (random) circumstances that a series of users got the same user name. This is caused by the usage of Forgery for generating a name. Forgery itself picks a random name from a list, and there is no check that two calls would indeed deliver two different names.

In order to solve the issue, we generate a truly unique email address for specs, so that the problem won't arise again.
2023-11-11 13:40:28 +01:00
ae013ba027 Prevent the creation of new accounts during mailer preview 2023-11-01 19:41:16 +01:00
411eb0b165 Specs: Use Runner factory and provide strategy class 2023-10-31 12:35:24 +01:00
8fc5123bae Exclusively lock Runners during code executions
Previously, the same runner could be used multiple times with different submissions simultaneously. This, however, yielded errors, for example when one submission time oud (causing the running to be deleted) while another submission was still executed.

Admin actions, such as the shell, can be still executed regardless of any other code execution.

Fixes CODEOCEAN-HG
Fixes openHPI/poseidon#423
2023-10-31 12:35:24 +01:00
28d9e38fe5 Upgrade to Rails 7.1 and apply new framework defaults
* Remove deprecated options from environments
* Remove deprecation warnings for upcoming Rails 7.2
* Dump schema with new defaults
* Remove outdated (and erroneous) data attribute in view
* Resolve a `NoMethodError` for seeds_spec.rb
2023-10-27 16:50:27 +02:00
79ce069f68 Add CRUD operations for Programming Groups
* Correct sorting in table
* Modify page when nested in exercises
* Fix links between pages
* Link from statistics page to programming_groups/index
* Link from submission page to programming_groups/<id>
* Allow filtering for exercise ID on ProgrammingGroup#index
* Add search fields for internal and external user id on pg/index
2023-10-23 18:17:42 +02:00
b91a2b7ce0 Remove PairProgramming23Study and instead use LTI parameter 2023-10-22 12:07:41 +02:00
99bd46af1a Align project files with CodeHarbor
Since both projects are developed together and by the same team, we also want to have the same code structure and utility methods available in both projects. Therefore, this commit changes many files, but without a functional change.
2023-10-11 00:18:33 +02:00
f150c793d5 Add regression spec for message validation 2023-09-19 12:52:53 +02:00
e767cff309 Fix flaky tests dependent on exercise.reload for files 2023-09-16 16:57:59 +02:00
c29256aa81 Fix Rubocop offenses 2023-09-11 14:10:16 +02:00
97764bd02e Limit programming groups to two people
* adapt text on programming_groups/new site
* in German change from 'Sie' to 'du'
2023-09-05 22:56:51 +02:00
235bf771fe Always use user object instead of ID and Type 2023-08-26 00:39:47 +02:00
89afb599e4 Apply changes from team members in own editor 2023-08-26 00:38:58 +02:00
c2995c96f0 Remove clear_lti_session_data as it is no longer needed
* no lti session data anymore included in the function
* decided not to delete the pg_id here as it is handled in create_through_lti and implement
* the function is only called once without an exercise id so the values are now directly deleted there
2023-08-24 19:32:06 +02:00
01accdae58 Use author_in_programming_group? policy for files & RfCs
* Allow all members of a programming group to list and solve RfCs
* Also adjust policy specs to respect programming groups
2023-08-24 19:32:06 +02:00
a1941336d9 Fix Runner access for programming groups
* We also rename the corresponding columns in the Runner model, so that for polymorphic association gets clear.
2023-08-24 19:32:06 +02:00
be4f2b790d Add user to testrun
* We want to identify a user that has triggered a testrun. Previously (in regular operation), only submission author who were regular users were able to start a testrun. Now, we want to prepare a future where submission authors are programming groups. Still, a testrun is triggered by an individual user and not a group.
* Further, this commit fixes some missing foreign key constrains.
2023-08-24 19:32:06 +02:00
e3603758ef Refactor LTI parameters and add study group
* This change also requires that submissions in our test need to have a valid study group.
2023-08-24 19:32:06 +02:00
e2baa2ee55 Send score for all members of a programming group 2023-08-24 19:32:06 +02:00
319c3ab3b4 Add ProgrammingGroup & ProgrammingGroupMembership
* User can create programming group with other users for exercise
* Submission is shared in a group
* Also adjust specs
2023-08-24 19:32:06 +02:00
0234414bae Rename user to contributor in submission 2023-08-24 19:32:06 +02:00
97138288f4 Delete unused LTI params from session 2023-08-24 19:32:06 +02:00
245c3dba8c Update from proforma to proformaxml 2023-08-24 00:14:41 +02:00
f15d4fe437 Improve comments controller spec
For this test, we had a bug so that the test could passed if executed, so that the file just had ID 50 randomly.
2023-08-01 16:22:47 +02:00
8f446c04a9 Fix Rubocop offenses 2023-07-31 08:59:00 +02:00
28a4b672f9 Remove legacy save search endpoint 2023-07-28 13:18:39 +02:00
fd2d94568a Handle OutOfMemory runner errors with gVisor 2023-07-21 16:38:49 +02:00
e097036296 Fix RfC Visibility to work as intended
The RfC Visibility of a consumer is intended to restrict who can access which RfCs. So far, those restrictions were only applied one way, for learners of a restricted consumer to view other (external) RfCs. However, the other way around should also work: If a RfC was created as part of a restricted consumer, no other external user should be able to interfere with this RfC. This commit, therefore, adds this direction as well and covers both directions with tests.
2023-07-13 11:02:10 +02:00
19ec6540e1 Fix wait_for_ajax for feature specs 2023-06-28 15:36:51 +02:00
1296a12a6d Language Selector: Prevent duplicate locale= keys 2023-06-23 22:21:56 +02:00
f36e7673ec Specs: Disable external requests with WebMock 2023-06-23 22:20:04 +02:00
06d69d8eb8 Explicitly disable feedback in submit test scenarios 2023-06-23 22:20:04 +02:00
1b21e2cd26 Explicitly disable the runner management for the dashboard test 2023-06-23 22:20:04 +02:00
ccbf41005b Always clear runner strategy after each test case
Otherwise, we get different test results depending on the test order.
2023-06-23 22:20:04 +02:00
d1a0012d4f Overwrite Bootstrap Link Renderer for WillPaginate
Without this fix, the new will_paginate version is not compatible with the old version of bootstrap-will_paginate. This issue is also tracked here: https://github.com/mislav/will_paginate/issues/649

Fixes CODEOCEAN-QK
2023-06-14 14:43:18 +02:00
bcdc71021e Fix Rubocop offenses 2023-06-11 20:46:45 +02:00
ccaf49acd5 Update action_mailer.yml configuration and adapt specs 2023-04-14 15:55:08 +02:00
939b31967f Reduce SQL queries for score runs
Fixes CODEOCEAN-JR
2023-03-14 13:56:23 +01:00
3f5ef1caf2 Mock health check for Runner management 2023-03-13 23:52:59 +01:00
7f0f2a64d1 Fix rubocop offenses 2023-03-13 13:34:02 +01:00
05a8e307ce Fix rubocop offenses 2023-02-27 11:09:34 +01:00
896f1dcbee Minimize test setup for RfC feature specs 2023-02-20 23:47:06 +01:00
76f592c88d Consider RfC visibility to view / change RfCs 2023-02-20 23:47:06 +01:00
9c3392b324 Add consumer-based RfC Visibility settings
This setting will be useful to increase data protection, where users might not be allowed to see RfCs from other contexts.
2023-02-20 23:47:06 +01:00
9ae6a1a79d Disable focus filter for rspec 2023-02-18 21:10:47 +01:00