Skip to content
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

Реализация работы с мок отправкой почты FakeSMTPServer #280

Merged
merged 2 commits into from
Aug 15, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions features/libraries/Плагины/step_definitions/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Fake SMTP Server
Набор методов для работы с Fake-SMTP-Server

Используетс для тестирования отправки почты. Необходимо поставить пакет [fake-smtp-server](https://www.npmjs.com/package/fake-smtp-server)

## Реализовано

* Работа с настройками ящика
* Очистка ящика
* Проверка почты
* Проверка новой почты
* Фильтрация почты по

+ Теме
+ Тексту
+ Получателю
+ Отправителю

## Примеры сценариев

```
Допустим отправляю уведомления на почту
Тогда пришло письмо
Тогда в ящике есть новые письма
И письма для "user@fakemail.com"
И темой письма "SPAM!!!"
```

```
Допустим подготовим ящик
Допустим порт ящика 777
И адрес ящика 192.168.1.1
И очищаем ящик
И отправим пачку писем
Тогда в ящике есть письма
```

## Две группы шагов

### Получение списка писем из ящика

Эти методы получают данные непосредственно из ящика. Данные сохранены в переменную Контекст

```
Тогда в ящике есть письма с темой "Тема"
Тогда в ящике есть письма с текстом "Текст"
Тогда в ящике есть письма от "Отправитель"
Тогда в ящике есть письма для "Получатель"
```

### Уточнение параметров писем

Эти методы берут пиьсма из переменной Контекст и уточняют значение полей

```
И темой письма "Тема"
И текстом письма "Текст"
И письма от "Отправитель"
И письма для "Получатель"
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<MetaDataObject xmlns="http://v8.1c.ru/8.3/MDClasses" xmlns:app="http://v8.1c.ru/8.2/managed-application/core" xmlns:cfg="http://v8.1c.ru/8.1/data/enterprise/current-config" xmlns:cmi="http://v8.1c.ru/8.2/managed-application/cmi" xmlns:ent="http://v8.1c.ru/8.1/data/enterprise" xmlns:lf="http://v8.1c.ru/8.2/managed-application/logform" xmlns:style="http://v8.1c.ru/8.1/data/ui/style" xmlns:sys="http://v8.1c.ru/8.1/data/ui/fonts/system" xmlns:v8="http://v8.1c.ru/8.1/data/core" xmlns:v8ui="http://v8.1c.ru/8.1/data/ui" xmlns:web="http://v8.1c.ru/8.1/data/ui/colors/web" xmlns:win="http://v8.1c.ru/8.1/data/ui/colors/windows" xmlns:xen="http://v8.1c.ru/8.3/xcf/enums" xmlns:xpr="http://v8.1c.ru/8.3/xcf/predef" xmlns:xr="http://v8.1c.ru/8.3/xcf/readable" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.4">
<ExternalDataProcessor uuid="c7e15496-cc1f-49ad-aed1-89cac680945a">
<InternalInfo>
<xr:ContainedObject>
<xr:ClassId>c3831ec8-d8d5-4f93-8a22-f9bfae07327f</xr:ClassId>
<xr:ObjectId>29d2f52d-0ed1-4254-a6bc-bbc6bc333ab1</xr:ObjectId>
</xr:ContainedObject>
<xr:GeneratedType name="ExternalDataProcessorObject.РаботаСFakeMail" category="Object">
<xr:TypeId>503de865-4645-4496-b5dd-2e4a76236095</xr:TypeId>
<xr:ValueId>4d213f80-34d7-4f82-80f0-c17b4f80d887</xr:ValueId>
</xr:GeneratedType>
</InternalInfo>
<Properties>
<Name>РаботаСFakeMail</Name>
<Synonym>
<v8:item>
<v8:lang>ru</v8:lang>
<v8:content>РаботаСFakeMail</v8:content>
</v8:item>
</Synonym>
<Comment/>
<DefaultForm>ExternalDataProcessor.РаботаСFakeMail.Form.Форма</DefaultForm>
<AuxiliaryForm/>
</Properties>
<ChildObjects>
<Form>Форма</Form>
</ChildObjects>
</ExternalDataProcessor>
</MetaDataObject>
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<MetaDataObject xmlns="http://v8.1c.ru/8.3/MDClasses" xmlns:app="http://v8.1c.ru/8.2/managed-application/core" xmlns:cfg="http://v8.1c.ru/8.1/data/enterprise/current-config" xmlns:cmi="http://v8.1c.ru/8.2/managed-application/cmi" xmlns:ent="http://v8.1c.ru/8.1/data/enterprise" xmlns:lf="http://v8.1c.ru/8.2/managed-application/logform" xmlns:style="http://v8.1c.ru/8.1/data/ui/style" xmlns:sys="http://v8.1c.ru/8.1/data/ui/fonts/system" xmlns:v8="http://v8.1c.ru/8.1/data/core" xmlns:v8ui="http://v8.1c.ru/8.1/data/ui" xmlns:web="http://v8.1c.ru/8.1/data/ui/colors/web" xmlns:win="http://v8.1c.ru/8.1/data/ui/colors/windows" xmlns:xen="http://v8.1c.ru/8.3/xcf/enums" xmlns:xpr="http://v8.1c.ru/8.3/xcf/predef" xmlns:xr="http://v8.1c.ru/8.3/xcf/readable" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.4">
<Form uuid="9e85d150-94c5-4925-88c1-0611ff9360d3">
<Properties>
<Name>Форма</Name>
<Synonym>
<v8:item>
<v8:lang>ru</v8:lang>
<v8:content>Форма</v8:content>
</v8:item>
</Synonym>
<Comment/>
<FormType>Managed</FormType>
<IncludeHelpInContents>false</IncludeHelpInContents>
<UsePurposes>
<v8:Value xsi:type="app:ApplicationUsePurpose">PersonalComputer</v8:Value>
<v8:Value xsi:type="app:ApplicationUsePurpose">MobileDevice</v8:Value>
</UsePurposes>
<ExtendedPresentation/>
</Properties>
</Form>
</MetaDataObject>
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<Form xmlns="http://v8.1c.ru/8.3/xcf/logform" xmlns:app="http://v8.1c.ru/8.2/managed-application/core" xmlns:cfg="http://v8.1c.ru/8.1/data/enterprise/current-config" xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core" xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings" xmlns:ent="http://v8.1c.ru/8.1/data/enterprise" xmlns:lf="http://v8.1c.ru/8.2/managed-application/logform" xmlns:style="http://v8.1c.ru/8.1/data/ui/style" xmlns:sys="http://v8.1c.ru/8.1/data/ui/fonts/system" xmlns:v8="http://v8.1c.ru/8.1/data/core" xmlns:v8ui="http://v8.1c.ru/8.1/data/ui" xmlns:web="http://v8.1c.ru/8.1/data/ui/colors/web" xmlns:win="http://v8.1c.ru/8.1/data/ui/colors/windows" xmlns:xr="http://v8.1c.ru/8.3/xcf/readable" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.4">
<AutoCommandBar name="ФормаКоманднаяПанель" id="-1"/>
<Attributes>
<Attribute name="Объект" id="1">
<Type>
<v8:Type>cfg:ExternalDataProcessorObject.РаботаСFakeMail</v8:Type>
</Type>
<MainAttribute>true</MainAttribute>
</Attribute>
</Attributes>
</Form>
Loading