mirror of
https://github.com/web-infra-dev/midscene.git
synced 2025-12-29 16:09:35 +00:00
chore: optimize generate code (#63)
This commit is contained in:
parent
bc85f7cd2d
commit
2d1b326007
@ -20,73 +20,6 @@ exports[`extractor > basic 1`] = `
|
||||
},
|
||||
"content": "User Name: Stella",
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"nodeType": "TEXT Node",
|
||||
},
|
||||
"content": "ID
|
||||
Field 2
|
||||
Field 3
|
||||
Field 4
|
||||
Field 5
|
||||
|
||||
|
||||
|
||||
|
||||
30S
|
||||
Kace Cervantes
|
||||
Aylin Sawyer
|
||||
Jefferson Kirby
|
||||
Skyla Jefferson
|
||||
|
||||
|
||||
70U
|
||||
Florence Davenport
|
||||
Dariel Acevedo
|
||||
Ashlynn Delacruz
|
||||
Memphis Leal
|
||||
|
||||
|
||||
3AY
|
||||
Crystal Newman
|
||||
Anderson Brown
|
||||
Charlotte Griffith
|
||||
Franklin Everett
|
||||
|
||||
|
||||
YPG
|
||||
Kori Payne
|
||||
Edward Blevins
|
||||
Aila Gill
|
||||
Matthias Reed
|
||||
|
||||
|
||||
ZEN
|
||||
Magnolia Duke
|
||||
Kalel Glover
|
||||
Alessia Barton
|
||||
Cassius Peck",
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"nodeType": "TEXT Node",
|
||||
},
|
||||
"content": "ID
|
||||
Field 2
|
||||
Field 3
|
||||
Field 4
|
||||
Field 5",
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"nodeType": "TEXT Node",
|
||||
},
|
||||
"content": "ID
|
||||
Field 2
|
||||
Field 3
|
||||
Field 4
|
||||
Field 5",
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"nodeType": "TEXT Node",
|
||||
@ -117,54 +50,6 @@ exports[`extractor > basic 1`] = `
|
||||
},
|
||||
"content": "Field 5",
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"nodeType": "TEXT Node",
|
||||
},
|
||||
"content": "30S
|
||||
Kace Cervantes
|
||||
Aylin Sawyer
|
||||
Jefferson Kirby
|
||||
Skyla Jefferson
|
||||
|
||||
|
||||
70U
|
||||
Florence Davenport
|
||||
Dariel Acevedo
|
||||
Ashlynn Delacruz
|
||||
Memphis Leal
|
||||
|
||||
|
||||
3AY
|
||||
Crystal Newman
|
||||
Anderson Brown
|
||||
Charlotte Griffith
|
||||
Franklin Everett
|
||||
|
||||
|
||||
YPG
|
||||
Kori Payne
|
||||
Edward Blevins
|
||||
Aila Gill
|
||||
Matthias Reed
|
||||
|
||||
|
||||
ZEN
|
||||
Magnolia Duke
|
||||
Kalel Glover
|
||||
Alessia Barton
|
||||
Cassius Peck",
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"nodeType": "TEXT Node",
|
||||
},
|
||||
"content": "30S
|
||||
Kace Cervantes
|
||||
Aylin Sawyer
|
||||
Jefferson Kirby
|
||||
Skyla Jefferson",
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"nodeType": "TEXT Node",
|
||||
@ -195,16 +80,6 @@ exports[`extractor > basic 1`] = `
|
||||
},
|
||||
"content": "Skyla Jefferson",
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"nodeType": "TEXT Node",
|
||||
},
|
||||
"content": "70U
|
||||
Florence Davenport
|
||||
Dariel Acevedo
|
||||
Ashlynn Delacruz
|
||||
Memphis Leal",
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"nodeType": "TEXT Node",
|
||||
@ -235,16 +110,6 @@ exports[`extractor > basic 1`] = `
|
||||
},
|
||||
"content": "Memphis Leal",
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"nodeType": "TEXT Node",
|
||||
},
|
||||
"content": "3AY
|
||||
Crystal Newman
|
||||
Anderson Brown
|
||||
Charlotte Griffith
|
||||
Franklin Everett",
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"nodeType": "TEXT Node",
|
||||
@ -275,16 +140,6 @@ exports[`extractor > basic 1`] = `
|
||||
},
|
||||
"content": "Franklin Everett",
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"nodeType": "TEXT Node",
|
||||
},
|
||||
"content": "YPG
|
||||
Kori Payne
|
||||
Edward Blevins
|
||||
Aila Gill
|
||||
Matthias Reed",
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"nodeType": "TEXT Node",
|
||||
@ -315,16 +170,6 @@ exports[`extractor > basic 1`] = `
|
||||
},
|
||||
"content": "Matthias Reed",
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"nodeType": "TEXT Node",
|
||||
},
|
||||
"content": "ZEN
|
||||
Magnolia Duke
|
||||
Kalel Glover
|
||||
Alessia Barton
|
||||
Cassius Peck",
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"nodeType": "TEXT Node",
|
||||
@ -355,16 +200,6 @@ exports[`extractor > basic 1`] = `
|
||||
},
|
||||
"content": "Cassius Peck",
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"nodeType": "TEXT Node",
|
||||
},
|
||||
"content": "Form
|
||||
Name:
|
||||
|
||||
Click Me
|
||||
Shape",
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"nodeType": "TEXT Node",
|
||||
@ -373,11 +208,16 @@ exports[`extractor > basic 1`] = `
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"for": "name",
|
||||
"nodeType": "TEXT Node",
|
||||
},
|
||||
"content": "Name:",
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"nodeType": "TEXT Node",
|
||||
},
|
||||
"content": "",
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"id": "J_input",
|
||||
@ -386,18 +226,36 @@ exports[`extractor > basic 1`] = `
|
||||
},
|
||||
"content": "Hello World This is Placeholder",
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"nodeType": "TEXT Node",
|
||||
},
|
||||
"content": "",
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"nodeType": "BUTTON Node",
|
||||
},
|
||||
"content": "Click Me",
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"nodeType": "TEXT Node",
|
||||
},
|
||||
"content": "",
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"nodeType": "TEXT Node",
|
||||
},
|
||||
"content": "Shape",
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"nodeType": "TEXT Node",
|
||||
},
|
||||
"content": "",
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"nodeType": "INPUT Node",
|
||||
@ -415,8 +273,12 @@ exports[`extractor > basic 1`] = `
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"class": ".gh-ar-hdn",
|
||||
"for": "gh-ac",
|
||||
"nodeType": "TEXT Node",
|
||||
},
|
||||
"content": "",
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"nodeType": "TEXT Node",
|
||||
},
|
||||
"content": "输入搜索关键词",
|
||||
@ -445,5 +307,11 @@ exports[`extractor > basic 1`] = `
|
||||
},
|
||||
"content": "搜索任何物品",
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"nodeType": "TEXT Node",
|
||||
},
|
||||
"content": "",
|
||||
},
|
||||
]
|
||||
`;
|
||||
|
||||
@ -4,7 +4,7 @@ import { describe, expect, it } from 'vitest';
|
||||
import { launchPage } from '../ai/puppeteer/utils';
|
||||
|
||||
const pagePath = join(__dirname, './fixtures/extractor.html');
|
||||
describe.skipIf(typeof process.env.CI !== 'undefined')(
|
||||
describe(
|
||||
'extractor',
|
||||
() => {
|
||||
it('basic', async () => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user