Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests/account test is broken #3239

Open
ocdtrekkie opened this issue Feb 22, 2020 · 1 comment · May be fixed by #3614
Open

tests/account test is broken #3239

ocdtrekkie opened this issue Feb 22, 2020 · 1 comment · May be fixed by #3614
Labels
sandstorm-dev Issues hacking on Sandstorm

Comments

@ocdtrekkie
Copy link
Collaborator

Important that we don't lose these, so making tracking issues, so we can get the tests running clean again.
<kentonv> Also broken, but my fault: tests/account because I removed the ability to upgrade demo accounts,

@ocdtrekkie ocdtrekkie added the sandstorm-dev Issues hacking on Sandstorm label Feb 22, 2020
@ocdtrekkie ocdtrekkie added this to the Fix tests (2020) milestone Mar 23, 2020
@zenhack
Copy link
Collaborator

zenhack commented Mar 24, 2022

I tried just patching out the bit at the beginning that upgrades a demo account, and instead logs in to a fresh dev account:

diff --git a/tests/tests/account.js b/tests/tests/account.js
index 538221d5..109bf240 100644
--- a/tests/tests/account.js
+++ b/tests/tests/account.js
@@ -37,21 +37,15 @@ module.exports["Test link credentials"] = function (browser) {
   browser
     .init()
 
-    // Upgrade a demo account to a real account by linking an credential.
-    .url(browser.launch_url + "/demo")
-    .disableGuidedTour()
-    .waitForElementVisible(".demo-startup-modal .start", medium_wait)
-    .click(".demo-startup-modal .start")
-    .disableGuidedTour()
-    .waitForElementPresent(".main-content>.app-list", medium_wait)
-    .click(".login>button.show-popup")
+    // Sign up with a new dev account.
+    .url(browser.launch_url)
     .waitForElementVisible(".login-buttons-list", short_wait)
     .click(".login-buttons-list button.dev")
     .waitForElementVisible("input[name=name]", short_wait)
     .setValue("input[name=name]", devName1)
     .submitForm(".login-buttons-list form.dev")
     .waitForElementVisible("form.account-profile-editor", short_wait) // confirm profile
-    // Profile defaulted to new credential's name, not "Demo User".
+    // Profile defaulted to new credential's name.
     .assert.attributeContains("form.account-profile-editor input[name=nameInput]", "value", devName1)
     .submitForm("form.account-profile-editor")
     .execute(function () { return Meteor.user().profile.identicon; }, [], function (response) {

But, in this case the error message re: linking an in-use credential to another account never appears -- it goes through. Experimenting manually shows that this only fails for dev accounts entered in the "custom" box; if you try to log in as dave and then link alice it fails.

zenhack added a commit to zenhack/sandstorm that referenced this issue Apr 3, 2022
This fixes sandstorm-io#3239 by providing a config option to re-enable the ability
to upgrade demo accounts to full accounts, which was removed in order to
allow alpha to act as the demo server when oasis was shut down.

Unfortunately, this seems to break *other* tests. The handful I examined
resulted in permission errors trying to upload the test app; presumably
when this is enabled our test accounts are somehow getting marked as
not allowed to upload their own apps.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sandstorm-dev Issues hacking on Sandstorm
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants