converter/e2e/app.e2e-spec.ts

32 lines
933 B
TypeScript
Raw Normal View History

2017-04-15 19:04:49 +02:00
import {ConvertorizrPage} from './app.po';
2017-04-15 14:47:43 +02:00
describe('convertorizr App', () => {
let page: ConvertorizrPage;
beforeEach(() => {
2017-04-15 14:47:43 +02:00
page = new ConvertorizrPage();
});
2017-07-25 23:40:19 +02:00
it('should display a textarea that is initially empty', () => {
page.navigateTo()
.then(() => page.getInputFieldContent(0))
.then((value: string) => {
expect(value).toEqual('');
});
});
it('should convert a string to its base64 representation', () => {
page.navigateTo()
.then(() => page.setInputFieldContent(0, 'Hello, World!'))
.then(() => page.getSelectedConverterOption(0))
.then((option: string) => {
expect(option).toEqual('Select conversion ...');
})
.then(() => page.selectConverterOption(0, 'Encode Base 64'))
.then(() => page.getInputFieldContent(1))
.then((content: string) => {
expect(content).toEqual('SGVsbG8sIFdvcmxkIQ==');
});
});
});