// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.structuralsearch;

import com.intellij.ide.highlighter.HtmlFileType;
import com.intellij.structuralsearch.plugin.ui.Configuration;

import java.util.Map;
import java.util.stream.Collectors;
import java.util.stream.Stream;

/**
 * @author Bas Leijdekkers
 */
public class XmlPredefinedConfigurationsTest extends PredefinedConfigurationsTestCase {

  public void testAll() {
    final Configuration[] templates = new XmlStructuralSearchProfile().getPredefinedTemplates();
    final Map<String, Configuration> configurationMap = Stream.of(templates).collect(Collectors.toMap(Configuration::getName, x -> x));
    doTest(configurationMap.remove("<li> not contained in <ul> or <ol>"),
           "<html>\n" +
           "  <ul><li>one</li></ul><li>two</li><li>three</li>\n" +
           "</html>", HtmlFileType.INSTANCE, "<li>two</li>", "<li>three</li>");
  }
}

@@ -17,10 +17,10 @@
 0-20
-19
+20
  Jet
@@ -800,18 +800,54 @@
 ove(
-%22%3Cli%3E not 
+SSRBundle.message(%22predefined.template.li.not.
 cont
@@ -855,25 +855,22 @@
 ined
- in %3Cul%3E or %3Col%3E%22
+.in.ul.or.ol%22)
 ),%0A 

make test more robust to name changes (IJ-CR-3888)