Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CLEANUP] Remove phantomjs hacks, docs & scripts #15880

Merged
merged 1 commit into from
Nov 29, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,24 +135,20 @@ versions of jQuery.

## From the CLI

1. Install phantomjs from http://phantomjs.org.

2. Run `yarn test` to run a basic test suite or run `TEST_SUITE=all yarn test` to
run a more comprehensive suite.
Run `yarn test` to run a basic test suite or run `TEST_SUITE=all yarn test` to
run a more comprehensive suite.

## From ember-cli

1. `ember test --server`

2. Connect the browsers you want.

3. If phantom didn't connect automatically, you can run `./bin/connect-phantom-to <optional-port>`.

To run a specific browser, you can use the `--launch` flag

* `ember test --server --launch SL_Firefox_Current`
* `ember test --launch SL_Firefox_Current`
* `ember test --launch SL_Firefox_Current,PhantomJS`
* `ember test --launch SL_Firefox_Current,Chrome`

To test multiple launchers, you can separate them with commas.
# Pull Requests
Expand Down Expand Up @@ -276,7 +272,7 @@ To recreate this build environment locally:

### Single Unexplained Test Suite Failure

Sometimes a single test suite will fail, without giving any indication of a real error. Sometimes this is just a phantom crash.
Sometimes a single test suite will fail, without giving any indication of a real error.
* Try to recreate the test environment locally (see above for production builds)
* Restart all the test suites on Travis CI by doing another push
* Ask a repo collab to restart that single test suite
Expand Down
13 changes: 0 additions & 13 deletions bin/connect-phantom-to

This file was deleted.

1 change: 0 additions & 1 deletion packages/ember-environment/lib/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ export const environment: {
hasDOM: boolean;
isChrome: boolean;
isFirefox: boolean;
isPhantom: boolean;
location: Location | null;
history: History | null;
userAgent: string;
Expand Down
2 changes: 0 additions & 2 deletions packages/ember-environment/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ export const environment = hasDOM ? {
hasDOM: true,
isChrome: !!window.chrome && !window.opera,
isFirefox: typeof InstallTrigger !== 'undefined',
isPhantom: !!window.callPhantom,
location: window.location,
history: window.history,
userAgent: window.navigator.userAgent,
Expand All @@ -112,7 +111,6 @@ export const environment = hasDOM ? {
hasDOM: false,
isChrome: false,
isFirefox: false,
isPhantom: false,
location: null,
history: null,
userAgent: 'Lynx (textmode)',
Expand Down
30 changes: 2 additions & 28 deletions packages/ember-metal/lib/properties.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,6 @@ export function Descriptor() {
this.isDescriptor = true;
}

const REDEFINE_SUPPORTED = ((() => {
// https://github.com/spalger/kibana/commit/b7e35e6737df585585332857a4c397dc206e7ff9
let a = Object.create(Object.prototype, {
prop: {
configurable: true,
value: 1
}
});

Object.defineProperty(a, 'prop', {
configurable: true,
value: 2
});

return a.prop === 2;
})());
// ..........................................................
// DEFINING PROPERTIES API
//
Expand Down Expand Up @@ -178,11 +162,8 @@ export function defineProperty(obj, keyName, desc, data, meta) {
get: DEFAULT_GETTER_FUNCTION(keyName)
};

if (REDEFINE_SUPPORTED) {
Object.defineProperty(obj, keyName, defaultDescriptor);
} else {
handleBrokenPhantomDefineProperty(obj, keyName, defaultDescriptor);
}
Object.defineProperty(obj, keyName, defaultDescriptor);

} else {
obj[keyName] = data;
}
Expand Down Expand Up @@ -220,10 +201,3 @@ function didDefineComputedProperty(constructor) {
cache._computedProperties = undefined;
}
}


function handleBrokenPhantomDefineProperty(obj, keyName, desc) {
// https://github.com/ariya/phantomjs/issues/11856
Object.defineProperty(obj, keyName, { configurable: true, writable: true, value: 'iCry' });
Object.defineProperty(obj, keyName, desc);
}
2 changes: 1 addition & 1 deletion packages/ember-utils/tests/checkHasSuper_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ QUnit.module('checkHasSuper');
// Only run this test on browsers that we are certain should have function
// source available. This allows the test suite to continue to pass on other
// platforms that correctly (for them) fall back to the "always wrap" code.
if (environment.isPhantom || environment.isChrome || environment.isFirefox) {
if (environment.isChrome || environment.isFirefox) {
QUnit.test('does not super wrap needlessly [GH #12462]', function(assert) {
assert.notOk(checkHasSuper(function() {}), 'empty function does not have super');
});
Expand Down