Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable Whoops for most integration tests #3976

Merged
merged 2 commits into from
Oct 2, 2024

Conversation

EreMaijala
Copy link
Contributor

  • Also fixes an issue uncovered by this in status-full.phtml.
  • Disables Whoops and logging for tests that expect failures.

- Also fixes an issue uncovered by this in status-full.phtml.
- Disables Whoops and logging for tests that expect failures.
@EreMaijala EreMaijala requested a review from demiankatz October 1, 2024 19:40
@@ -240,7 +240,8 @@ public function testSavedSearchSecurity(): void
$this->findAndAssertLink($page, 'Log Out')->click();

// Use user A's delete link, but try to execute it as user B:
[$base, $params] = explode('?', $delete);
[, $params] = explode('?', $delete);
$session->setWhoopsDisabled(true);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$session->setWhoopsDisabled(true);
$session->setWhoopsDisabled(true); // We expect an error, so let's act like production mode for realistic testing

Copy link
Member

@demiankatz demiankatz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @EreMaijala, this looks good to me!

I just thought it might be helpful to add a couple of comments, and I used that as an excuse to try the suggestion feature I mentioned yesterday. Apparently it's not new (at least four years old), but I only just learned about it. It's available as a button through the comment box when you add a comment to one or more lines of code while reviewing.

@@ -253,6 +254,7 @@ public function testSavedSearchSecurity(): void
$this->findAndAssertLink($page, 'Log Out')->click();

// Go back in as user A -- see if the saved search still exists.
$session->setWhoopsDisabled(false);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$session->setWhoopsDisabled(false);
$session->setWhoopsDisabled(false); // go back to stricter error handling

@demiankatz demiankatz modified the milestones: 10.0.1, 10.1 Oct 2, 2024
@EreMaijala
Copy link
Contributor Author

@demiankatz Thanks, and nice to see the suggestions in action. The lines were a bit too long, though, so I decided to add the comments above the actions.

@EreMaijala EreMaijala requested a review from demiankatz October 2, 2024 06:58
Copy link
Member

@demiankatz demiankatz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @EreMaijala!

@demiankatz demiankatz merged commit a5b49a5 into vufind-org:dev Oct 2, 2024
6 checks passed
@demiankatz demiankatz deleted the dev-fix-php-notices branch October 2, 2024 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants