Skip to content

Commit

Permalink
autofix e2e tests2
Browse files Browse the repository at this point in the history
  • Loading branch information
dbale-altoros committed Jul 1, 2024
1 parent 6fc5b55 commit 00325ef
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions e2e/autofix-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -526,12 +526,12 @@ describe('e2e', function () {
})

describe('--fix with noPrompt', () => {
it('should compare Foo1 file with template BEFORE FIX file and they should match (8)', () => {
it('should compare Foo1 file with template BEFORE FIX file and they should match (9)', () => {
result = compareTextFiles(currentFile, beforeFixFile)
expect(result).to.be.true
})

it('should execute and compare Foo1 with template AFTER FIX and they should match (8)', () => {
it('should execute and compare Foo1 with template AFTER FIX and they should match (9)', () => {
;({ code, stdout } = shell.exec(
`${params.command} ${params.param1} -c ${currentConfig} ${currentFile} --fix --disc --noPrompt`
))
Expand All @@ -540,24 +540,24 @@ describe('e2e', function () {
expect(result).to.be.true
})

it('should execute and exit with code 1 (8)', () => {
it('should execute and exit with code 1 (9)', () => {
expect(code).to.equal(EXIT_CODES.REPORTED_ERRORS)
})

it('should get the right report (8)', () => {
it('should get the right report (9)', () => {
const reportLines = stdout.split('\n')
const finalLine = '6 problems (6 errors, 0 warnings)'
expect(reportLines[reportLines.length - 3]).to.contain(finalLine)
})
})

it('should check FOO1 does not change after test (8)', () => {
it('should check FOO1 does not change after test (9)', () => {
result = compareTextFiles(currentFile, beforeFixFile)
expect(result).to.be.true
})
})

describe.only('autofix rule: imports-order P1', () => {
describe('autofix rule: imports-order P1', () => {
describe('autofix rule: imports-order Foo1', () => {
before(function () {
params = retrieveParams('imports-order/')
Expand All @@ -573,12 +573,12 @@ describe('e2e', function () {
})

describe('--fix with noPrompt', () => {
it('should compare Foo1 file with template BEFORE FIX file and they should match (9)', () => {
it('should compare Foo1 file with template BEFORE FIX file and they should match (10)', () => {
result = compareTextFiles(currentFile, beforeFixFile)
expect(result).to.be.true
})

it('should execute and compare Foo1 with template AFTER FIX and they should match (9)', () => {
it('should execute and compare Foo1 with template AFTER FIX and they should match (10)', () => {
;({ code, stdout } = shell.exec(
`${params.command} ${params.param1} -c ${currentConfig} ${currentFile} --fix --disc --noPrompt`
))
Expand All @@ -587,18 +587,18 @@ describe('e2e', function () {
expect(result).to.be.true
})

it('should execute and exit with code 1 (9)', () => {
it('should execute and exit with code 1 (10)', () => {
expect(code).to.equal(EXIT_CODES.REPORTED_ERRORS)
})

it('should get the right report (9)', () => {
it('should get the right report (10)', () => {
const reportLines = stdout.split('\n')
const finalLine = '10 problems (10 errors, 0 warnings)'
expect(reportLines[reportLines.length - 3]).to.contain(finalLine)
})
})

it('should check FOO1 does not change after test (9)', () => {
it('should check FOO1 does not change after test (10)', () => {
result = compareTextFiles(currentFile, beforeFixFile)
expect(result).to.be.true
})
Expand All @@ -618,12 +618,12 @@ describe('e2e', function () {
})

describe('--fix with noPrompt', () => {
it('should compare Foo1 file with template BEFORE FIX file and they should match (10)', () => {
it('should compare Foo1 file with template BEFORE FIX file and they should match (11)', () => {
result = compareTextFiles(currentFile, beforeFixFile)
expect(result).to.be.true
})

it('should execute and compare Foo1 with template AFTER FIX and they should match (10)', () => {
it('should execute and compare Foo1 with template AFTER FIX and they should match (11)', () => {
;({ code, stdout } = shell.exec(
`${params.command} ${params.param1} -c ${currentConfig} ${currentFile} --fix --disc --noPrompt`
))
Expand All @@ -632,18 +632,18 @@ describe('e2e', function () {
expect(result).to.be.true
})

it('should execute and exit with code 1 (10)', () => {
it('should execute and exit with code 1 (11)', () => {
expect(code).to.equal(EXIT_CODES.REPORTED_ERRORS)
})

it('should get the right report (10)', () => {
it('should get the right report (11)', () => {
const reportLines = stdout.split('\n')
const finalLine = '12 problems (12 errors, 0 warnings)'
expect(reportLines[reportLines.length - 3]).to.contain(finalLine)
})
})

it('should check FOO1 does not change after test (10)', () => {
it('should check FOO1 does not change after test (11)', () => {
result = compareTextFiles(currentFile, beforeFixFile)
expect(result).to.be.true
})
Expand Down

0 comments on commit 00325ef

Please sign in to comment.