fix :: change to expected result 1
This commit is contained in:
parent
d48ddeee0e
commit
905e5ffa37
|
|
@ -1261,11 +1261,10 @@ test('test with custom location', async ({ runInlineTest }) => {
|
||||||
};
|
};
|
||||||
`,
|
`,
|
||||||
'a.test.ts': `
|
'a.test.ts': `
|
||||||
import { test, expect } from '@playwright/test';
|
import { test } from '@playwright/test';
|
||||||
import { customStep } from './helper';
|
import { customStep } from './helper';
|
||||||
|
|
||||||
test('test with custom location', async ({ page }) => {
|
test('test with custom location', async ({ page }) => {
|
||||||
try {
|
|
||||||
await customStep(test, 'User logs in', async () => {
|
await customStep(test, 'User logs in', async () => {
|
||||||
await page.goto('http://localhost:1234/login');
|
await page.goto('http://localhost:1234/login');
|
||||||
await page.fill('input#username', 'testuser');
|
await page.fill('input#username', 'testuser');
|
||||||
|
|
@ -1275,15 +1274,11 @@ test('test with custom location', async ({ runInlineTest }) => {
|
||||||
const profileVisible = await page.isVisible('.profile');
|
const profileVisible = await page.isVisible('.profile');
|
||||||
expect(profileVisible).toBeTruthy();
|
expect(profileVisible).toBeTruthy();
|
||||||
});
|
});
|
||||||
} catch (e) {
|
});
|
||||||
console.error('Login test failed:', e);
|
`
|
||||||
throw e;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
`
|
|
||||||
}, { reporter: '', workers: 1 });
|
}, { reporter: '', workers: 1 });
|
||||||
|
|
||||||
expect(result.exitCode).toBe(0);
|
expect(result.exitCode).toBe(1);
|
||||||
expect(result.outputLines).toEqual([
|
expect(result.outputLines).toEqual([
|
||||||
'hook |Before Hooks',
|
'hook |Before Hooks',
|
||||||
'test.step |User logs in @ custom-file.ts:99',
|
'test.step |User logs in @ custom-file.ts:99',
|
||||||
|
|
@ -1328,7 +1323,7 @@ test('nested step test with custom locations', async ({ runInlineTest }) => {
|
||||||
`
|
`
|
||||||
}, { reporter: '', workers: 1 });
|
}, { reporter: '', workers: 1 });
|
||||||
|
|
||||||
expect(result.exitCode).toBe(0);
|
expect(result.exitCode).toBe(1);
|
||||||
expect(result.outputLines).toEqual([
|
expect(result.outputLines).toEqual([
|
||||||
'hook |Before Hooks',
|
'hook |Before Hooks',
|
||||||
'test.step |Outer step @ nested-steps.ts:10',
|
'test.step |Outer step @ nested-steps.ts:10',
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue