31 lines
933 B
TypeScript
31 lines
933 B
TypeScript
import {ConvertorizrPage} from './app.po';
|
|
|
|
describe('convertorizr App', () => {
|
|
let page: ConvertorizrPage;
|
|
|
|
beforeEach(() => {
|
|
page = new ConvertorizrPage();
|
|
});
|
|
|
|
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==');
|
|
});
|
|
});
|
|
});
|