Skip to content

Commit bea424b

Browse files
committed
test: css class hints asp aspx and jsp test
1 parent 8b90198 commit bea424b

File tree

8 files changed

+61
-18
lines changed

8 files changed

+61
-18
lines changed

src/extensions/default/HTMLCodeHints/integ-tests.js

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ define(function (require, exports, module) {
246246
});
247247

248248
it("should show inline styles in html document", async function () {
249-
await openFile("inlineStyle.html", true);
249+
await openFile("htmlOther/inlineStyle.html", true);
250250
await _validateCodeHints({ line: 12, ch: 19 }, ["integratedStyle"]);
251251
await closeSession();
252252
});
@@ -257,19 +257,19 @@ define(function (require, exports, module) {
257257
}
258258

259259
it("should inline css class hint in unsaved html inline styles", async function () {
260-
await openFile("inlineStyle.html", true);
260+
await openFile("htmlOther/inlineStyle.html", true);
261261
setText({ line: 8, ch: 11 }, ".newInlineStyleYo{}");
262262
await _validateCodeHints({ line: 12, ch: 19 }, ["newInlineStyleYo"]);
263263
await closeSession();
264264
});
265265

266266
async function _validateCssEdit(cssFileName) {
267-
await openFile("inlineStyle.html", true);
267+
await openFile("htmlOther/inlineStyle.html", true);
268268
await openFile(cssFileName, true);
269269
const cssClassName = StringUtils.randomString(5, "cls");
270270
setText({ line: 0, ch: 0 }, `.${cssClassName}{}\n`);
271271

272-
await openFile("inlineStyle.html", true);
272+
await openFile("htmlOther/inlineStyle.html", true);
273273
await _validateCodeHints({ line: 12, ch: 16 }, [cssClassName]);
274274
await closeSession();
275275
}
@@ -300,20 +300,12 @@ define(function (require, exports, module) {
300300
await closeSession();
301301
}
302302

303-
it("should be able to add the class name by selecting the code hint in HTML file", async function () {
304-
await _testCssClassHintInFile("inlineStyle.html");
305-
});
306-
307-
it("should be able to add the class name by selecting the code hint in HTM file", async function () {
308-
await _testCssClassHintInFile("inlineStyle.htm");
309-
});
310-
311-
it("should be able to add the class name by selecting the code hint in XHTML file", async function () {
312-
await _testCssClassHintInFile("inlineStyle.xhtml");
313-
});
303+
const extensions = ["html", "htm", "xhtml", "php", "asp", "aspx", "jsp"];
314304

315-
it("should be able to add the class name by selecting the code hint in PHP file", async function () {
316-
await _testCssClassHintInFile("inlineStyle.php");
317-
});
305+
for(let extn of extensions){
306+
it(`should be able to add the class name by selecting the code hint in ${extn} file`, async function () {
307+
await _testCssClassHintInFile(`htmlOther/inlineStyle.${extn}`);
308+
});
309+
}
318310
});
319311
});

test/spec/LiveDevelopment-MultiBrowser-test-files/inlineStyle.htm renamed to test/spec/LiveDevelopment-MultiBrowser-test-files/htmlOther/inlineStyle.asp

File renamed without changes.

test/spec/LiveDevelopment-MultiBrowser-test-files/inlineStyle.html renamed to test/spec/LiveDevelopment-MultiBrowser-test-files/htmlOther/inlineStyle.aspx

File renamed without changes.

test/spec/LiveDevelopment-MultiBrowser-test-files/inlineStyle.php renamed to test/spec/LiveDevelopment-MultiBrowser-test-files/htmlOther/inlineStyle.htm

File renamed without changes.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>inline styles test</title>
6+
<style>
7+
.integratedStyle {
8+
color: blue;
9+
}
10+
</style>
11+
</head>
12+
<body>
13+
<div class="integratedStyle">
14+
this file has integrated html styles
15+
</div>
16+
</body>
17+
</html>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>inline styles test</title>
6+
<style>
7+
.integratedStyle {
8+
color: blue;
9+
}
10+
</style>
11+
</head>
12+
<body>
13+
<div class="integratedStyle">
14+
this file has integrated html styles
15+
</div>
16+
</body>
17+
</html>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>inline styles test</title>
6+
<style>
7+
.integratedStyle {
8+
color: blue;
9+
}
10+
</style>
11+
</head>
12+
<body>
13+
<div class="integratedStyle">
14+
this file has integrated html styles
15+
</div>
16+
</body>
17+
</html>

test/spec/LiveDevelopment-MultiBrowser-test-files/inlineStyle.xhtml renamed to test/spec/LiveDevelopment-MultiBrowser-test-files/htmlOther/inlineStyle.xhtml

File renamed without changes.

0 commit comments

Comments
 (0)