@datacamp/learn-vm-scripts 1.8.5 → 1.8.7

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.
Files changed (2) hide show
  1. package/dist/index.cjs +14 -18
  2. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -366605,7 +366605,10 @@ async function setupPuppeteerPage({
366605
366605
  headless: false,
366606
366606
  defaultViewport: null,
366607
366607
  args: ["--start-maximized", "--enable-save-password-bubble"],
366608
- ignoreDefaultArgs: ["--enable-automation"],
366608
+ ignoreDefaultArgs: [
366609
+ "--enable-automation",
366610
+ "--disable-blink-features=AutomationControlled"
366611
+ ],
366609
366612
  userDataDir
366610
366613
  });
366611
366614
  const pages = await browser.pages();
@@ -366740,22 +366743,6 @@ async function loginToAzure({
366740
366743
  }
366741
366744
 
366742
366745
  // src/awsLogin.ts
366743
- var oldUi = async (page) => {
366744
- const rememberAccountCheckbox = 'input[id="remember_account_checkbox"]';
366745
- await page.waitForSelector(rememberAccountCheckbox);
366746
- await page.click(rememberAccountCheckbox);
366747
- const signInButton = 'a[id="signin_button"]';
366748
- await page.waitForSelector(signInButton);
366749
- await page.click(signInButton);
366750
- };
366751
- var newUi = async (page) => {
366752
- const rememberAccountCheckbox = 'span[data-testid="remember-account"] input[type="checkbox"]';
366753
- await page.waitForSelector(rememberAccountCheckbox);
366754
- await page.click(rememberAccountCheckbox);
366755
- const signInButton = 'button[type="submit"]';
366756
- await page.waitForSelector(signInButton);
366757
- await page.click(signInButton);
366758
- };
366759
366746
  async function loginToAWS({
366760
366747
  url,
366761
366748
  username,
@@ -366778,7 +366765,16 @@ async function loginToAWS({
366778
366765
  querySelector: 'input[name="password"]',
366779
366766
  value: password
366780
366767
  });
366781
- await Promise.any([oldUi(page), newUi(page)]);
366768
+ try {
366769
+ const closeFeedbackPopupButton = 'button[title="Close feedback dialog"]';
366770
+ await page.waitForSelector(closeFeedbackPopupButton, { timeout: 2e3 });
366771
+ await page.click(closeFeedbackPopupButton);
366772
+ } catch {
366773
+ log("Feedback popup not found or not clickable");
366774
+ }
366775
+ const signInButton = 'button[type="submit"]';
366776
+ await page.waitForSelector(signInButton);
366777
+ await page.click(signInButton);
366782
366778
  log("Logged in to AWS successfully");
366783
366779
  }
366784
366780
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datacamp/learn-vm-scripts",
3
- "version": "1.8.5",
3
+ "version": "1.8.7",
4
4
  "repository": "git@github.com:datacamp-engineering/learn-vm-scripts.git",
5
5
  "description": "Scripts used by VMs in learn.",
6
6
  "main": "./dist/index.cjs",