Commit Graph

16 Commits

Author SHA1 Message Date
James Williams 7c8242ba54 don't show "doesn't match" password error without confirm box
test plan:
* invite a new user into a course
* use the link from the registration email to confirm
 the account, but don't enter in a password
* should receive a error that the password
 is too short but not a misplaced "doesn't match" error

closes #ADMIN-312

Change-Id: Ib806fd76d602be7236051715862100c59fbb863d
Reviewed-on: https://gerrit.instructure.com/131468
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2017-11-02 22:11:03 +00:00
Landon Wilkins c12f8666df da licença part 62
add consistent license headers to all source files

Change-Id: Ia3107f34470b6e8687df2baed79fed58a728f240
Reviewed-on: https://gerrit.instructure.com/110313
Tested-by: Jenkins
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2017-05-01 21:24:33 +00:00
James Williams 2452b580b5 remove duplicated code for resending sms confirmation
turns out it was hitting the endpoint twice
(other one via communication_channels.js)

test plan:
* have an unconfirmed sms communication channel
* click on the address and press "Re-send Confirmation Code"
* it should not send two messages in "/messages"

closes #CNVS-35966

Change-Id: Iff5150664534025e04192c0502542b1f572a3af4
Reviewed-on: https://gerrit.instructure.com/107452
Tested-by: Jenkins
Reviewed-by: Dan Minkevitch <dan@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2017-04-05 19:07:20 +00:00
Deepeeca Soundarrajan bd238b5de5 spec: Add spec for communication channel confirmation
Change-Id: I1cf9c5731635eed04e39f0f56750902cee45f2a4
Reviewed-on: https://gerrit.instructure.com/80893
Reviewed-by: Michael Hargiss <mhargiss@instructure.com>
Tested-by: Jenkins
Product-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
2016-05-31 16:57:39 +00:00
Ryan Shaw c45fa9f564 spec: fix some specs that fail when newUI is on
refs: CNVS-29532

ENV['CANVAS_FORCE_USE_NEW_STYLES'] is true in the
jenkins hourly NewUI only build. so each of these
were failing there.

as far as the formatting of these changes, I tried
to do it in a way to make it so the process of
removing the oldUI code path this summer is explicit,
easy and clear.

Change-Id: Icb4653c2b5a32a28d192fe228ad8b480a25423bd
Reviewed-on: https://gerrit.instructure.com/80203
Tested-by: Jenkins
Reviewed-by: Robert Lamb <rlamb@instructure.com>
Product-Review: Robert Lamb <rlamb@instructure.com>
QA-Review: Robert Lamb <rlamb@instructure.com>
2016-05-23 22:10:29 +00:00
Jon Jensen 717680037e spec: rework negative dom assertions
fixes SD-1063, speeds up :allthethings:

negative DOM assertions are 💩, but if we must have them, make them
more tolerable. the old way:

  expect(f(".something-that-should-be-gone")).to be_nil
  expect(fj("buhleeted:visible")).to be_nil
  expect(fln("Can't Click Here Anymore").to be_nil

the new way:

  expect(container).not_to contain_css(".something-that-should-be-gone")
  expect(container).not_to contain_jqcss("buhleeted:visible")
  expect(container).not_to contain_link("Can't Click Here Anymore")

(you can of course use these new matchers for positive assertions as well)

although it's a tad more verbose, the new way is better because:

1. it's smart enough to bail once the assertion is met (versus the old way
   which would take 10-20 seconds to not find the thing and *then* run the
   assertion)
2. it requires them to be scoped, to reduce the likelihood of false
   positives (e.g. if the page is totally broken, then of course the
   assertion would pass)

also reworked the various flash message assertions... see the new
expect_flash_message and expect_no_flash_message

this should remove over an hour of linear time off the build (10 sec per
old assertion, except fj ones which took 20 sec)... so like a minute of
actual time, cuz parallelization :P

a consequence of this change is that f/fj/ff/ffj now raise if nothing is
found, so you really have to go out of your way to do it the bad way. so
don't :)

Change-Id: I0fe6e8500947c27d748b70bb2cda585edf71e427
Reviewed-on: https://gerrit.instructure.com/78420
Tested-by: Jenkins
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>
2016-05-03 20:05:46 +00:00
Alex Boyd d3ebff04a9 Link to reset bounce counts for communication channels
Fixes CNVS-20747

Test plan:
 - Create a user
 - Add an email address to the user
   - The address doesn't need to be able to actually receive
     messages, so put anything you want in here
 - Make note of the user's id
 - Assuming the user's id is 42, open a rails console and type:
     c = User.find(42).email_channel
     c.bounce_count = 3
     c.save!
 - Log in as the user (actually log in, don't just masquerade)
 - Visit the user's settings page
 - Verify you see the usual warning triangle next to the user's
   email address
 - Verify you don't see the reset icon (just a refresh-like icon,
   two arrows pointing in a circle)
 - Log in as a siteadmin
 - Masquerade as the user
 - Visit the user's settings page
 - Verify you see both the warning triangle and the reset icon
 - Click the reset icon
 - Verify that the reset icon and the warning triangle go away
 - Refresh the page and verify that they're still gone
 - Assuming the user's id is 42, open a rails console and type:
     c = User.find(42).email_channel
     c.bounce_count = 1
     c.save!
 - Log in as a siteadmin
 - Masquerade as the user
 - Visit the user's settings page
 - Verify you see only the reset icon and not the warning
   triangle
 - Click the reset icon
 - Verify that it goes away
 - Refresh the page and verify that it's still gone

