fixes
This commit is contained in:
parent
958a97b556
commit
eb71c4bcc4
2 changed files with 36 additions and 13 deletions
|
@ -157,9 +157,10 @@ public class ActivitiesPane implements TemplateComposer {
|
|||
.create());
|
||||
}
|
||||
|
||||
if (this.currentUser.get().hasAnyRole(UserRole.SEB_SERVER_ADMIN, UserRole.INSTITUTIONAL_ADMIN)) {
|
||||
sebadmin.setExpanded(true);
|
||||
}
|
||||
sebadmin.setExpanded(this.currentUser.get().hasAnyRole(
|
||||
UserRole.SEB_SERVER_ADMIN,
|
||||
UserRole.INSTITUTIONAL_ADMIN));
|
||||
|
||||
// ---- SEB ADMIN ----------------------------------------------------------------------
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
|
@ -203,9 +204,7 @@ public class ActivitiesPane implements TemplateComposer {
|
|||
.create());
|
||||
}
|
||||
|
||||
if (this.currentUser.get().hasAnyRole(UserRole.EXAM_ADMIN)) {
|
||||
sebConfigs.setExpanded(true);
|
||||
}
|
||||
sebConfigs.setExpanded(this.currentUser.get().hasAnyRole(UserRole.EXAM_ADMIN));
|
||||
}
|
||||
|
||||
// ---- SEB CONFIGURATION --------------------------------------------------------------
|
||||
|
@ -260,9 +259,7 @@ public class ActivitiesPane implements TemplateComposer {
|
|||
.create());
|
||||
}
|
||||
|
||||
if (this.currentUser.get().hasAnyRole(UserRole.EXAM_ADMIN)) {
|
||||
examadmin.setExpanded(true);
|
||||
}
|
||||
examadmin.setExpanded(this.currentUser.get().hasAnyRole(UserRole.EXAM_ADMIN));
|
||||
}
|
||||
|
||||
// ---- EXAM ADMINISTRATION ------------------------------------------------------------
|
||||
|
@ -311,9 +308,7 @@ public class ActivitiesPane implements TemplateComposer {
|
|||
.create());
|
||||
}
|
||||
|
||||
if (this.currentUser.get().hasAnyRole(UserRole.EXAM_SUPPORTER)) {
|
||||
monitoring.setExpanded(true);
|
||||
}
|
||||
monitoring.setExpanded(this.currentUser.get().hasAnyRole(UserRole.EXAM_SUPPORTER));
|
||||
}
|
||||
|
||||
// ---- MONITORING ---------------------------------------------------------------------
|
||||
|
@ -372,7 +367,7 @@ public class ActivitiesPane implements TemplateComposer {
|
|||
} else if (this.currentUser.get().hasAnyRole(UserRole.EXAM_ADMIN)) {
|
||||
return findItemByActionDefinition(
|
||||
navigation.getItems(),
|
||||
ActivityDefinition.SEB_CONFIGURATION);
|
||||
ActivityDefinition.SEB_EXAM_CONFIG);
|
||||
} else if (this.currentUser.get().hasAnyRole(UserRole.EXAM_SUPPORTER)) {
|
||||
return findItemByActionDefinition(
|
||||
navigation.getItems(),
|
||||
|
|
|
@ -77,6 +77,7 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.seb.clientconfig.
|
|||
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.seb.clientconfig.GetClientConfigPage;
|
||||
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.seb.clientconfig.NewClientConfig;
|
||||
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.seb.clientconfig.SaveClientConfig;
|
||||
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.seb.examconfig.NewExamConfig;
|
||||
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.useraccount.ActivateUserAccount;
|
||||
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.useraccount.ChangePassword;
|
||||
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.useraccount.GetUserAccount;
|
||||
|
@ -864,6 +865,33 @@ public class UseCasesIntegrationTest extends GuiIntegrationTest {
|
|||
assertNotNull(readLines);
|
||||
assertFalse(readLines.isEmpty());
|
||||
assertTrue(readLines.get(0).startsWith("pswd"));
|
||||
|
||||
// get page
|
||||
final Result<Page<SebClientConfig>> pageResponse = restService
|
||||
.getBuilder(GetClientConfigPage.class)
|
||||
.call();
|
||||
|
||||
assertNotNull(pageResponse);
|
||||
assertFalse(pageResponse.hasError());
|
||||
final Page<SebClientConfig> page = pageResponse.get();
|
||||
assertFalse(page.content.isEmpty());
|
||||
assertTrue(page.content.size() == 2);
|
||||
}
|
||||
|
||||
@Test
|
||||
@Order(9)
|
||||
// *************************************
|
||||
// Use Case 9: Login as examAdmin2 and create a new SEB Exam Configuration
|
||||
// - save configuration in history
|
||||
// - change some attribute
|
||||
// - process an undo
|
||||
// - table value add, delete, modify
|
||||
// - export
|
||||
public void testUsecase9() throws IOException {
|
||||
final RestServiceImpl restService = createRestServiceForUser(
|
||||
"examAdmin2",
|
||||
"examAdmin2",
|
||||
new NewExamConfig());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue