Fix tests and use class instead of id