Ejemplo n.º 1
0
  public void test_addComposite() throws Exception {
    initNoRole();

    WindowInterceptor.init(getMainPanel().getButton("addCompositeButton").triggerClick())
        .process(
            BasicHandler.init()
                .assertContainsText("Nom du rôle composite:")
                .setText("  composite_A  ")
                .triggerButtonClick("OK"))
        .run();

    assertTrue(getCompositeList().contentEquals(new String[] {"composite_A"}));
  }
Ejemplo n.º 2
0
  public void test_removeComposite_usedInComposite() throws Exception {

    roleTab =
        create(
            new ModelBuilder()
                .addRoleComposite("composite_B")
                .addRoleComposite("composite_A", "composite_B"));

    getCompositeList().select("composite_B");

    WindowInterceptor.init(getMainPanel().getButton("removeCompositeButton").triggerClick())
        .process(
            BasicHandler.init()
                .assertContainsText("Ce rôle est affecté à:")
                .assertContainsText("  * 1 rôle(s) : composite_A")
                .assertContainsText("Voulez-vous vraiment le supprimer ?")
                .triggerButtonClick("OK"))
        .run();

    assertTrue(getCompositeList().contentEquals(new String[] {"composite_A"}));
  }
Ejemplo n.º 3
0
 private void normalizeWithWindowInterceptor(
     final SedStack stack, final NormalizationConfiguration config) {
   WindowInterceptor.init(
           new Trigger() {
             @Override
             public void run() throws Exception {
               final SedStackerNormalizer normalizer =
                   new SedStackerNormalizer(client, Default.getInstance().getUnitsManager());
               normalizer.normalize(stack, config);
             }
           })
       .process(
           new WindowHandler() {
             @Override
             public Trigger process(Window window) throws Exception {
               window.titleEquals("Unnormalized SEDs");
               return window.getButton("OK").triggerClick();
             }
           })
       .run();
 }