mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
test(angular): add test for providers (#17041)
This commit is contained in:
26
angular/test/test-app/e2e/src/providers.e2e-spec.ts
Normal file
26
angular/test/test-app/e2e/src/providers.e2e-spec.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
import { browser, element, by } from 'protractor';
|
||||
import { handleErrorMessages, waitTime } from './utils';
|
||||
|
||||
describe('providers', () => {
|
||||
|
||||
afterEach(() => {
|
||||
handleErrorMessages();
|
||||
});
|
||||
|
||||
it('should load all providers', async () => {
|
||||
await browser.get('/providers');
|
||||
|
||||
expect(await element(by.css('#is-loaded')).getText()).toEqual('true');
|
||||
expect(await element(by.css('#is-ready')).getText()).toEqual('true');
|
||||
expect(await element(by.css('#is-testing')).getText()).toEqual('false');
|
||||
expect(await element(by.css('#is-desktop')).getText()).toEqual('true');
|
||||
expect(await element(by.css('#is-mobile')).getText()).toEqual('false');
|
||||
expect(await element(by.css('#keyboard-height')).getText()).toEqual('12345');
|
||||
});
|
||||
|
||||
it('should detect testing mode', async () => {
|
||||
await browser.get('/providers?ionic:_testing=true');
|
||||
|
||||
expect(await element(by.css('#is-testing')).getText()).toEqual('true');
|
||||
});
|
||||
});
|
||||
@@ -1,5 +1,5 @@
|
||||
import { browser, element, by } from 'protractor';
|
||||
import { getProperty, setProperty, handleErrorMessages } from './utils';
|
||||
import { handleErrorMessages } from './utils';
|
||||
|
||||
describe('view-child', () => {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user