testing-library / angular-testing-library

🐙 Simple and complete Angular testing utilities that encourage good testing practices
https://testing-library.com/angular
MIT License
710 stars 90 forks source link

Has anyone thought of creating protractor-testing-library? #65

Closed tobiasbueschel closed 3 years ago

tobiasbueschel commented 4 years ago

Hello 👋

Background Thanks a lot for everyone's work with angular-testing-library! I've been using the @testing-library family on various projects and absolutely love the move towards not testing implementation details, but instead focusing on use cases and what the user actually cares about. It's been a bliss not having to change any tests if the underlying implementation changes.

Unfortunately, a lot of protractor e2e code bases that I've seen rely heavily on element selectors such as:

const dropdown = element(by.id("submit-button"));

// or much worse
const dropdown = element(by.css("#content-container > div.submit-modal-container > app-generic-form > div > form > div > label > app-drop-down"));
const someText = element(by.xpath("//app-accordion[21]//div[2]/div/div[1]/div[2]/div[2]//span"));

And while there are some discussions about the status and future of protractor, it still comes bundled with Angular and is used by many projects. For my personal projects, I would simply move to other e2e libraries like cypress or testcafe, but I recognise that in many organisations that have built their e2e test suites over the years, it might not be that easy:

Question Hence, I was wondering if anyone has already done any work / thinking of creating a protractor-testing-library?

Cheers

  • Sorry for raising the issue here, but I wasn't sure where else I could raise this
timdeschryver commented 4 years ago

Hi @tobiasbueschel 👋 We're glad your enjoying test-library!

AFAIK there isn't a testing lib for protractor, nor the intention of creating it. Perhaps that @kentcdodds knows if there's something in the making.

Personally, I haven't used protractor before so I'm not sure where to start here... But that doesn't mean we shouldn't create it.

kentcdodds commented 4 years ago

I don't know of anyone who's working on protractor for Testing Library (but that would be very cool).