approvals / approvals/ApprovalTests.cpp

CLion reporter does not open correctly if CLion is already open

Open
#215 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
339
Forks
55
PR merge metrics
No merged PRs in 30d

Description

When using the CLion reporter with a project open in the IDE, received and approved files are opened as regular tabs, and an empty diff window is opened for each failed test.

I experience this issue on macOS. I don't know if Windows/Linux are affected.

It seems that the nosplash argument when invoking CLion is the culprit here. As a workaround, you can skip the argument in CLion's startup script (/Users/[username]/Library/Application Support/JetBrains/Toolbox/scripts/clion) by adding this to the start of the for-loop:

  if [[ "$o" = "nosplash" ]]; then
      continue
  fi

With the workaround applied, ApprovalTests diffs correctly open in the CLion diff viewer.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce on macOS with CLion already open and inspect the CLion reporter's invocation, especially the nosplash argument. The mentioned startup script is /Users/[username]/Library/Application Support/JetBrains/Toolbox/scripts/clion; compare behavior with that argument skipped. Done means received and approved files open in the CLion diff viewer and failed tests do not create empty diff windows.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
devtools, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.