Skip to content

artifact-project/yoda-force

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Releases

No releases published

Packages

No packages published