Skip to content

Commit 1600037

Browse files
committed
Merge branch 'develop' into ms/fsp-fss
2 parents f2464f5 + 07d9967 commit 1600037

22 files changed

Lines changed: 493 additions & 256 deletions

File tree

.github/workflows/apexE2E.yml

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ name: Apex End to End Tests
33
on:
44
workflow_dispatch:
55
inputs:
6-
createOasDoc:
7-
description: 'Create OAS Doc'
8-
required: false
9-
default: true
10-
type: boolean
6+
# createOasDoc:
7+
# description: 'Create OAS Doc'
8+
# required: false
9+
# default: true
10+
# type: boolean
1111
apexLsp:
1212
description: 'Apex LSP'
1313
required: false
@@ -40,11 +40,11 @@ on:
4040

4141
workflow_call:
4242
inputs:
43-
createOasDoc:
44-
description: 'Create OAS Doc'
45-
required: false
46-
default: true
47-
type: boolean
43+
# createOasDoc:
44+
# description: 'Create OAS Doc'
45+
# required: false
46+
# default: true
47+
# type: boolean
4848
apexLsp:
4949
description: 'Apex LSP'
5050
required: false
@@ -76,15 +76,15 @@ on:
7676
type: string
7777

7878
jobs:
79-
createOasDoc:
80-
if: ${{ inputs.createOasDoc }}
81-
uses: ./.github/workflows/runE2ETest.yml
82-
secrets: inherit
83-
with:
84-
testToRun: 'createOasDoc.e2e.js'
85-
vscodeVersion: ${{ inputs.vscodeVersion }}
86-
runId: ${{ inputs.runId }}
87-
os: '["ubuntu-latest"]'
79+
# createOasDoc:
80+
# if: ${{ inputs.createOasDoc }}
81+
# uses: ./.github/workflows/runE2ETest.yml
82+
# secrets: inherit
83+
# with:
84+
# testToRun: 'createOasDoc.e2e.js'
85+
# vscodeVersion: ${{ inputs.vscodeVersion }}
86+
# runId: ${{ inputs.runId }}
87+
# os: '["ubuntu-latest"]'
8888

8989
apexLSP:
9090
if: ${{ inputs.apexLsp }}

.github/workflows/publishVSCode.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,3 +83,24 @@ jobs:
8383
with:
8484
changeCaseId: ${{ needs.ctc-open.outputs.changeCaseId }}
8585
status: Not Implemented
86+
87+
# Set repo variable CBW_TRIGGER_ENABLED=false to disable dispatch to code-builder-web.
88+
# Default (unset): dispatch after publish. Use when publishing without CBW promotion.
89+
trigger-cbw-release:
90+
needs: [publish, prepare-environment-from-main]
91+
if: needs.publish.result == 'success' && vars.CBW_TRIGGER_ENABLED != 'false'
92+
continue-on-error: true
93+
runs-on: ubuntu-latest
94+
steps:
95+
- name: Trigger Code Builder Web release
96+
env:
97+
GH_TOKEN: ${{ secrets.IDEE_GH_TOKEN }}
98+
run: |
99+
VERSION="${{ needs.prepare-environment-from-main.outputs.RELEASE_VERSION }}"
100+
echo "Dispatching extension-publish event to code-builder-web with version $VERSION"
101+
gh api repos/forcedotcom/code-builder-web/dispatches \
102+
--method POST \
103+
-f event_type=extension-publish \
104+
-f "client_payload[version]=$VERSION" \
105+
-f "client_payload[source]=publishVSCode"
106+
echo "Dispatch sent successfully"

.github/workflows/runE2ETest.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -395,8 +395,8 @@ jobs:
395395
with:
396396
name: screenshots-${{ inputs.testToRun }}-${{ matrix.os }}-${{ inputs.vscodeVersion }}
397397
path: salesforcedx-vscode/test-resources/screenshots
398-
- uses: actions/upload-artifact@v4
399-
if: ${{ inputs.testToRun == 'createOasDoc.e2e.js' }}
400-
with:
401-
name: llm-logs-${{ matrix.os }}-${{ inputs.vscodeVersion }}
402-
path: salesforcedx-vscode/e2e-temp/TempProject-CreateOASDoc/llm-logs
398+
# - uses: actions/upload-artifact@v4
399+
# if: ${{ inputs.testToRun == 'createOasDoc.e2e.js' }}
400+
# with:
401+
# name: llm-logs-${{ matrix.os }}-${{ inputs.vscodeVersion }}
402+
# path: salesforcedx-vscode/e2e-temp/TempProject-CreateOASDoc/llm-logs

