Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

docs(expectedconditions): Fix description #3775

Closed
wants to merge 1 commit into from

Conversation

massimocode
Copy link
Contributor

@massimocode
Copy link
Contributor Author

The build failed because apparently it stopped responding? Not sure how my changes could have caused that

@@ -404,8 +403,8 @@ export class ProtractorExpectedConditions {
}

/**
* An expectation for checking that an element is either invisible or not
* present on the DOM. This is the opposite of 'visibilityOf'.
* An expectation for checking that an element is invisible on the DOM.
Copy link
Member

Choose a reason for hiding this comment

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

This should still have "either invisible or not present on the DOM". If invisibilityOf returns true, that means visibility returned false. So either presenceOf is false or isDisplayed is false.

Copy link
Member

Choose a reason for hiding this comment

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

Please fix.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I initially opened this PR exactly to change this piece of text. The minor formatting fix above was just some "gardening".

You are quite right, on closer examination of the source code, the intent of invisibilityOf is as you say.

However, I have since opened this issue #3777 because invisibilityOf seems to have a race condition, which is why it cannot be used in its current state for waiting for elements to be removed from the DOM.

Copy link
Contributor

Choose a reason for hiding this comment

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

I would rather fix the bug than document it

Copy link
Member

@cnishina cnishina left a comment

Choose a reason for hiding this comment

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

The text should be changed back.

@@ -404,8 +403,8 @@ export class ProtractorExpectedConditions {
}

/**
* An expectation for checking that an element is either invisible or not
* present on the DOM. This is the opposite of 'visibilityOf'.
* An expectation for checking that an element is invisible on the DOM.
Copy link
Member

Choose a reason for hiding this comment

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

Please fix.

@@ -404,8 +403,8 @@ export class ProtractorExpectedConditions {
}

/**
* An expectation for checking that an element is either invisible or not
* present on the DOM. This is the opposite of 'visibilityOf'.
* An expectation for checking that an element is invisible on the DOM.
Copy link
Contributor

Choose a reason for hiding this comment

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

I would rather fix the bug than document it

@massimocode
Copy link
Contributor Author

Closing this PR as I should create a new PR with the fix @sjelin suggested

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants