Note:
in June 2017, Microsoft disabled the use of JavaScript in a Calculated Column
That means given answers may not apply for newer SharePoint versions
For long explanation and work arounds see:
June 13th 2017 Microsoft blocked handling HTML markup in SharePoint calculated fields - how to get the same functionality back
**Original answer:**
You are running into quoting issues because you need a " (double-quote) to identify the SharePoint string delimiters, so can not use it inside the string.
"" (double-double-quote) is the SharePoint escape notation to create a one double-quote inside a SharePoint string,
with the single-quote you then have the two required quoting styles required inside the SharePoint string to code JavaScript events.
Your Complete Calculated Column Formula becomes:
="<input id=""ViewButton""
onclick=""javascript:OpenPopUpPage('/.../Test Doc Library/" & [Title] & "');""
type=""button""
value=""View Artifacts""/>"
Notes
I documented it all:
https://www.365csi.nl/vm365com/#/How
https://www.365csi.nl/vm365com/#/Create
You could swap the use of single and double-double quotes; I found this use the best readable
The Browser will add double-quotes on Tag attributes at word boundaries, so you can use:
="<input id=ViewButton
onclick=""javascript:OpenPopUpPage('/.../Test Doc Library/" & [Title] & "');""
type=button
value=""View Artifacts""/>"
if you had done value=View Artifacts it would have become:
value="View" "Artifacts"
[Title] can be written as Title, because it has no spaces. I tend to use the [] notation for readability
Always use a text-editor to prepare/edit your formulas with lots of linebreaking/indentation. Then paste to SharePoint, where SharePoint will remove all unnecessary spacing.
Top SO-SharePoint answers that use HTML/JavaScript in Calculated Columns
are marked with ICC : https://sharepoint.stackexchange.com/search?q=ICC