@bigbinary/neeto-commons-frontend 2.1.0 → 2.1.2

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/cypress-utils.js CHANGED
@@ -842,11 +842,14 @@ var verifyOrganizationTab = function verifyOrganizationTab() {
842
842
  });
843
843
  cy.get(profileSelectors.organizationSettingsButton).should("have.text", profileTexts.myOrganization);
844
844
  cy.globalState("subdomainName").then(function (subdomainName) {
845
- return cy.openInSameTabOnClick({
846
- url: requestApis.settingsPath(subdomainName),
847
- selector: profileSelectors.organizationSettingsButton,
848
- alias: "navigateToSettings"
845
+ cy.window().then(function (win) {
846
+ cy.stub(win, "open").as("navigateToSettings").callsFake(function (newUrl) {
847
+ return win.location.href = newUrl;
848
+ });
849
849
  });
850
+ cy.get(profileSelectors.organizationSettingsButton).invoke("click");
851
+ cy.get("@navigateToSettings").should("be.called");
852
+ cy.url().should("include", requestApis.settingsPath(subdomainName));
850
853
  });
851
854
  cy.get(commonSelectors.heading).should("have.text", commonTexts.settings);
852
855
  cy.globalState("subdomainName").then(function (subdomainName) {
@@ -1325,16 +1328,8 @@ var createOrganization = function createOrganization(_ref) {
1325
1328
  var defaultOtp = "123456";
1326
1329
  var appNameInLowerCase = appName.toLowerCase();
1327
1330
  var isNeetoAuth = appNameInLowerCase === "neetoauth";
1328
- if (isNeetoAuth) cy.visit("https://app.neetoauth.".concat(env.tld, "/signups/new"));else {
1329
- var startingUrl = "https://www.neeto.com/".concat(appNameInLowerCase).concat(env.isStaging ? "?env=staging" : "");
1330
- cy.visit(startingUrl);
1331
- if (isStagingEnv) {
1332
- cy.get(signUpSelectors.tryFreeButton, {
1333
- timeout: 10000
1334
- }).should("have.attr", "href").and("include", "https://app.neetoauth.net/");
1335
- }
1336
- cy.get(signUpSelectors.tryFreeButton).invoke("removeAttr", "target").click();
1337
- }
1331
+ var authUrl = "https://app.neetoauth.".concat(env.tld, "/signups/new");
1332
+ isNeetoAuth ? cy.visit(authUrl) : cy.visit("".concat(authUrl, "?redirect_uri=").concat(appNameInLowerCase, ".").concat(env.tld));
1338
1333
  cy.clearAndType(signUpSelectors.emailTextField, email);
1339
1334
  cy.intercept({
1340
1335
  url: requestApis.signUp,