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

Testing Support for LWC: Support internal workspace #2094

Merged
merged 24 commits into from
Jun 23, 2020
Merged

Conversation

xyc
Copy link
Contributor

@xyc xyc commented Mar 21, 2020

What does this PR do?

Support internal workspace

What issues does this PR fix or reference?

Parent issue #1703, @W-6975995@

Functionality Before

For LWC testing, SFDX workspace is supported

Functionality After

For LWC testing, SFDX and internal workspaces are supported

@xyc xyc requested review from KrisGraySFDC, nrkruk and a team March 21, 2020 01:34
@codecov
Copy link

codecov bot commented Mar 21, 2020

Codecov Report

Merging #2094 into develop will increase coverage by 0.08%.
The diff coverage is 98.75%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #2094      +/-   ##
===========================================
+ Coverage    74.21%   74.30%   +0.08%     
===========================================
  Files          239      244       +5     
  Lines         8999     9046      +47     
  Branches      1028     1033       +5     
===========================================
+ Hits          6679     6722      +43     
- Misses        2057     2061       +4     
  Partials       263      263              
Impacted Files Coverage Δ
...edx-vscode-lwc/src/testSupport/testRunner/index.ts 100.00% <ø> (ø)
...s/salesforcedx-vscode-lwc/src/testSupport/index.ts 95.00% <83.33%> (-5.00%) ⬇️
...rc/testSupport/codeLens/lwcTestCodeLensProvider.ts 80.00% <100.00%> (+2.22%) ⬆️
...rc/testSupport/commands/forceLwcTestDebugAction.ts 95.12% <100.00%> (+0.12%) ⬆️
.../src/testSupport/commands/forceLwcTestRunAction.ts 88.46% <100.00%> (+0.46%) ⬆️
...scode-lwc/src/testSupport/testRunner/testRunner.ts 88.40% <100.00%> (-0.49%) ⬇️
...cedx-vscode-lwc/src/testSupport/types/constants.ts 100.00% <100.00%> (ø)
...rc/testSupport/workspace/getCliArgsFromJestArgs.ts 100.00% <100.00%> (ø)
...estSupport/workspace/getLwcTestRunnerExecutable.ts 100.00% <100.00%> (ø)
...rc/testSupport/workspace/getTestWorkspaceFolder.ts 100.00% <100.00%> (ø)
... and 8 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 57f1801...ec9fc88. Read the comment docs.

@xyc xyc requested a review from lcampos March 21, 2020 01:35
@xyc xyc changed the title Testing Support for LWC: support internal workspace Testing Support for LWC: Support internal workspace Mar 21, 2020
@xyc xyc requested a review from a team as a code owner June 15, 2020 21:10
@@ -81,6 +81,7 @@
},
"activationEvents": [
"workspaceContains:sfdx-project.json",
"workspaceContains:../workspace-user.xml",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This ensures proper activation in partial workspace.

@@ -51,6 +51,8 @@ export const messages = {
'SFDX: Navigate to Lightning Web Component Test',
no_lwc_jest_found_text:
'sfdx-lwc-jest is not installed. Install it from https://developer.salesforce.com/docs/component-library/documentation/lwc/lwc.unit_testing_using_jest_installation',
no_lwc_testrunner_found_text:
Copy link
Contributor

Choose a reason for hiding this comment

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

This exposes a url to an internal repo, not sure if that's common practice. @hbc-bindu @ekapner do you have any suggestions here ?

Copy link
Contributor

@ekapner ekapner Jun 22, 2020

Choose a reason for hiding this comment

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

I would say we don't want to expose an internal repo. @lcampos -- Want to make sure I understand your question. And then we can decide next steps. Can they follow the instrux and be successful? If so, we can update the topic to remove the reference to the internal repo. If they must have access to the repo to be successful, that's a problem. And I would need to discuss with Stephanie and @hbc-bindu what the alternatives are.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've removed the url for now (It's gated anyway). @ekapner @hbc-bindu Let me know what you think with the current text. We will provide them with documentation in internal channels.

Xiaoyi Chen and others added 2 commits June 22, 2020 11:02
@xyc xyc force-pushed the xyc/lwc-test-core branch from 87597da to dcae08f Compare June 22, 2020 18:41
Copy link
Contributor

@lcampos lcampos left a comment

Choose a reason for hiding this comment

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

🚢

@xyc xyc merged commit 7e6a7ef into develop Jun 23, 2020
@xyc xyc deleted the xyc/lwc-test-core branch June 23, 2020 20:23
brpowell pushed a commit that referenced this pull request Jul 2, 2020
lwc test: support for internal dev workspace
brpowell pushed a commit that referenced this pull request Jul 2, 2020
lwc test: support for internal dev workspace
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants