Skip to content

Commit

Permalink
chore: remove Sauce Labs completely (#3607)
Browse files Browse the repository at this point in the history
  • Loading branch information
adidahiya authored Jan 6, 2023
1 parent 4c0f22a commit fc06b4d
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 431 deletions.
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v8.10
37 changes: 1 addition & 36 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,33 +58,6 @@ module.exports = function(grunt) {
}
};

var saucelabsMochaConfig = {
all: {
options: {
urls: ["http://127.0.0.1:9999/test/tests.html"],
testname: "Plottable Sauce Unit Tests",
pollInterval: 5000,
statusCheckAttempts: 60,
maxRetries: 1,
browsers: [{
browserName: "firefox",
platform: "linux"
}, {
browserName: "chrome",
platform: "linux"
}, {
browserName: "internet explorer",
version: "11",
platform: "WIN7"
}, {
browserName: "safari",
platform: "OS X 10.11",
version: "10.0",
}]
}
}
};

grunt.initConfig({
pkg: grunt.file.readJSON("package.json"),
jscs: jscsConfig,
Expand All @@ -93,7 +66,6 @@ module.exports = function(grunt) {
watch: watchConfig,
"blanket_mocha": blanketMochaConfig,
connect: connectConfig,
"saucelabs-mocha": saucelabsMochaConfig
});

// Loads the tasks specified in package.json
Expand All @@ -109,7 +81,6 @@ module.exports = function(grunt) {

grunt.registerTask("test", ["dev-compile", "test-local"]);
grunt.registerTask("test-local", ["blanket_mocha"]);
grunt.registerTask("test-sauce", ["connect", "saucelabs-mocha"]);

grunt.registerTask("watch-quicktests", function() {
// Surpresses the "Running 'foo' task" messages
Expand All @@ -119,13 +90,7 @@ module.exports = function(grunt) {

grunt.registerTask("lint", ["exec:yarn:lint", "jscs", "eslint"]);

// Disable saucelabs on dev environments by checking if SAUCE_USERNAME is an environment variable
// DISABLE SAUCE TEST ENTIRELY since it is a major cause of instability in circleci testing
if (process.env.SAUCE_USERNAME && false) {
grunt.registerTask("test-ci", ["dev-compile", "lint", "test-local", "test-sauce"]);
} else {
grunt.registerTask("test-ci", ["dev-compile", "lint", "test-local"]);
}
grunt.registerTask("test-ci", ["dev-compile", "lint", "test-local"]);

grunt.registerTask("update-quicktests", function() {
var qtJSON = [];
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
"grunt-eslint": "17.3.1",
"grunt-exec": "1.0.1",
"grunt-jscs": "2.6.0",
"grunt-saucelabs": "8.6.2",
"jquery": "^3.3.1",
"load-grunt-tasks": "3.4.0",
"mocha": "2.2.5",
Expand Down
35 changes: 0 additions & 35 deletions test/components/legendTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,18 +158,6 @@ describe("Legend", () => {
div.remove();
});

// Disable this test for now since it flakes all the time on Saucelabs Safari 10
xit("can set maximum number of lines per entry", () => {
color.domain(["this is a very very very very very very very long"]);
legend.renderTo(div);
legend.maxWidth(100);
legend.maxLinesPerEntry(2);
assert.strictEqual(2, legend.content().selectAll<Element, any>(`${ROW_SELECTOR} ${TEXT_LINE_SELECTOR}`).size());
legend.maxLinesPerEntry(4);
assert.strictEqual(4, legend.content().selectAll<Element, any>(`${ROW_SELECTOR} ${TEXT_LINE_SELECTOR}`).size());
div.remove();
});

it("can set maximum width of legend", () => {
color.domain(["this is a very very very very very very very long"]);
legend.renderTo(div);
Expand All @@ -178,29 +166,6 @@ describe("Legend", () => {
div.remove();
});

// Disable this test for now since it flakes all the time on Saucelabs Safari 10
xit("can set maximum number of entries per row", () => {
color.domain(["AA", "BB", "CC", "DD", "EE", "FF"]);
legend.renderTo(div);

function verifyMaxEntriesInRow (n: number) {
legend.maxEntriesPerRow(n);
const rows = legend.content().selectAll<Element, any>(ROW_SELECTOR);
assert.strictEqual(rows.size(), (6 / n), "number of rows is correct");
rows.each(function(d: any) {
const entries = d3.select(this).selectAll<Element, any>(ENTRY_SELECTOR);
assert.strictEqual(entries.size(), n, "number of entries in row is correct");
});
}

verifyMaxEntriesInRow(1);
verifyMaxEntriesInRow(2);
verifyMaxEntriesInRow(3);
verifyMaxEntriesInRow(6);

div.remove();
});

it("wraps entries onto extra rows if necessary for horizontal legends", () => {
color.domain(["George Waaaaaashington", "John Adaaaams", "Thomaaaaas Jefferson"]);
legend.maxEntriesPerRow(Infinity);
Expand Down
Loading

1 comment on commit fc06b4d

@blueprint-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

chore: remove Sauce Labs completely (#3607)

Demo: quicktests | fiddle

Please sign in to comment.