Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: do not ignore assertView errors in broken session rejection #798

Merged
merged 1 commit into from
Oct 18, 2023

Conversation

sipayRT
Copy link
Member

@sipayRT sipayRT commented Oct 17, 2023

No description provided.

Copy link
Member

@DudaGod DudaGod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/ok


it("should not mark session as broken twice", async () => {
session.commandList = ["foo"];
session.foo = () => "foo";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А зачем тебе эти 2 строки (такое ощущение, что можно выгасить)?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

при стабе комманд мы проходимся именно по списку команд из commandList. И стабаем только те команды, которые являются функциями

// we need to check session twice:
// 1. before afterEach hook to prevent work with broken sessions
// 2. after collecting all assertView errors (including afterEach section)
if (isSessionBroken(error, this._config)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Может тут добавить условие - browser.state.isBroken (оно публичное)?

@@ -491,7 +492,7 @@ describe("worker/runner/test-runner", () => {

await run_({ runner }).catch(() => {});

assert.calledOnce(browser.markAsBroken);
assert.calledTwice(browser.markAsBroken);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Немного странно теперь тут проверки выглядят. Я бы все таки один раз вызывал (выше писал про это)

@sipayRT sipayRT force-pushed the sp.HERMIONE-1187.patternsOnReject branch from 75708f6 to 7059cef Compare October 18, 2023 10:10
@sipayRT sipayRT force-pushed the sp.HERMIONE-1187.patternsOnReject branch from 7059cef to b65fe38 Compare October 18, 2023 10:34
@sipayRT sipayRT merged commit 3fc5bc9 into master Oct 18, 2023
2 checks passed
@sipayRT sipayRT deleted the sp.HERMIONE-1187.patternsOnReject branch October 18, 2023 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants