Skip to content
This repository was archived by the owner on Jul 29, 2024. It is now read-only.

[meta-issue] add Blocking Proxy #3375

Open
juliemr opened this issue Jul 14, 2016 · 18 comments
Open

[meta-issue] add Blocking Proxy #3375

juliemr opened this issue Jul 14, 2016 · 18 comments

Comments

@juliemr
Copy link
Member

juliemr commented Jul 14, 2016

Collecting issues that we'll need to reconsider (usually, because they'll be easier/improved) when we switch over to Blocking Proxy.

Background: Blocking Proxy is our plan to move logic that waits for Angular to stabilize into a separate process, a proxy which lives between the test script and the selenium endpoint, and intercept the JSON WebDriver protocol commands.

@juliemr
Copy link
Member Author

juliemr commented Jul 14, 2016

We can do better logging - #2569

@juliemr
Copy link
Member Author

juliemr commented Jul 14, 2016

#2986

@juliemr
Copy link
Member Author

juliemr commented Dec 19, 2016

Note that this will be available in 5.0 behind a flag.

@karlhaas
Copy link

karlhaas commented Feb 1, 2017

not sure if this is the right place but after upgrading to protractor v5.1.0 typescript reports the following error:
node_modules/blocking-proxy/built/lib/blockingproxy.d.ts(6,32): error TS1039: Initializers are not allowed in ambient contexts.
typescript version: 2.0.10

@heathkit
Copy link
Contributor

heathkit commented Feb 1, 2017

Blocking Proxy is built with TypeScript 2.1, which is what's generating that definition file. If you do npm upgrade to get the latest version of Protractor's dependencies, you should get TS 2.1 and that error will go away.

@karlhaas
Copy link

karlhaas commented Feb 1, 2017

thx @mgiambalvo! This means that TS2.1 is required for the current version of Protractor, right? if so, it should maybe be mentioned in the list of breaking changes.

@karlhaas
Copy link

karlhaas commented Feb 1, 2017

After upgrading TS, AoT does not work.

Error: Error encountered resolving symbol values statically. Could not resolve events relative to projectdir/node_modules/blocking-proxy/built/lib/webdriver_commands.d.ts., resolving symbol WebDriverCommand in projectdir/node_modules/blocking-proxy/built/lib/webdriver_commands.d.ts
    at simplifyInContext (projectdir/node_modules/@angular/compiler/bundles/compiler.umd.js:25795:27)
    at StaticReflector.simplify (projectdir/node_modules/@angular/compiler/bundles/compiler.umd.js:25807:17)
    at StaticReflector.annotations (projectdir/node_modules/@angular/compiler/bundles/compiler.umd.js:25299:84)
    at NgModuleResolver.resolve (projectdir/node_modules/@angular/compiler/bundles/compiler.umd.js:17783:86)
    at CompileMetadataResolver.getNgModuleMetadata (projectdir/node_modules/@angular/compiler/bundles/compiler.umd.js:18284:64)
    at addNgModule (projectdir/node_modules/@angular/compiler/bundles/compiler.umd.js:25065:62)
    at projectdir/node_modules/@angular/compiler/bundles/compiler.umd.js:25076:18
    at Array.forEach (native)
    at _createNgModules (projectdir/node_modules/@angular/compiler/bundles/compiler.umd.js:25075:30)
    at analyzeNgModules (projectdir/node_modules/@angular/compiler/bundles/compiler.umd.js:24950:18)
Compilation failed

@heathkit
Copy link
Contributor

heathkit commented Feb 2, 2017

Ah, that's indeed the case. Angular doesn't support TS 2.1 yet (angular/angular#13294). Sorry about that, making Protractor require TS 2.1 wasn't intentional breaking change. I'll try to get a hotfix out soon that uses a version of blocking-proxy built with TS 2.0.

@karlhaas
Copy link

karlhaas commented Feb 2, 2017

thx for the clarification and your effort to provide a solution!

@karlhaas
Copy link

karlhaas commented Feb 7, 2017

After upgrade to 5.1.1 I can compile with TS 2.0 but the AoT error remains

@heathkit
Copy link
Contributor

heathkit commented Feb 7, 2017 via email

@karlhaas
Copy link

karlhaas commented Feb 7, 2017

We are using https://github.com/mgechev/angular-seed (latest version). Maybe the problem is that testing files are compiled. The copy task does:

      join(Config.APP_SRC, '**/*.ts'),
      join(Config.APP_SRC, '**/*.json'),
      '!' + join(Config.APP_SRC, '**/*.spec.ts'),
      '!' + join(Config.APP_SRC, '**/*.e2e-spec.ts')
    ])

This means that it ignores the files ending with e2e-spec.ts but not the page object files.
Thx @mgiambalvo !

@karlhaas
Copy link

karlhaas commented Feb 8, 2017

@mgiambalvo we had protractor typings in tsconfig.json.

@m4mbart
Copy link

m4mbart commented Feb 21, 2017

I'm also encountering this issue with angular-cli 1.0.0-beta.32. Is there a workaround?

@m4mbart
Copy link

m4mbart commented Feb 21, 2017

Ah I see.. Entirely removing protractor from the project fixes this for now.

@shaher
Copy link

shaher commented Feb 21, 2017

@m4mbart what do you mean by "Entirely removing protractor from the project fixes this for now."
how do that?

@heathkit
Copy link
Contributor

heathkit commented Feb 21, 2017 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants
@heathkit @juliemr @shaher @karlhaas @m4mbart and others