]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-9356 Add IT on reactivated user that should see tutorial
authorJulien Lancelot <julien.lancelot@sonarsource.com>
Tue, 13 Jun 2017 13:21:35 +0000 (15:21 +0200)
committerStas Vilchik <stas.vilchik@sonarsource.com>
Tue, 20 Jun 2017 11:10:53 +0000 (04:10 -0700)
it/it-tests/src/test/java/it/user/OnboardingTest.java

index 14a2f99d68c3e2e9d035d94a6ad88bd3bf769ba0..9bd8530d48f306f3fbc5685b069a456f0e250e6c 100644 (file)
@@ -143,6 +143,19 @@ public class OnboardingTest {
     assertThat(adminService.current().getShowOnboardingTutorial()).isEqualTo(true);
   }
 
+  @Test
+  public void reactivated_user_should_see_the_onboarding_tutorial() {
+    setShownOnboardingSetting(true);
+    createUser();
+    createUsersServiceForUser().skipOnboardingTutorial();
+    assertOnboardingTutorial(false);
+
+    userRule.deactivateUsers(userLogin);
+    userRule.createUser(userLogin, userLogin);
+
+    assertOnboardingTutorial(true);
+  }
+
   private void createUser() {
     userLogin = randomAlphabetic(10).toLowerCase();
     userRule.createUser(userLogin, userLogin);