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

Element attribute not exists #709

Closed
wants to merge 6 commits into from

Conversation

J7mbo
Copy link

@J7mbo J7mbo commented Jul 1, 2016

No description provided.

@J7mbo J7mbo mentioned this pull request Jul 1, 2016
@J7mbo
Copy link
Author

J7mbo commented Jul 1, 2016

I'm happy to squash these once we've sorted out the indentation etc. Can scrutiniser do this for me because I tried once already and failed miserably!

@J7mbo
Copy link
Author

J7mbo commented Jul 1, 2016

According to Scrutiniser it's picking up things that aren't anything to do with this PR.

@stof
Copy link
Member

stof commented Jul 4, 2016

yeah, this is because Scrutinizer made some changes on their side after the last run on the project, and so it finds more issues (most of them are related to a wrong phpdoc on our side, leading to Scrutinizer using the wrong type from a property because it is using this phpdoc)

@J7mbo
Copy link
Author

J7mbo commented Jul 4, 2016

If the code looks alright, and there's nothing else I need to change / add, let me know and then I'll squash the commits.

@J7mbo
Copy link
Author

J7mbo commented Jul 25, 2016

@stof Although I'm not one to talk (I really need to read my own PRs and issues more often, seriously) - can we get this merged in? Reason - I'm building something cool and don't want to have to host my own version of your code for my simple change.

@@ -982,6 +982,81 @@ public function testElementAttributeExists()
);
}

public function testElementAttributeNotExistsValid()
Copy link
Member

Choose a reason for hiding this comment

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

This test name doesn't resemble naming convention of test for elementAttributeNotExists method.

Copy link
Author

Choose a reason for hiding this comment

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

I will rename this to testElementAttributeNotExists().

Copy link
Member

Choose a reason for hiding this comment

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

I've expected, that you'll just copy-paste (and make changes) test for elementAttributeExists method.

@aik099
Copy link
Member

aik099 commented Jul 27, 2016

Today’s review completed. Please fix reported issues so that I can compare added tests with existing ones. Then squash.

@J7mbo
Copy link
Author

J7mbo commented Jul 27, 2016

@aik099 As you suggested, I've aggregated the tests into testElementAttributeNotExists(). As Github now provides the ability for the maintainer to squash when merging, would you like to do that so you can have the exact message you want?

@aik099
Copy link
Member

aik099 commented Jul 27, 2016

As Github now provides the ability for the maintainer to squash when merging, would you like to do that so you can have the exact message you want?

When you squash then you're set as author and as committer on commit that is merged. If I squash during merging, then you're set as author, but me as committer. If that is fine, then I'll squash during merge.

->will($this->returnValue(true))
;

$this->setExpectedException('Behat\\Mink\Exception\ElementHtmlException',
Copy link
Member

Choose a reason for hiding this comment

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

In multi-line method/function calls each argument must be on it's own line.

@aik099
Copy link
Member

aik099 commented Jul 28, 2016

Today’s review completed.

@J7mbo J7mbo closed this Apr 27, 2020
@aik099
Copy link
Member

aik099 commented May 1, 2020

@J7mbo , you closed this PR on purpose or just because your branch removal was pushed?

@J7mbo
Copy link
Author

J7mbo commented May 1, 2020

@aik099 I closed it because it's 4 years old and I'm no longer working with mink. It's in my list of things I have open, so I'd like it removed from my list. Thanks!

@aik099
Copy link
Member

aik099 commented May 1, 2020

I see, no worries. Thank you.

@JPustkuchen
Copy link

JPustkuchen commented Nov 20, 2021

So this was never merged? I was just looking for exactly this functionality :D

Here's a workaround:
$this->assertSession()->elementNotExists('css', '#edit-pass[autocomplete]');
https://drupal.stackexchange.com/questions/257284/how-to-check-that-an-attribute-not-exists-in-an-element-with-phpunit

@aik099
Copy link
Member

aik099 commented Nov 21, 2021

@JPustkuchen , that's not merged, because the PR author is not able to continue working on it. If you'd like to take over, then please do so. Make to correct all outstanding issues found in this PR as well.

@JPustkuchen
Copy link

Thank you @aik099 I used the workaround and it works good enough for us.

@aik099
Copy link
Member

aik099 commented Dec 9, 2021

@J7mbo , this functionality is now available after #817 is merged.

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.

4 participants