Skip to content

Commit

Permalink
Comment out some tests
Browse files Browse the repository at this point in the history
  • Loading branch information
muffinista committed Feb 2, 2024
1 parent a907bc3 commit dbe451e
Show file tree
Hide file tree
Showing 8 changed files with 50 additions and 44 deletions.
36 changes: 18 additions & 18 deletions test/lib/package.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,24 +119,24 @@ describe("Package", function() {
});
});

describe("downloadFile", function() {
var testUrl = "https://test.file/savers.zip";
beforeEach(function() {
nock("https://test.file").
get("/savers.zip").
reply(200, () => {
return fs.createReadStream(zipPath);
});
rimrafSync(workingDir);
fs.mkdirSync(workingDir);
});

xit("works", async function() {
let p = new Package(attrs);
const dest = await p.downloadFile(testUrl);
assert(fs.existsSync(dest));
});
});
// describe("downloadFile", function() {
// var testUrl = "https://test.file/savers.zip";
// beforeEach(function() {
// nock("https://test.file").
// get("/savers.zip").
// reply(200, () => {
// return fs.createReadStream(zipPath);
// });
// rimrafSync(workingDir);
// fs.mkdirSync(workingDir);
// });

// xit("works", async function() {
// let p = new Package(attrs);
// const dest = await p.downloadFile(testUrl);
// assert(fs.existsSync(dest));
// });
// });

describe("zipToSavers", function() {
var p;
Expand Down
2 changes: 1 addition & 1 deletion test/lib/prefs.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ describe("SaverPrefs", function() {
});

// systemSource
describe("sources", function() {
describe("systemSource", function() {
beforeEach(function() {
prefs = new SaverPrefs(tmpdir);
});
Expand Down
1 change: 1 addition & 0 deletions test/main/power.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable mocha/no-setup-in-describe */
"use strict";


Expand Down
1 change: 1 addition & 0 deletions test/ui/about.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable mocha/no-setup-in-describe */
"use strict";

import assert from 'assert';
Expand Down
1 change: 1 addition & 0 deletions test/ui/bootstrap.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable mocha/no-setup-in-describe */
"use strict";

import assert from 'assert';
Expand Down
1 change: 1 addition & 0 deletions test/ui/prefs.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable mocha/no-setup-in-describe */
"use strict";

import assert from 'assert';
Expand Down
51 changes: 26 additions & 25 deletions test/ui/settings.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable mocha/no-setup-in-describe */
"use strict";

import assert from 'assert';
Expand Down Expand Up @@ -71,20 +72,20 @@ describe("Settings", function() {
await helpers.waitFor(app, "prefs");
});

it.skip("allows setting path via dialog", async function() {
const [fileChooser] = await Promise.all([
window.waitForEvent("filechooser"),
window.click("button.pick")
]);
await fileChooser.setFiles("/not/a/real/path");
// it.skip("allows setting path via dialog", async function() {
// const [fileChooser] = await Promise.all([
// window.waitForEvent("filechooser"),
// window.click("button.pick")
// ]);
// await fileChooser.setFiles("/not/a/real/path");

await window.click("button.save");
await helpers.sleep(closeWindowDelay);
// await window.click("button.save");
// await helpers.sleep(closeWindowDelay);

assert.strictEqual("/not/a/real/path", currentPrefs().localSource);
// assert.strictEqual("/not/a/real/path", currentPrefs().localSource);

await helpers.waitFor(app, "prefs");
});
// await helpers.waitFor(app, "prefs");
// });

it("clears localSource", async function() {
let ls = currentPrefs().localSource;
Expand All @@ -102,22 +103,22 @@ describe("Settings", function() {
});


// dialogs don't work yet
// @see https://github.com/microsoft/playwright/issues/8278
it.skip("resets defaults", async function() {
window = await helpers.waitFor(app, "settings");
// // dialogs don't work yet
// // @see https://github.com/microsoft/playwright/issues/8278
// it.skip("resets defaults", async function() {
// window = await helpers.waitFor(app, "settings");

window.on("dialog", async dialog => {
console.log(dialog.message());
await dialog.accept();
});
// window.on("dialog", async dialog => {
// console.log(dialog.message());
// await dialog.accept();
// });

await window.click("button.reset-to-defaults");
await helpers.waitForText(window, "body", "Settings reset", true);
await helpers.sleep(closeWindowDelay);
// await window.click("button.reset-to-defaults");
// await helpers.waitForText(window, "body", "Settings reset", true);
// await helpers.sleep(closeWindowDelay);

assert.strictEqual("", currentPrefs().localSource);
// assert.strictEqual("", currentPrefs().localSource);

await helpers.waitFor(app, "prefs");
});
// await helpers.waitFor(app, "prefs");
// });
});
1 change: 1 addition & 0 deletions test/ui/tray.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable mocha/no-setup-in-describe */
"use strict";

import assert from 'assert';
Expand Down

0 comments on commit dbe451e

Please sign in to comment.