mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-05-18 11:37:33 +08:00
Refactoring WIP
This commit is contained in:
4
tests/fixtures/BlueprintFixture.js
vendored
4
tests/fixtures/BlueprintFixture.js
vendored
@@ -93,7 +93,7 @@ export default class BlueprintFixture {
|
||||
})
|
||||
webserver.listen(this.#port, "127.0.0.1", async () => {
|
||||
console.log(`Server started on http://127.0.0.1:${this.#port}`)
|
||||
const url = `http://127.0.0.1:${this.#port}/empty.html`
|
||||
const url = `http://127.0.0.1:${this.#port}/debug.html`
|
||||
try {
|
||||
await this.checkServerReady(url)
|
||||
BlueprintFixture.server = webserver
|
||||
@@ -111,7 +111,7 @@ export default class BlueprintFixture {
|
||||
}
|
||||
|
||||
async setup() {
|
||||
const url = `http://127.0.0.1:${this.#port}/empty.html`
|
||||
const url = `http://127.0.0.1:${this.#port}/debug.html`
|
||||
for (let i = 0; i < 1E4; ++i) {
|
||||
try {
|
||||
await this.page.goto(url, { waitUntil: "domcontentloaded" })
|
||||
|
||||
8
tests/fixtures/test.js
vendored
8
tests/fixtures/test.js
vendored
@@ -62,11 +62,9 @@ export function testNode(testData) {
|
||||
if (testData.color) {
|
||||
test(
|
||||
`${testData.name}: Has correct color`,
|
||||
async ({ blueprintPage }) => {
|
||||
expect(
|
||||
await blueprintPage.node.evaluate(node => node.entity.nodeColor().toString())
|
||||
).toBe(testData.color.toString())
|
||||
}
|
||||
async ({ blueprintPage }) =>
|
||||
expect(await blueprintPage.node.evaluate(node => node.entity.nodeColor().toString()))
|
||||
.toBe(testData.color.toString())
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user