.github/workflows/triggerE2EForCommit.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -133,12 +133,13 @@ jobs:
133133
vscodeVersion: ${{ inputs.vscodeVersion || vars.MAX_REDHAT_VSCODE_VERSION || 'latest' }}
134134
runId: ${{ inputs.runId }}
135135

136-
# 📚 OpenAPI Documentation
137-
docs-create-oas-doc:
138-
uses: ./.github/workflows/runE2ETest.yml
139-
secrets: inherit
140-
with:
141-
testToRun: 'createOasDoc.e2e.js'
142-
vscodeVersion: ${{ inputs.vscodeVersion || vars.MAX_REDHAT_VSCODE_VERSION || 'latest' }}
143-
runId: ${{ inputs.runId }}
144-
os: '["ubuntu-latest"]'
136+
# Commenting out since it's broken
137+
# # 📚 OpenAPI Documentation
138+
# docs-create-oas-doc:
139+
# uses: ./.github/workflows/runE2ETest.yml
140+
# secrets: inherit
141+
# with:
142+
# testToRun: 'createOasDoc.e2e.js'
143+
# vscodeVersion: ${{ inputs.vscodeVersion || vars.MAX_REDHAT_VSCODE_VERSION || 'latest' }}
144+
# runId: ${{ inputs.runId }}
145+
# os: '["ubuntu-latest"]'

