Skip to content

Commit 7ec983d

Browse files
committed
test: live preview banner status banner shouldnt come on custom servers
1 parent 0fab6f4 commit 7ec983d

File tree

1 file changed

+5
-13
lines changed

1 file changed

+5
-13
lines changed

test/spec/LiveDevelopmentCustomServer-test.js

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -939,6 +939,8 @@ define(function (require, exports, module) {
939939
serverFile = `${serverFile}.${serverFile}`;
940940
await _createAnOpenFile(testPath, serverFile);
941941
await _forBannerAppear(serverFile);
942+
// custom server should never have live preview status banner
943+
expect(testWindow.$(".live-preview-status-overlay").is(":visible")).toBeFalse();
942944
testWindow.$(".close-icon").click();
943945
await _forBannerClose(serverFile);
944946

@@ -994,7 +996,7 @@ define(function (require, exports, module) {
994996
await endPreviewSession();
995997
}, 30000);
996998

997-
async function _verifyBannerOK() {
999+
it("should custom server banner close on setting custom server and only show up once only", async function () {
9981000
const testPath = await SpecRunnerUtils.getTempTestDirectory(
9991001
"/spec/LiveDevelopment-MultiBrowser-test-files", true);
10001002
await SpecRunnerUtils.loadProjectInTestWindow(testPath);
@@ -1005,6 +1007,8 @@ define(function (require, exports, module) {
10051007
let serverFile = `php.php`;
10061008
await _createAnOpenFile(testPath, serverFile);
10071009
await _forBannerAppear(serverFile);
1010+
// custom server should never have live preview status banner
1011+
expect(testWindow.$(".live-preview-status-overlay").is(":visible")).toBeFalse();
10081012

10091013
// now edit the settings
10101014
testWindow.$(".live-preview-settings").click();
@@ -1022,17 +1026,6 @@ define(function (require, exports, module) {
10221026
await _createAnOpenFile(testPath, serverFile);
10231027
await awaits(50);
10241028
expect(testWindow.$(".live-preview-settings").is(":visible")).toBeFalse();
1025-
1026-
await endPreviewSession();
1027-
return testPath;
1028-
}
1029-
1030-
it("should custom server banner close on setting custom server", async function () {
1031-
await _verifyBannerOK();
1032-
}, 30000);
1033-
1034-
it("should custom server banner show up in a project only once", async function () {
1035-
const testPath = await _verifyBannerOK();
10361029
// switch project
10371030
await SpecRunnerUtils.loadProjectInTestWindow("/test/parked");
10381031
// now switch back
@@ -1044,7 +1037,6 @@ define(function (require, exports, module) {
10441037
expect(testWindow.$(".live-preview-settings").is(":visible")).toBeFalse();
10451038

10461039
await endPreviewSession();
1047-
10481040
}, 30000);
10491041
});
10501042
});

0 commit comments

Comments
 (0)