Change-Id: Ibd9d2e04555be2ec3eae811fd93f2cba0645d870
Reviewed-on: https://gerrit.instructure.com/55139
Reviewed-by: Joel Hough <joel@instructure.com>
Tested-by: Jenkins
QA-Review: Adrian Russell <arussell@instructure.com>
Product-Review: Allison Weiss <allison@instructure.com>
2015-11-03 00:43:35 +00:00
cguanzon 35b9cae005 spec:selenium: in-process server selenium tests is now a context
- reasoning: this group contains set-up and teardown,
  it does not include 'it' blocks

Change-Id: I1803420a5c7f59246f3af211e42ced808a994c3f
Reviewed-on: https://gerrit.instructure.com/60329
Tested-by: Jenkins
Reviewed-by: Matt Fairbourn <mfairbourn@instructure.com>
Product-Review: Matt Fairbourn <mfairbourn@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
2015-08-07 23:24:00 +00:00
Cody Cutrer d86e09fee1 rspec 3-ify spec/selenium
refs CNVS-16239

Change-Id: I483dd42326d14a2a2645103600cfa242ca7f1fa8
2014-10-15 19:27:10 -06:00
James Williams 86384632e3 spec: selenium updates for rails 3
in particular, change "it_should_behave_like" to
"include_examples" (in rails 3, "it_should_behave_like"
does not extend the defined methods to nested examples)

Change-Id: I24c3d0a214e763cd61bbe73e055f610e021fddd0
Reviewed-on: https://gerrit.instructure.com/28157
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2014-01-09 12:07:34 +00:00
Jon Jensen d72b73b217 Revert "ensures all users accept terms of use"
Turns our we *do* want to grandfather in existing users :P

This reverts commit ae6d9033ac.

Change-Id: I7b109375a4844ef0291f0f72d89028b39d2289a0
Reviewed-on: https://gerrit.instructure.com/23384
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
2013-08-16 16:44:40 +00:00
Landon Wilkins ae6d9033ac ensures all users accept terms of use
fixes CNVS-7385

test plan:
1) in a console:
  # grab a user of your choice
  u = User.find(5)
  # make it seem as if they have never accepted the terms before
  u.preferences[:accepted_terms] = nil
  u.save!
2) log in as that user
3) verify that you are required to accept the terms of use

Change-Id: Ibc314040f35d3d7418a3b31c7280188db86a552b
Reviewed-on: https://gerrit.instructure.com/23110
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
2013-08-13 19:33:46 +00:00
Jon Jensen e04b052d87 require terms by default, fixes CNVS-7330
they were required prior to our new settings refactors. this way we don't
need to go set it in prod

test plan:
1. terms should be required when registering at /register
2. terms should be required when activing an account (via course
   invitation email)
3. in the console, do Setting.set('terms_required', 'false')
4. terms should no longer be required on those pages

Change-Id: Idb13727839b847845cd4dacde4797e4e1571b42f
Reviewed-on: https://gerrit.instructure.com/22988
Reviewed-by: Mark Ericksen <marke@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2013-08-12 15:57:51 +00:00
Jon Jensen 19fb1fbba0 make terms-of-use enforcement configurable
also fix issue around communication_channels/confirm not giving a visual
indication that the terms must be accepted if you forget to check the box

fixes CNVS-7189

test plan:
1. go to /register
2. you should not need to agree to the terms on any form, but you should
   see a link to the privacy policy
3. invite a user to a course
4. the user should not need to agree to the terms when setting a password
5. in the console, do Setting.set('terms_required', true)
6. go to /register
7. you should need to agree to the terms on all the forms
8. invite a user to a course
9. the user should need to agree to the terms when setting a password

Change-Id: I54857d7aaef1b528c6033a3464701abeae4ce14f
Reviewed-on: https://gerrit.instructure.com/22770
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2013-08-01 21:06:22 +00:00
Shawn Meredith d1d720a449 selenium xvfb parallelized pass\fail 1.9.3
Change-Id: I6b4bdae86dc2731cfeb3c8054a9727106a22088c
Reviewed-on: https://gerrit.instructure.com/16105
Reviewed-by: Jake Sorce <jake@instructure.com>
QA-Review: Jake Sorce <jake@instructure.com>
Tested-by: Jake Sorce <jake@instructure.com>
2012-12-14 16:03:19 -07:00
Jon Jensen fc65cff7d6 don't require email validation on confirmation page, fixes #9591
since we have already "validated" the email (by virtue of them receiving
it and clicking on a link), we don't need to validate it here. fixes an
issue where users with non-email pseudonyms could not get past this page

also tweak form so that pseudonym can be specified if it needs to be set
(for example, the email was already taken by another user)

test plan:
1. as an admin create a new user with a login other than their email
   address
2. check the user's /messages URL to see the email that was sent to the
   user
3. copy and paste the URL that was sent in the email and navigate to it
4. the registration page should allow you to proceed and the label should
   say "Login"

Change-Id: I563b53b16b950bd7f6dafc456349db74fd97b294
Reviewed-on: https://gerrit.instructure.com/12569
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
2012-07-30 13:31:13 -06:00