test(aio): tidy up e2e tests that used invalid URLs (#19682)
PR Close #19682
This commit is contained in:
parent
717c68089d
commit
6121083ba5
|
@ -1,4 +1,4 @@
|
||||||
import { browser, element, by, promise } from 'protractor';
|
import { element, by } from 'protractor';
|
||||||
import { SitePage } from './app.po';
|
import { SitePage } from './app.po';
|
||||||
|
|
||||||
describe('site App', function() {
|
describe('site App', function() {
|
||||||
|
@ -41,20 +41,20 @@ describe('site App', function() {
|
||||||
|
|
||||||
describe('scrolling to the top', () => {
|
describe('scrolling to the top', () => {
|
||||||
it('should scroll to the top when navigating to another page', () => {
|
it('should scroll to the top when navigating to another page', () => {
|
||||||
page.navigateTo('guide/docs');
|
page.navigateTo('guide/security');
|
||||||
page.scrollToBottom();
|
page.scrollToBottom();
|
||||||
page.getScrollTop().then(scrollTop => expect(scrollTop).toBeGreaterThan(0));
|
page.getScrollTop().then(scrollTop => expect(scrollTop).toBeGreaterThan(0));
|
||||||
|
|
||||||
page.navigateTo('guide/api');
|
page.navigateTo('api');
|
||||||
page.getScrollTop().then(scrollTop => expect(scrollTop).toBe(0));
|
page.getScrollTop().then(scrollTop => expect(scrollTop).toBe(0));
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should scroll to the top when navigating to the same page', () => {
|
it('should scroll to the top when navigating to the same page', () => {
|
||||||
page.navigateTo('guide/docs');
|
page.navigateTo('guide/security');
|
||||||
page.scrollToBottom();
|
page.scrollToBottom();
|
||||||
page.getScrollTop().then(scrollTop => expect(scrollTop).toBeGreaterThan(0));
|
page.getScrollTop().then(scrollTop => expect(scrollTop).toBeGreaterThan(0));
|
||||||
|
|
||||||
page.navigateTo('guide/docs');
|
page.navigateTo('guide/security');
|
||||||
page.getScrollTop().then(scrollTop => expect(scrollTop).toBe(0));
|
page.getScrollTop().then(scrollTop => expect(scrollTop).toBe(0));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue