Skip to content

Commit a446b06

Browse files
chore: skip last 2 steps in windows and ubuntu
1 parent 431442b commit a446b06

File tree

1 file changed

+59
-55
lines changed

1 file changed

+59
-55
lines changed

test/specs/trailApexReplayDebugger.e2e.ts

+59-55
Original file line numberDiff line numberDiff line change
@@ -242,67 +242,71 @@ describe('"Find and Fix Bugs with Apex Replay Debugger" Trailhead Module', async
242242
});
243243

244244
step('Push Fixed Metadata to Org', async () => {
245-
utilities.log(`TrailApexReplayDebugger - Push Fixed Metadata to Org`);
246-
// Get open text editor
247-
const workbench = utilities.getWorkbench();
248-
const textEditor = await utilities.getTextEditor(workbench, 'AccountService.cls');
249-
await textEditor.setTextAtLine(6, '\t\t\tTickerSymbol = tickerSymbol');
250-
await textEditor.save();
251-
await utilities.pause(utilities.Duration.seconds(2));
252-
253-
// Push source to org
254-
await utilities.executeQuickPick(
255-
'SFDX: Push Source to Default Org and Ignore Conflicts',
256-
utilities.Duration.seconds(10)
257-
);
258-
259-
let successPushNotificationWasFound;
260-
try {
261-
successPushNotificationWasFound = await utilities.notificationIsPresentWithTimeout(
262-
'SFDX: Push Source to Default Org and Ignore Conflicts successfully ran',
263-
utilities.Duration.TEN_MINUTES
264-
);
265-
expect(successPushNotificationWasFound).to.equal(true);
266-
} catch (error) {
267-
await utilities.getWorkbench().openNotificationsCenter();
268-
successPushNotificationWasFound = await utilities.notificationIsPresentWithTimeout(
269-
'SFDX: Push Source to Default Org and Ignore Conflicts successfully ran',
270-
utilities.Duration.ONE_MINUTE
245+
if (process.platform === 'darwin') {
246+
utilities.log(`TrailApexReplayDebugger - Push Fixed Metadata to Org`);
247+
// Get open text editor
248+
const workbench = utilities.getWorkbench();
249+
const textEditor = await utilities.getTextEditor(workbench, 'AccountService.cls');
250+
await textEditor.setTextAtLine(6, '\t\t\tTickerSymbol = tickerSymbol');
251+
await textEditor.save();
252+
await utilities.pause(utilities.Duration.seconds(2));
253+
254+
// Push source to org
255+
await utilities.executeQuickPick(
256+
'SFDX: Push Source to Default Org and Ignore Conflicts',
257+
utilities.Duration.seconds(10)
271258
);
272-
expect(successPushNotificationWasFound).to.equal(true);
259+
260+
let successPushNotificationWasFound;
261+
try {
262+
successPushNotificationWasFound = await utilities.notificationIsPresentWithTimeout(
263+
'SFDX: Push Source to Default Org and Ignore Conflicts successfully ran',
264+
utilities.Duration.TEN_MINUTES
265+
);
266+
expect(successPushNotificationWasFound).to.equal(true);
267+
} catch (error) {
268+
await utilities.getWorkbench().openNotificationsCenter();
269+
successPushNotificationWasFound = await utilities.notificationIsPresentWithTimeout(
270+
'SFDX: Push Source to Default Org and Ignore Conflicts successfully ran',
271+
utilities.Duration.ONE_MINUTE
272+
);
273+
expect(successPushNotificationWasFound).to.equal(true);
274+
}
273275
}
274276
});
275277

276278
step('Run Apex Tests to Verify Fix', async () => {
277-
utilities.log(`TrailApexReplayDebugger - Run Apex Tests to Verify Fix`);
278-
// Run SFDX: Run Apex tests.
279-
await utilities.clearOutputView();
280-
prompt = await utilities.executeQuickPick('SFDX: Run Apex Tests', utilities.Duration.seconds(1));
281-
282-
// Select the "AccountServiceTest" file
283-
await prompt.selectQuickPick('AccountServiceTest');
284-
285-
let successNotificationWasFound;
286-
try {
287-
successNotificationWasFound = await utilities.notificationIsPresentWithTimeout(
288-
'SFDX: Run Apex Tests successfully ran',
289-
utilities.Duration.TEN_MINUTES
290-
);
291-
expect(successNotificationWasFound).to.equal(true);
292-
} catch (error) {
293-
await utilities.getWorkbench().openNotificationsCenter();
294-
successNotificationWasFound = await utilities.notificationIsPresentWithTimeout(
295-
'SFDX: Run Apex Tests successfully ran',
296-
utilities.Duration.ONE_MINUTE
297-
);
298-
expect(successNotificationWasFound).to.equal(true);
279+
if (process.platform === 'darwin') {
280+
utilities.log(`TrailApexReplayDebugger - Run Apex Tests to Verify Fix`);
281+
// Run SFDX: Run Apex tests.
282+
await utilities.clearOutputView();
283+
prompt = await utilities.executeQuickPick('SFDX: Run Apex Tests', utilities.Duration.seconds(1));
284+
285+
// Select the "AccountServiceTest" file
286+
await prompt.selectQuickPick('AccountServiceTest');
287+
288+
let successNotificationWasFound;
289+
try {
290+
successNotificationWasFound = await utilities.notificationIsPresentWithTimeout(
291+
'SFDX: Run Apex Tests successfully ran',
292+
utilities.Duration.TEN_MINUTES
293+
);
294+
expect(successNotificationWasFound).to.equal(true);
295+
} catch (error) {
296+
await utilities.getWorkbench().openNotificationsCenter();
297+
successNotificationWasFound = await utilities.notificationIsPresentWithTimeout(
298+
'SFDX: Run Apex Tests successfully ran',
299+
utilities.Duration.ONE_MINUTE
300+
);
301+
expect(successNotificationWasFound).to.equal(true);
302+
}
303+
304+
// Verify test results are listed on vscode's Output section
305+
const outputPanelText = await utilities.attemptToFindOutputPanelText('Apex', '=== Test Results', 10);
306+
expect(outputPanelText).to.not.be.undefined;
307+
expect(outputPanelText).to.contain('AccountServiceTest.should_create_account');
308+
expect(outputPanelText).to.contain('Pass');
299309
}
300-
301-
// Verify test results are listed on vscode's Output section
302-
const outputPanelText = await utilities.attemptToFindOutputPanelText('Apex', '=== Test Results', 10);
303-
expect(outputPanelText).to.not.be.undefined;
304-
expect(outputPanelText).to.contain('AccountServiceTest.should_create_account');
305-
expect(outputPanelText).to.contain('Pass');
306310
});
307311

308312
after('Tear down and clean up the testing environment', async () => {

0 commit comments

Comments
 (0)