aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/test/resources/sourceCode
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2017-06-23 21:31:56 +0200
committerSimon Brandhof <simon.brandhof@sonarsource.com>2017-06-25 23:42:50 +0200
commit70b6899988da0d2ba0a39b846e4f1bd3fa27304f (patch)
tree1ac093a87e0fba6b07c6feb6aceae89bdd9663cf /tests/src/test/resources/sourceCode
parent5dd574819854e9ce7e2f4e181e78153a7ecbf828 (diff)
downloadsonarqube-70b6899988da0d2ba0a39b846e4f1bd3fa27304f.tar.gz
sonarqube-70b6899988da0d2ba0a39b846e4f1bd3fa27304f.zip
Move integration tests to directory tests/
Diffstat (limited to 'tests/src/test/resources/sourceCode')
-rw-r--r--tests/src/test/resources/sourceCode/EncodingTest/japanese_sources.html39
-rw-r--r--tests/src/test/resources/sourceCode/HighlightingTest/symbol-usages-highlighting.html49
-rw-r--r--tests/src/test/resources/sourceCode/HighlightingTest/syntax-highlighting-v1.html55
-rw-r--r--tests/src/test/resources/sourceCode/HighlightingTest/syntax-highlighting-v2.html54
-rw-r--r--tests/src/test/resources/sourceCode/HighlightingTest/syntax-highlighting.html54
-rw-r--r--tests/src/test/resources/sourceCode/ProjectCodeTest/code_page_should_expand_root_dir.html30
-rw-r--r--tests/src/test/resources/sourceCode/ProjectCodeTest/permalink.html35
-rw-r--r--tests/src/test/resources/sourceCode/ProjectCodeTest/search.html60
-rw-r--r--tests/src/test/resources/sourceCode/ProjectCodeTest/test_project_code_page.html55
9 files changed, 431 insertions, 0 deletions
diff --git a/tests/src/test/resources/sourceCode/EncodingTest/japanese_sources.html b/tests/src/test/resources/sourceCode/EncodingTest/japanese_sources.html
new file mode 100644
index 00000000000..d873fba3939
--- /dev/null
+++ b/tests/src/test/resources/sourceCode/EncodingTest/japanese_sources.html
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>japanese_sources</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+ <thead>
+ <tr>
+ <td rowspan="1" colspan="3">japanese_sources</td>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>open</td>
+ <td>/component/index?id=japanese-charset%3Asrc%2Fmain%2Fxoo%2Fcom%2Ftest%2FAppDuplication.xoo</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>css=.source-viewer</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForText</td>
+ <td>css=.source-table</td>
+ <td>glob:*public class AppDuplication*</td>
+</tr>
+<tr>
+ <td>waitForText</td>
+ <td>css=.source-table</td>
+ <td>glob:*証明書パス構築に失敗しました。*</td>
+</tr>
+</tbody>
+</table>
+</body>
+</html>
diff --git a/tests/src/test/resources/sourceCode/HighlightingTest/symbol-usages-highlighting.html b/tests/src/test/resources/sourceCode/HighlightingTest/symbol-usages-highlighting.html
new file mode 100644
index 00000000000..42e1fc154f2
--- /dev/null
+++ b/tests/src/test/resources/sourceCode/HighlightingTest/symbol-usages-highlighting.html
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>highlight-symbol-usages</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+ <thead>
+ <tr>
+ <td rowspan="1" colspan="3">highlight-symbol-usages</td>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>open</td>
+ <td>/component/index?id=sample-with-highlighting%3Asrc%2Fmain%2Fxoo%2Fsample%2FSample.xoo</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>css=.source-line</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForXpathCount</td>
+ <td>//span[contains(@class, 'sym')]</td>
+ <td>3</td>
+</tr>
+<tr>
+ <td>waitForXpathCount</td>
+ <td>//span[contains(@class, 'sym highlighted')]</td>
+ <td>0</td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//span[contains(@class, 'sym')][2]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForXpathCount</td>
+ <td>//span[contains(@class, 'sym highlighted')]</td>
+ <td>2</td>
+</tr>
+</tbody>
+</table>
+</body>
+</html>
diff --git a/tests/src/test/resources/sourceCode/HighlightingTest/syntax-highlighting-v1.html b/tests/src/test/resources/sourceCode/HighlightingTest/syntax-highlighting-v1.html
new file mode 100644
index 00000000000..7a1e36cf816
--- /dev/null
+++ b/tests/src/test/resources/sourceCode/HighlightingTest/syntax-highlighting-v1.html
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>java-syntax-highlighting</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+ <thead>
+ <tr>
+ <td rowspan="1" colspan="3">highlight-syntax-v1</td>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>open</td>
+ <td>/component/index?id=sample-with-highlighting%3Asrc%2Fmain%2Fxoo%2Fsample%2FSample.xoo</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>waitForElementPresent</td>
+ <td>css=.source-line</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>verifyHtmlSource</td>
+ <td>glob:*&lt;span class="k"&gt;package&lt;/span&gt;*</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>verifyHtmlSource</td>
+ <td>glob:*&lt;span class="k"&gt;public&lt;/span&gt;*</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>verifyHtmlSource</td>
+ <td>glob:*&lt;span class="k"&gt;class&lt;/span&gt;*</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>verifyHtmlSource</td>
+ <!-- Here class is wrong and will be fixed during next analysis -->
+ <td>glob:*&lt;span class="s"&gt;return&lt;/span&gt;*</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>verifyHtmlSource</td>
+ <td>glob:*&lt;span class="s"&gt;"hello"&lt;/span&gt;*</td>
+ <td></td>
+ </tr>
+ </tbody>
+</table>
+</body>
+</html>
diff --git a/tests/src/test/resources/sourceCode/HighlightingTest/syntax-highlighting-v2.html b/tests/src/test/resources/sourceCode/HighlightingTest/syntax-highlighting-v2.html
new file mode 100644
index 00000000000..7f473dd9e43
--- /dev/null
+++ b/tests/src/test/resources/sourceCode/HighlightingTest/syntax-highlighting-v2.html
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>java-syntax-highlighting</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+ <thead>
+ <tr>
+ <td rowspan="1" colspan="3">highlight-syntax-v2</td>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>open</td>
+ <td>/component/index?id=sample-with-highlighting%3Asrc%2Fmain%2Fxoo%2Fsample%2FSample.xoo</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>waitForElementPresent</td>
+ <td>css=.source-line</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>verifyHtmlSource</td>
+ <td>glob:*&lt;span class="k"&gt;package&lt;/span&gt;*</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>verifyHtmlSource</td>
+ <td>glob:*&lt;span class="k"&gt;public&lt;/span&gt;*</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>verifyHtmlSource</td>
+ <td>glob:*&lt;span class="k"&gt;class&lt;/span&gt;*</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>verifyHtmlSource</td>
+ <td>glob:*&lt;span class="k"&gt;return&lt;/span&gt;*</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>verifyHtmlSource</td>
+ <td>glob:*&lt;span class="s"&gt;"hello"&lt;/span&gt;*</td>
+ <td></td>
+ </tr>
+ </tbody>
+</table>
+</body>
+</html>
diff --git a/tests/src/test/resources/sourceCode/HighlightingTest/syntax-highlighting.html b/tests/src/test/resources/sourceCode/HighlightingTest/syntax-highlighting.html
new file mode 100644
index 00000000000..53e4602a978
--- /dev/null
+++ b/tests/src/test/resources/sourceCode/HighlightingTest/syntax-highlighting.html
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>java-syntax-highlighting</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+ <thead>
+ <tr>
+ <td rowspan="1" colspan="3">highlight-syntax</td>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>open</td>
+ <td>/component/index?id=sample-with-highlighting%3Asrc%2Fmain%2Fxoo%2Fsample%2FSample.xoo</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>waitForElementPresent</td>
+ <td>css=.source-line</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>verifyHtmlSource</td>
+ <td>glob:*&lt;span class="k"&gt;package&lt;/span&gt;*</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>verifyHtmlSource</td>
+ <td>glob:*&lt;span class="k"&gt;public&lt;/span&gt;*</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>verifyHtmlSource</td>
+ <td>glob:*&lt;span class="k"&gt;class&lt;/span&gt;*</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>verifyHtmlSource</td>
+ <td>glob:*&lt;span class="k"&gt;return&lt;/span&gt;*</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>verifyHtmlSource</td>
+ <td>glob:*&lt;span class="s"&gt;"hello"&lt;/span&gt;*</td>
+ <td></td>
+ </tr>
+ </tbody>
+</table>
+</body>
+</html>
diff --git a/tests/src/test/resources/sourceCode/ProjectCodeTest/code_page_should_expand_root_dir.html b/tests/src/test/resources/sourceCode/ProjectCodeTest/code_page_should_expand_root_dir.html
new file mode 100644
index 00000000000..c9737d5fe25
--- /dev/null
+++ b/tests/src/test/resources/sourceCode/ProjectCodeTest/code_page_should_expand_root_dir.html
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <link rel="selenium.base" href="http://localhost:49506"/>
+ <title>code_page_should_expand_root_dir</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+ <thead>
+ <tr>
+ <td rowspan="1" colspan="3">code_page_should_expand_root_dir</td>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>open</td>
+ <td>/code?id=project-for-code-root-dir</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForText</td>
+ <td>css=#content</td>
+ <td>*Hello.xoo*src/main/xoo/sample*</td>
+</tr>
+</tbody>
+</table>
+</body>
+</html>
diff --git a/tests/src/test/resources/sourceCode/ProjectCodeTest/permalink.html b/tests/src/test/resources/sourceCode/ProjectCodeTest/permalink.html
new file mode 100644
index 00000000000..69364a69079
--- /dev/null
+++ b/tests/src/test/resources/sourceCode/ProjectCodeTest/permalink.html
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <link rel="selenium.base" href="http://localhost:49506"/>
+ <title>test_project_code_page</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+ <thead>
+ <tr>
+ <td rowspan="1" colspan="3">test_project_code_page</td>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>open</td>
+ <td>/code?id=project-for-code&amp;selected=project-for-code%3Asrc%2Fmain%2Fxoo%2Fsample%2FSample.xoo</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForText</td>
+ <td>css=#content</td>
+ <td>*public class Sample*</td>
+</tr>
+<tr>
+ <td>waitForText</td>
+ <td>css=.code-breadcrumbs</td>
+ <td>*Project For Code*src/main/xoo/sample*Sample.xoo*</td>
+</tr>
+</tbody>
+</table>
+</body>
+</html>
diff --git a/tests/src/test/resources/sourceCode/ProjectCodeTest/search.html b/tests/src/test/resources/sourceCode/ProjectCodeTest/search.html
new file mode 100644
index 00000000000..1594ee28cd5
--- /dev/null
+++ b/tests/src/test/resources/sourceCode/ProjectCodeTest/search.html
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <link rel="selenium.base" href="http://localhost:49506"/>
+ <title>test_project_code_page</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+ <thead>
+ <tr>
+ <td rowspan="1" colspan="3">test_project_code_page</td>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>open</td>
+ <td>/code?id=project-for-code</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForText</td>
+ <td>css=#content</td>
+ <td>*Project For Code*13*0*0*0.0%*</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>css=.search-box-input</td>
+ <td>xoo</td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>css=.search-box-submit</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForText</td>
+ <td>css=#content</td>
+ <td>*Sample.xoo*</td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>css=.code-name-cell a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForText</td>
+ <td>css=#content</td>
+ <td>*public class Sample*</td>
+</tr>
+<tr>
+ <td>waitForText</td>
+ <td>css=.code-breadcrumbs</td>
+ <td>*Project For Code*src/main/xoo/sample*Sample.xoo*</td>
+</tr>
+</tbody>
+</table>
+</body>
+</html>
diff --git a/tests/src/test/resources/sourceCode/ProjectCodeTest/test_project_code_page.html b/tests/src/test/resources/sourceCode/ProjectCodeTest/test_project_code_page.html
new file mode 100644
index 00000000000..9c6b163fa44
--- /dev/null
+++ b/tests/src/test/resources/sourceCode/ProjectCodeTest/test_project_code_page.html
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <link rel="selenium.base" href="http://localhost:49506"/>
+ <title>test_project_code_page</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+ <thead>
+ <tr>
+ <td rowspan="1" colspan="3">test_project_code_page</td>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>open</td>
+ <td>/code?id=project-for-code</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForText</td>
+ <td>css=#content</td>
+ <td>*Project For Code*13*0*0*0.0%*</td>
+</tr>
+<tr>
+ <td>waitForText</td>
+ <td>css=#content</td>
+ <td>*src/main/xoo/sample*</td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>css=.code-name-cell a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForText</td>
+ <td>css=#content</td>
+ <td>*Sample.xoo*</td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>css=.code-breadcrumbs a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForNotText</td>
+ <td>css=#content</td>
+ <td>*Sample.xoo*</td>
+</tr>
+</tbody>
+</table>
+</body>
+</html>