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

fixed element position bug #1829

Merged
merged 1 commit into from Aug 15, 2019

Conversation

@AnotherAnkor
Copy link
Contributor

commented Aug 5, 2019

Without this change you need everytime and everywhere print "()" brackets.

@Vorobeyko

This comment has been minimized.

Copy link
Contributor

commented Aug 6, 2019

Can you write the tests, please?

@AnotherAnkor

This comment has been minimized.

Copy link
Contributor Author

commented Aug 7, 2019

Can you write the tests, please?

I never did it before. But I can. It's strongly recomended? What framework should I use?

@Vorobeyko

This comment has been minimized.

Copy link
Contributor

commented Aug 7, 2019

I never did it before. But I can. It's strongly recomended?

You must to write tests in this file: https://github.com/Codeception/CodeceptJS/blob/master/test/unit/locator_test.js
You can look at existing tests, and write by analogy

What framework should I use?

We are use mocha.

@AnotherAnkor

This comment has been minimized.

Copy link
Contributor Author

commented Aug 7, 2019

As I can see you have the test which covers this code.
Please, take a look:

it('should build locator to match element by position', () => {

@DavertMik

This comment has been minimized.

Copy link
Member

commented Aug 15, 2019

Ok, seems fine. Thanks!

@DavertMik DavertMik merged commit 2926201 into Codeception:master Aug 15, 2019

5 checks passed

Codacy/PR Quality Review Up to standards. A positive pull request.
Details
Hound No violations found. Woof!
ci/circleci: docker Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
semaphoreci The build passed on Semaphore.
Details
@nitschSB

This comment has been minimized.

Copy link
Contributor

commented Aug 22, 2019

@AnotherAnkor and @DavertMik

this change breaks a lot of selectors! Now there are selectors you may not use anywhere.
For example my universal td selector

locate('td')
        .withText(text)
        .at(columnNumber)
        .inside(
          this.tableRows(tableId)
            .withText(text)
            .at(_rowNumber)
        )

Puppeteer throws this exception: "Uncaught DOMException: Failed to execute ... is not a valid XPath expression."

Reason: Brackets aren't allowed in a "ancestor"-selector.
//*[ancestor::(//*)[1]]

By the way removePrefix does not work for those kind of selectors as well.

johnyb added a commit to open-xchange/appsuite-frontend that referenced this pull request Aug 30, 2019
cleanup dependencies in package.json
since we don't built in jenkins any longer there is no need to keep the rather
complicated structure of our package.json. We can now also rely completely on
the yarn.lock file since we have complete controll over the pipeline.

Also change locators in e2e tests a bit, because for some reason some locators don't work
any longer since Codeception/CodeceptJS#1829 - may be, this is a
bug.
@AnotherAnkor

This comment has been minimized.

Copy link
Contributor Author

commented Aug 31, 2019

@nitschSB, sorry about it.
But I never used so terrible code like you showed.
May be more skilled guys will says something about your example?
Can you provide more examples, please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.