Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

bad order (place) if is used hooks

Offen
#3,095 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
35/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
javascript, node.js
Bereich
testing

Rechercherichtung

Reproduziere den Bericht mit den gezeigten Helper-Hooks unter npx codeceptjs run --steps und mit demselben Befehl ohne --steps. Vergleiche die Reihenfolge in der Konsole für _beforeSuite, _beforeStep, _before, _passed und _failed; abgeschlossen ist die Aufgabe, wenn die Ausgabe des passed-Hooks vor dem Erfolgsstatus erscheint, während die Reihenfolge der anderen Hooks korrekt bleibt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

stale

CodeceptJS v3.1.3

I try create file with helper, thats contains:

_beforeSuite() {
console.log('This text must be before feature string, but is after feature string')
}

_beforeStep() {
console.log('This text must be before each step and page object')
}

_before() {
console.log('This text must be before scenario string, but is after scenario string')
}

_passed() {
console.log('This text must be before OK status, but is after OK status')
}

_failed() {
console.log('This text must be before fail status and is before status - working correctly')
}

when i run codecept as
npx codeceptjs run --steps

i got in console:
CodeceptJS v3.1.3
Using test root "C:_git\sandbox"

Typescript Example1 --
This text must be before feature string, but is after feature string
test something
This text must be before scenario string, but is after scenario string
From homePage neco
Login Page
This text must be before each step and page object
homePage: goToHome
I am on page "/"
This text must be before each step and page object
I print message "Helper message Pavel"
Helper message Pavel
This text must be before each step and page object
loginPage: link
I wait for visible "body"
This text must be before each step and page object
I print helpers
Helpers enabled hokus [ 'Playwright', 'CustomHelper', 'HokusHelper' ]
This text must be before each step and page object
I fill field "user_email", "something@totest.com"
This text must be before each step and page object
I wait 2
√ OK in 5177ms

This text must be before OK status, but is after OK status
po kazdym scenari (describe)
test something2
This text must be before scenario string, but is after scenario string
From homePage neco
Login Page2
This text must be before each step and page object
homePage: goToHome
I am on page "/"
This text must be before each step and page object
I print message "Helper message Pavel2"
Helper message Pavel2
This text must be before each step and page object
loginPage: link
I wait for visible "body"
This text must be before each step and page object
I print helpers
Helpers enabled hokus [ 'Playwright', 'CustomHelper', 'HokusHelper' ]
This text must be before each step and page object
I fill field "user_email", "something@totest2.com"
This text must be before each step and page object
I wait 2
This text must be before each step and page object
I see "pokus"
This text must be before fail status and is before status - working correctly
× FAILED in 8761ms

when runing without --steps

Typescript Example1 --
This text must be before feature string, but is after feature string
This text must be before scenario string, but is after scenario string
From homePage neco
Login Page
This text must be before each step and page object
This text must be before each step and page object
Helper message Pavel
This text must be before each step and page object
This text must be before each step and page object
Helpers enabled hokus [ 'Playwright', 'CustomHelper', 'HokusHelper' ]
This text must be before each step and page object
This text must be before each step and page object
√ test something in 5294ms
This text must be before OK status, but is after OK status
po kazdym scenari (describe)
This text must be before scenario string, but is after scenario string
From homePage neco
Login Page2
This text must be before each step and page object
This text must be before each step and page object
Helper message Pavel2
This text must be before each step and page object
This text must be before each step and page object
Helpers enabled hokus [ 'Playwright', 'CustomHelper', 'HokusHelper' ]
This text must be before each step and page object
This text must be before each step and page object
This text must be before each step and page object
This text must be before fail status and is before status - working correctly
× test something2 in 8677ms

I mean, console.logs used in hooks, must be visible before features and scenario in console. And _failed() working correctly, but _passed() is not...

Vorherrschende Sprache
JavaScript
Sterne
4.2k
Forks
756
Ø Merge
2 T. 9 Std.
Gemergte PRs (30 T.)
16

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus codeceptjs/CodeceptJS

Alle Issues in codeceptjs/CodeceptJS

Ähnliche Issues

Weitere Issues zu JavaScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.