-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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
build(docs-infra): update docs examples to Angular v11.0.1 #39818
Conversation
This commit updates the docs examples to Angular v11.0.1. In addition to updating the dependencies versions, it also updates the project's structure and config to more closely match what a new v11 CLI app would look like. See, also, the [diff][1] between a basic v10.1.3 CLI app and a v11.0.2 one. NOTE: I refrained from disabling the Selenium Promise Manager (as seen [here][2]) and switching all e2e tests to `async/await`, because that is a big change and should be done in a separate commit/PR. [1]: https://github.com/cexbrayat/angular-cli-diff/compare/10.1.3..11.0.2 [2]: cexbrayat/angular-cli-diff@10.1.3...11.0.2#diff-dbd675d74087d57cd084d6dd6ae24ae2eeff2ff0122680e12916052f8a843a29
Previously, the test made no meaningful assertion. It seems that the intention was to ensure that some elements were present on the page, but all the assertions did was verify that the corresponding `ElementFinder`s were defined. The `ElementFinder`s would always be defined, even if there were no corresponding elements on the page. In fact, some of the `ElementFinder` selectors were incorrect, so they did not match any actual elements. This commit fixes the tests by fixing the `ElementFinder` selectors and asserting that the elements are actually present on the page.
Previously, the tests made no meaningful assertions. It seems that the intention was to ensure that some elements were present on the page, but all the assertions did was verify that the corresponding `ElementFinder`s were defined. The `ElementFinder`s would always be defined, even if there were no corresponding elements on the page. In fact, some of the `ElementFinder` selectors were incorrect, so they did not match any actual elements. This commit fixes the tests by fixing the `ElementFinder` selectors and asserting that the elements are actually present on the page.
This commit removes some code that is no longer necessary for the `upgrade-module` docs example e2e tests to run. It used to be necessary in earlier version of Protractor but not any more.
…es e2e tests This commit disables the Selenium Promise Manager when running e2e tests for docs examples in order to more closely align them with new apps created with CLI v11. This change requires that any async operations in tests are handled explicitly (e.g. using `async/await` or `Promise#then()`).
This comment has been minimized.
This comment has been minimized.
You can preview 7b3106d at https://pr39818-7b3106d.ngbuilds.io/. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed-for: docs-infra
@@ -144,7 +144,7 @@ describe('demo (with TestBed):', () => { | |||
); | |||
}); | |||
|
|||
describe('using async(inject) within beforeEach', () => { | |||
describe('using waitForAsync(inject) within beforeEach', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting that this bit of code does not appear in any guides!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not this specific line of code, it doesn't :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, yeah, not this line of code. I meant waitForAsync()
in general.
Overall, very few lines from e2e tests are included in the docs as code snippets.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed-for: global-docs-approvers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed-for: public_api
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed-for: public-api
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed-for: global-approvers
This commit updates the docs examples to Angular v11.0.1. In addition to updating the dependencies versions, it also updates the project's structure and config to more closely match what a new v11 CLI app would look like. See, also, the [diff][1] between a basic v10.1.3 CLI app and a v11.0.2 one. NOTE: I refrained from disabling the Selenium Promise Manager (as seen [here][2]) and switching all e2e tests to `async/await`, because that is a big change and should be done in a separate commit/PR. [1]: https://github.com/cexbrayat/angular-cli-diff/compare/10.1.3..11.0.2 [2]: cexbrayat/angular-cli-diff@10.1.3...11.0.2#diff-dbd675d74087d57cd084d6dd6ae24ae2eeff2ff0122680e12916052f8a843a29 PR Close #39818
Previously, the test made no meaningful assertion. It seems that the intention was to ensure that some elements were present on the page, but all the assertions did was verify that the corresponding `ElementFinder`s were defined. The `ElementFinder`s would always be defined, even if there were no corresponding elements on the page. In fact, some of the `ElementFinder` selectors were incorrect, so they did not match any actual elements. This commit fixes the tests by fixing the `ElementFinder` selectors and asserting that the elements are actually present on the page. PR Close #39818
…39818) Previously, the tests made no meaningful assertions. It seems that the intention was to ensure that some elements were present on the page, but all the assertions did was verify that the corresponding `ElementFinder`s were defined. The `ElementFinder`s would always be defined, even if there were no corresponding elements on the page. In fact, some of the `ElementFinder` selectors were incorrect, so they did not match any actual elements. This commit fixes the tests by fixing the `ElementFinder` selectors and asserting that the elements are actually present on the page. PR Close #39818
…es e2e tests (#39818) This commit disables the Selenium Promise Manager when running e2e tests for docs examples in order to more closely align them with new apps created with CLI v11. This change requires that any async operations in tests are handled explicitly (e.g. using `async/await` or `Promise#then()`). PR Close #39818
Previously, the test made no meaningful assertion. It seems that the intention was to ensure that some elements were present on the page, but all the assertions did was verify that the corresponding `ElementFinder`s were defined. The `ElementFinder`s would always be defined, even if there were no corresponding elements on the page. In fact, some of the `ElementFinder` selectors were incorrect, so they did not match any actual elements. This commit fixes the tests by fixing the `ElementFinder` selectors and asserting that the elements are actually present on the page. PR Close #39818
…39818) Previously, the tests made no meaningful assertions. It seems that the intention was to ensure that some elements were present on the page, but all the assertions did was verify that the corresponding `ElementFinder`s were defined. The `ElementFinder`s would always be defined, even if there were no corresponding elements on the page. In fact, some of the `ElementFinder` selectors were incorrect, so they did not match any actual elements. This commit fixes the tests by fixing the `ElementFinder` selectors and asserting that the elements are actually present on the page. PR Close #39818
…es e2e tests (#39818) This commit disables the Selenium Promise Manager when running e2e tests for docs examples in order to more closely align them with new apps created with CLI v11. This change requires that any async operations in tests are handled explicitly (e.g. using `async/await` or `Promise#then()`). PR Close #39818
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
This PR updates the docs examples to Angular v11.0.1. In addition to updating the dependencies versions, it also updates the project's structure and config to more closely match what a new v11 CLI app would look like. See, also, the diff between a basic v10.1.3 CLI app and a v11.0.2 one.
It also disables the Selenium Promise Manager (as seen here) and switches all e2e tests to
async/await
(to align with new CLI v11 apps).(Supercedes #39787.)