yoda-force

0.1.0 • Public • Published

Yoda Force

BDD test runner for UI testing.

Usage

import YodaForce from 'yoda-force';

const force = new YodaForce({
	domIdAttr: 'data-test-id',
	context: {
		'globals': {
			'Список контактов': {ctx: 'contacts', loc: '#contacts'},
		},
		'page': {
			'Мои контакты': '/contacts/my/',
		},
		'while': {
			'Контактов': {ctx: 'contacts', loc: '#contacts-count'},
		},
		'contacts/**/*': {
			'Удалить': '#contacts #remove',
		},
	},
	actions: {
		'remove:all': {
			'#contacts': async (ctx) => ctx.useForce(`
				Пока "Контактов" больше нуля
					Нажать "Удалить"
			`),
		},
	},
});

beforeEach(async () => await force.use(`
	Авторизоваться
	Открыть страницу "Мои контакты"
`));

it(async () => await force.use(`
	Если есть "Список контанктов", то удалить все
`));

Development

Readme

Keywords

none

Package Sidebar

Install

npm i yoda-force

Weekly Downloads

0

Version

0.1.0

License

MIT

Unpacked Size

2.23 kB

Total Files

2

Last publish

Collaborators

  • rubaxa