@datacamp/learn-vm-scripts 1.8.1 → 1.8.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +30 -7
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -366663,12 +366663,26 @@ var setInput = ({
|
|
|
366663
366663
|
|
|
366664
366664
|
// src/azureLogin.ts
|
|
366665
366665
|
var closeOnboardingPopups = async (page) => {
|
|
366666
|
-
|
|
366667
|
-
|
|
366668
|
-
|
|
366669
|
-
|
|
366670
|
-
|
|
366671
|
-
|
|
366666
|
+
try {
|
|
366667
|
+
const welcomeSurveyCloseButton = 'span.fxs-welcomesurvey-close-icon[role="button"]';
|
|
366668
|
+
await page.waitForSelector(welcomeSurveyCloseButton);
|
|
366669
|
+
await page.click(welcomeSurveyCloseButton);
|
|
366670
|
+
const popupButton = "button.fxs-teaching-bubble-close";
|
|
366671
|
+
await page.waitForSelector(popupButton);
|
|
366672
|
+
await page.click(popupButton);
|
|
366673
|
+
} catch {
|
|
366674
|
+
log("Onboarding popups not found or not clickable");
|
|
366675
|
+
}
|
|
366676
|
+
};
|
|
366677
|
+
var closeSideNavigation = async (page) => {
|
|
366678
|
+
try {
|
|
366679
|
+
const sideNavCollapseButton = 'button[aria-label="Collapse side navigation panel"]';
|
|
366680
|
+
await page.waitForSelector(sideNavCollapseButton);
|
|
366681
|
+
await page.click(sideNavCollapseButton);
|
|
366682
|
+
log("Side navigation panel collapsed");
|
|
366683
|
+
} catch {
|
|
366684
|
+
log("Side navigation collapse button not found or not clickable");
|
|
366685
|
+
}
|
|
366672
366686
|
};
|
|
366673
366687
|
async function loginToAzure({
|
|
366674
366688
|
url,
|
|
@@ -366707,13 +366721,21 @@ async function loginToAzure({
|
|
|
366707
366721
|
log("Password entered successfully");
|
|
366708
366722
|
log("Ensuring user stays signed in ...");
|
|
366709
366723
|
await page.waitForSelector('[type="submit"]');
|
|
366710
|
-
await page.click('[type="submit"]');
|
|
366724
|
+
await Promise.all([page.waitForNavigation(), page.click('[type="submit"]')]);
|
|
366711
366725
|
if (skipOnboarding) {
|
|
366712
366726
|
log("Skipping onboarding...");
|
|
366713
366727
|
void closeOnboardingPopups(page).catch((error) => {
|
|
366714
366728
|
console.error("Error in onboarding of Azure login: ", error);
|
|
366715
366729
|
});
|
|
366716
366730
|
}
|
|
366731
|
+
if (url.includes("m365.cloud.microsoft/chat")) {
|
|
366732
|
+
void closeSideNavigation(page).catch((error) => {
|
|
366733
|
+
console.error(
|
|
366734
|
+
"Error closing side navigation for Microsoft 365 copilot chat: ",
|
|
366735
|
+
error
|
|
366736
|
+
);
|
|
366737
|
+
});
|
|
366738
|
+
}
|
|
366717
366739
|
log("Logged in to Azure successfully");
|
|
366718
366740
|
}
|
|
366719
366741
|
|
|
@@ -366965,6 +366987,7 @@ async function loginToN8N({
|
|
|
366965
366987
|
});
|
|
366966
366988
|
await page.waitForSelector(signInButtonSelector);
|
|
366967
366989
|
await page.click(signInButtonSelector);
|
|
366990
|
+
await setFullscreen(page, "N8N");
|
|
366968
366991
|
log("Logged in to N8N successfully");
|
|
366969
366992
|
}
|
|
366970
366993
|
|
package/package.json
CHANGED