contributing/publishing.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ find ~/Downloads/v64.8.0 -type f -name "*.vsix" -exec code --install-extension {
8080

8181
After completing your release testing following our internal template, approve the publish job "Publish in Microsoft Marketplace" and "Publish in Open VSX Registry" to allow the extensions to be uploaded and complete the release process.
8282

83+
**Code Builder Web promotion:** After publishing to the MS Marketplace, the workflow dispatches to `code-builder-web` to trigger a CBW release and auto-promote to production. Set repo variable `CBW_TRIGGER_ENABLED=false` (Settings → Secrets and variables → Actions → Variables) to publish without triggering CBW. Default (unset) enables the trigger.
84+
8385
## Troubleshooting
8486

8587
- 401 errors on publish? You probably need to update the VSCE PAT. https://salesforce.quip.com/E8GWA5TuI8jp

packages/salesforcedx-vscode-automation-tests/test/specs/auraLsp.e2e.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
* Licensed under the BSD 3-Clause license.
55
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
66
*/
7-
import { Duration, TestReqConfig, ProjectShapeOption } from '@salesforce/salesforcedx-vscode-test-tools/lib/src/core';
8-
import { log, pause } from '@salesforce/salesforcedx-vscode-test-tools/lib/src/core/miscellaneous';
7+
import { Duration, ProjectShapeOption, TestReqConfig } from '@salesforce/salesforcedx-vscode-test-tools/lib/src/core';
8+
import { log, openFile, pause } from '@salesforce/salesforcedx-vscode-test-tools/lib/src/core/miscellaneous';
99
import {
1010
retryOperation,
1111
verifyNotificationWithRetry
@@ -20,6 +20,7 @@ import {
2020
reloadWindow
2121
} from '@salesforce/salesforcedx-vscode-test-tools/lib/src/ui-interaction';
2222
import { expect } from 'chai';
23+
import * as path from 'node:path';
2324
import { By, after } from 'vscode-extension-tester';
2425
import { defaultExtensionConfigs } from '../testData/constants';
2526
import { getFolderPath } from '../utils/buildFilePathHelper';
@@ -63,6 +64,7 @@ describe('Aura LSP', () => {
6364
it('Go to Definition', async () => {
6465
logTestStart(testSetup, 'Go to Definition');
6566
// Get open text editor
67+
await openFile(path.join(auraFolderPath, 'aura1.cmp'));
6668
const workbench = getWorkbench();
6769
const textEditor = await getTextEditor(workbench, 'aura1.cmp');
6870

packages/salesforcedx-vscode-automation-tests/test/specs/authentication.e2e.ts

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ import {
2323
executeQuickPick,
2424
findQuickPickItem,
2525
getStatusBarItemWhichIncludes,
26-
getWorkbench
26+
getWorkbench,
27+
reloadWindow
2728
} from '@salesforce/salesforcedx-vscode-test-tools/lib/src/ui-interaction';
2829
import { expect } from 'chai';
2930
import { By, InputBox, after } from 'vscode-extension-tester';
@@ -75,17 +76,19 @@ describe('Authentication', () => {
7576
);
7677
// In the drop down menu that appears, verify the SFDX auth org commands are present...
7778
const expectedSfdxCommands = [
78-
' SFDX: Authorize an Org',
79-
' SFDX: Authorize a Dev Hub',
80-
' SFDX: Create a Default Scratch Org...',
81-
' SFDX: Authorize an Org using Session ID',
82-
' SFDX: Remove Deleted and Expired Orgs'
79+
'SFDX: Authorize an Org',
80+
'SFDX: Authorize a Dev Hub',
81+
'SFDX: Create a Default Scratch Org...',
82+
'SFDX: Authorize an Org using Session ID',
83+
'SFDX: Remove Deleted and Expired Orgs'
8384
];
8485
const foundSfdxCommands: string[] = [];
8586
for (const quickPick of orgPickerOptions) {
86-
const label = (await quickPick.getAttribute('aria-label')).slice(5);
87-
if (expectedSfdxCommands.includes(label)) {
88-
foundSfdxCommands.push(label);
87+
const ariaLabel = await quickPick.getAttribute('aria-label');
88+
for (const expectedCommand of expectedSfdxCommands) {
89+
if (ariaLabel.includes(expectedCommand) && !foundSfdxCommands.includes(expectedCommand)) {
90+
foundSfdxCommands.push(expectedCommand);
91+
}
8992
}
9093
}
9194

@@ -96,12 +99,12 @@ describe('Authentication', () => {
9699
});
97100
}
98101

99-
// In the drop down menu that appears, select "vscodeOrg - user_name".
102+
// In the drop down menu that appears, select the dev hub org by alias.
100103
const environmentSettings = EnvironmentSettings.getInstance();
101104
const devHubAliasName = environmentSettings.devHubAliasName;
102-
const devHubUserName = environmentSettings.devHubUserName;
103105
const inputBox = await InputBox.create();
104-
await inputBox.selectQuickPick(`${devHubAliasName} - ${devHubUserName}`);
106+
const orgWasFound = await findQuickPickItem(inputBox, devHubAliasName, false, true);
107+
expect(orgWasFound).to.equal(true);
105108

106109
// Need to pause here for the "set a default org" command to finish.
107110
await pause(Duration.seconds(5));
@@ -116,10 +119,9 @@ describe('Authentication', () => {
116119
);
117120
expect(expectedOutputWasFound).to.not.be.undefined;
118121

119-
// Look for "vscodeOrg" in the status bar.
120-
const statusBar = workbench.getStatusBar();
121-
const vscodeOrgItem = await statusBar.getItem(`plug ${devHubAliasName}, Change Default Org`);
122-
expect(vscodeOrgItem).to.not.be.undefined;
122+
// Look for the dev hub alias in the status bar.
123+
const devHubStatusBarItem = await getStatusBarItemWhichIncludes(devHubAliasName);
124+
expect(devHubStatusBarItem).to.not.be.undefined;
123125
});
124126

125127
it('Run SFDX: Create a Default Scratch Org', async () => {
@@ -135,6 +137,10 @@ describe('Authentication', () => {
135137

136138
it('Run SFDX: Set the Scratch Org As the Default Org', async () => {
137139
logTestStart(testSetup, 'Running SFDX: Set the Scratch Org As the Default Org');
140+
141+
// Reload window to get the new scratch org to appear in the list of orgs.
142+
await reloadWindow(Duration.seconds(30));
143+
138144
const inputBox = await executeQuickPick('SFDX: Set a Default Org', Duration.seconds(10));
139145

140146
const scratchOrgQuickPickItemWasFound = await findQuickPickItem(inputBox, scratchOrgAliasName, false, true);

packages/salesforcedx-vscode-automation-tests/test/specs/lwcLsp.e2e.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,27 @@
77
import { retryOperation, verifyNotificationWithRetry } from '@salesforce/salesforcedx-vscode-test-tools/lib/src';
88
import {
99
Duration,
10-
pause,
11-
log,
1210
ProjectShapeOption,
13-
TestReqConfig
11+
TestReqConfig,
12+
log,
13+
openFile,
14+
pause
1415
} from '@salesforce/salesforcedx-vscode-test-tools/lib/src/core';
1516
import { createLwc } from '@salesforce/salesforcedx-vscode-test-tools/lib/src/salesforce-components';
1617
import { TestSetup } from '@salesforce/salesforcedx-vscode-test-tools/lib/src/testSetup';
1718
import {
19+
closeAllEditors,
1820
executeQuickPick,
19-
getWorkbench,
2021
getTextEditor,
21-
reloadWindow,
22+
getWorkbench,
2223
moveCursorWithFallback,
23-
closeAllEditors
24+
reloadWindow
2425
} from '@salesforce/salesforcedx-vscode-test-tools/lib/src/ui-interaction';
2526
import { expect } from 'chai';
27+
import * as path from 'node:path';
2628
import { By, after } from 'vscode-extension-tester';
2729
import { defaultExtensionConfigs } from '../testData/constants';
2830
import { getFolderPath } from '../utils/buildFilePathHelper';
29-
// import { tryToHideCopilot } from '../utils/copilotHidingHelper';
3031
import { logTestStart } from '../utils/loggingHelper';
3132

3233
describe('LWC LSP', () => {
@@ -70,6 +71,7 @@ describe('LWC LSP', () => {
7071
it('Go to Definition (JavaScript)', async () => {
7172
logTestStart(testSetup, 'Go to Definition (Javascript)');
7273
// Get open text editor
74+
await openFile(path.join(lwcFolderPath, 'lwc1.js'));
7375
const workbench = getWorkbench();
7476
const textEditor = await getTextEditor(workbench, 'lwc1.js');
7577

packages/salesforcedx-vscode-automation-tests/test/specs/snippets.e2e.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ import { TestSetup } from '@salesforce/salesforcedx-vscode-test-tools/lib/src/te
1717
import {
1818
getWorkbench,
1919
getTextEditor,
20-
executeQuickPick
20+
executeQuickPick,
21+
reloadWindow
2122
} from '@salesforce/salesforcedx-vscode-test-tools/lib/src/ui-interaction';
2223
import { expect } from 'chai';
2324
import { By, after } from 'vscode-extension-tester';
2425
import { defaultExtensionConfigs } from '../testData/constants';
2526
import { getFolderPath } from '../utils/buildFilePathHelper';
26-
import { tryToHideCopilot } from '../utils/copilotHidingHelper';
2727
import { logTestStart } from '../utils/loggingHelper';
2828

2929
describe('Snippets', () => {
@@ -41,9 +41,6 @@ describe('Snippets', () => {
4141
before('Set up the testing environment', async () => {
4242
testSetup = await TestSetup.setUp(testReqConfig);
4343
classesFolderPath = getFolderPath(testSetup.projectFolderPath!, 'classes');
44-
45-
// Hide copilot
46-
await tryToHideCopilot();
4744
});
4845

4946
it.skip('Use out-of-the-box Apex Snippets', async () => {
@@ -138,10 +135,13 @@ describe('Snippets', () => {
138135
await inputBox.confirm();
139136
await inputBox.confirm();
140137

138+
// Reload window to get the LWC to be indexed by the LWC Language Server
139+
await reloadWindow(Duration.seconds(20));
140+
141141
// Type snippet "lwc", select "lwc-event" and check it inserted the right thing
142142
const textEditor = await getTextEditor(workbench, 'lwc.js');
143143
await textEditor.typeText('lwc');
144-
await pause(Duration.seconds(1));
144+
await pause(Duration.seconds(5));
145145
const autocompletionOptions = await workbench.findElements(By.css('div.monaco-list-row.show-file-icons'));
146146
const ariaLabel = await autocompletionOptions[2].getAttribute('aria-label');
147147
expect(ariaLabel).to.contain('lwc-event');

packages/salesforcedx-vscode-automation-tests/test/specs/templates.e2e.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,10 @@ describe('Templates', () => {
310310
// Sample Analytics Template
311311
it('Create a Sample Analytics Template', async () => {
312312
logTestStart(testSetup, 'Create a Sample Analytics Template');
313+
314+
// Collapse all folders in the Explorer view.
315+
await executeQuickPick('Collapse Folders in Explorer', Duration.seconds(1));
316+
313317
// Clear the output panel, then use the Command palette to run, "SFDX: Create Sample Analytics Template".
314318
const workbench = getWorkbench();
315319
await clearOutputView();

0 commit comments

Comments
 (0)