dark-mode icon indicating copy to clipboard operation
dark-mode copied to clipboard

Fix tests

Open sindresorhus opened this issue 6 years ago • 3 comments

Issuehunt badges

Tests are failing locally on and on Travis.

There is a $40.00 open bounty on this issue. Add more on Issuehunt.

sindresorhus avatar Mar 27 '19 10:03 sindresorhus

@issuehunt has funded $40.00 to this issue.


IssueHuntBot avatar Apr 11 '19 04:04 IssueHuntBot

@sindresorhus I found this issue in issueHunt and I tried to solve it. Through logging the test, I found the AppleScript fail to run:

{
    NSAppleScriptErrorAppName = "System Events";
    NSAppleScriptErrorBriefMessage = "Not authorized to send Apple events to System Events.";
    NSAppleScriptErrorMessage = "Not authorized to send Apple events to System Events.";
    NSAppleScriptErrorNumber = "-1743";
    NSAppleScriptErrorRange = "NSRange: {71, 9}";
}

After trying many ways, I found some info in macOS Mojave 10.14 Release, it says:

image

Seems that now in macOS 10.14 and Xcode 10.2, the Xcode unit test has no permissions to execute AppleScript.

And I also view the travis CI Documantation, the xcode10.2 of osx_image was bundled with macOS 10.14.

image

So I think that's the reason why the locally and the CI tests are all fails.

g1eny0ung avatar May 16 '19 05:05 g1eny0ung

Hi @sindresorhus , is this issue still in need of help?

jduo avatar Jul 05 '20 08:07 jduo