Skip to content
Permalink
Browse files

- updated jest version

- Running tests one-by-one (every test runs in it's own Chrome)

:goose:
  • Loading branch information...
maZahaca committed Nov 28, 2018
1 parent 7cbbbc6 commit 044b9e264885b48fc131a93a56c2a8cd7c9601ee
Showing with 733 additions and 726 deletions.
  1. +2 −2 package.json
  2. +58 −28 test/integration/actions/actions.test.js
  3. +673 −696 yarn.lock
@@ -45,7 +45,7 @@
"url": "https://github.com/redco/goose-parser/issues"
},
"scripts": {
"test": "jest test --no-cache --runInBand --detectOpenHandles",
"test": "jest test --no-cache --runInBand --detectOpenHandles --maxConcurrency=1",
"build": "node build.js",
"coverage": "jest --coverage && rm -rf ./coverage",
"codecov": "jest --coverage && codecov && rm -rf ./coverage"
@@ -66,7 +66,7 @@
"goose-abstract-environment": "^1.0.12",
"goose-chrome-environment": "^1.1.2",
"goose-paginator": "^1.0.2",
"jest": "^23.6.0",
"jest": "^24.1.0",
"rimraf": "^2.6.2",
"webpack": "^1.12.2"
},
@@ -7,21 +7,13 @@ const Parser = require('../../../lib/Parser');
jest.setTimeout(30000);
describe('Actions', () => {
let testServer;
let parser;

beforeAll(async () => {
testServer = await createTestServer();
parser = new Parser({
environment: new ChromeEnvironment({
snapshot: true,
}),
mode: 'multiple',
});
});

afterAll(async () => {
await testServer.close();
await parser.finish();
});

describe('ActionBlur', () => {
@@ -36,8 +28,10 @@ describe('Actions', () => {
});
},
});
const parser = new Parser({
environment: new ChromeEnvironment({ url }),
});
const result = await parser.parse({
url,
actions: [
{
type: 'focus',
@@ -74,8 +68,10 @@ describe('Actions', () => {
});
},
});
const parser = new Parser({
environment: new ChromeEnvironment({ url }),
});
const result = await parser.parse({
url,
actions: [
{
type: 'click',
@@ -108,8 +104,10 @@ describe('Actions', () => {
});
},
});
const parser = new Parser({
environment: new ChromeEnvironment({ url }),
});
const result = await parser.parse({
url,
actions: [
{
type: 'mouseClick',
@@ -142,16 +140,18 @@ describe('Actions', () => {
});
},
});
const parser = new Parser({
environment: new ChromeEnvironment({ url }),
});
const result = await parser.parse({
url,
actions: [
{
type: 'mouseDown',
scope: '[type="text"]',
},
{
type: 'pause',
timeout: 50,
timeout: 500,
},
],
rules: {
@@ -176,8 +176,10 @@ describe('Actions', () => {
});
},
});
const parser = new Parser({
environment: new ChromeEnvironment({ url }),
});
const result = await parser.parse({
url,
actions: [
{
type: 'mouseUp',
@@ -210,8 +212,10 @@ describe('Actions', () => {
});
},
});
const parser = new Parser({
environment: new ChromeEnvironment({ url }),
});
const result = await parser.parse({
url,
actions: [
{
type: 'focus',
@@ -244,8 +248,10 @@ describe('Actions', () => {
html: `<a href="/">1</a>`
}
]);
const parser = new Parser({
environment: new ChromeEnvironment({ url }),
});
const result = await parser.parse({
url,
actions: [
{
type: 'click',
@@ -275,8 +281,10 @@ describe('Actions', () => {
});
}
});
const parser = new Parser({
environment: new ChromeEnvironment({ url }),
});
const result = await parser.parse({
url,
actions: [
{
type: 'click',
@@ -311,8 +319,10 @@ describe('Actions', () => {
});
}
});
const parser = new Parser({
environment: new ChromeEnvironment({ url }),
});
const result = await parser.parse({
url,
actions: [
{
type: 'click',
@@ -342,8 +352,10 @@ describe('Actions', () => {
});
}
});
const parser = new Parser({
environment: new ChromeEnvironment({ url }),
});
const result = await parser.parse({
url,
actions: [
{
type: 'click',
@@ -376,8 +388,10 @@ describe('Actions', () => {
});
}
});
const parser = new Parser({
environment: new ChromeEnvironment({ url }),
});
const result = await parser.parse({
url,
actions: [
{
type: 'click',
@@ -408,8 +422,10 @@ describe('Actions', () => {
});
}
});
const parser = new Parser({
environment: new ChromeEnvironment({ url }),
});
const result = await parser.parse({
url,
actions: [
{
type: 'click',
@@ -435,8 +451,10 @@ describe('Actions', () => {
setServerResponse({
html: `<img src="12345" />`,
});
const parser = new Parser({
environment: new ChromeEnvironment({ url }),
});
const result = await parser.parse({
url,
actions: [
{
type: 'changeElement',
@@ -472,8 +490,10 @@ describe('Actions', () => {
setServerResponse({
html: `<img src="12345" />`,
});
const parser = new Parser({
environment: new ChromeEnvironment({ url }),
});
const result = await parser.parse({
url,
actions: [
{
type: 'changeElement',
@@ -505,8 +525,10 @@ describe('Actions', () => {
setServerResponse({
html: `<input type="text" />`,
});
const parser = new Parser({
environment: new ChromeEnvironment({ url }),
});
const result = await parser.parse({
url,
actions: [
{
type: 'type',
@@ -527,8 +549,10 @@ describe('Actions', () => {
setServerResponse({
html: `<span>test</span><input type="text" />`,
});
const parser = new Parser({
environment: new ChromeEnvironment({ url }),
});
const result = await parser.parse({
url,
actions: [
{
type: 'parse',
@@ -557,8 +581,10 @@ describe('Actions', () => {
setServerResponse({
html: `<span>test</span><input type="text" />`,
});
const parser = new Parser({
environment: new ChromeEnvironment({ url }),
});
const result = await parser.parse({
url,
actions: [
{
type: 'parse',
@@ -584,8 +610,10 @@ describe('Actions', () => {
setServerResponse({
html: `<span>test</span><input type="text" />`,
});
const parser = new Parser({
environment: new ChromeEnvironment({ url }),
});
const result = await parser.parse({
url,
actions: [
{
type: 'url',
@@ -611,8 +639,10 @@ describe('Actions', () => {
setServerResponse({
html: `<span>snapshot</span>`,
});
const parser = new Parser({
environment: new ChromeEnvironment({ url, /*snapshot: true*/ }),
});
await parser.parse({
url,
actions: [
{
type: 'snapshot',
Oops, something went wrong.

0 comments on commit 044b9e2

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