Skip to content
Permalink
Browse files

- action exists

:goose:
  • Loading branch information...
maZahaca committed Dec 2, 2018
1 parent 7f83675 commit 5b84e2df11b12625c1ade5d59070251385e0dc17
Showing with 37 additions and 0 deletions.
  1. +37 −0 test/integration/actions/actions.test.js
@@ -666,6 +666,43 @@ describe('Actions', () => {
});
});

describe('ActionExist', () => {
test('perform', async () => {
setServerResponse({
html: `<a href="#">test</a>`
});
const parser = new Parser({
environment: new ChromeEnvironment({ url }),
});
const result = await parser.parse({
rules: {
actions: [
{
type: 'condition',
if: [
{
type: 'exists',
scope: 'a',
}
],
then: [
{
type: 'provideRules',
rules: {
scope: 'a',
},
}
],
},
],
rulesFromActions: true,
},
});

expect(result).toEqual('test');
});
});

// describe('ActionSnapshot', () => {
// test('making page snapshot', async () => {
// setServerResponse({

0 comments on commit 5b84e2d

Please sign in to comment.
You can’t perform that action at this time.