tacoss / testcafe-blink-diff

Visual regression for Testcafé
64 stars 15 forks source link

Question about taking a selector snapshot #31

Closed oleg-bc closed 3 years ago

pateketrueke commented 3 years ago

A selector is a string or Selector instance, e.g.

import { Selector } from 'testcafe';

const toast = '#toast-id'; // or `const toast = Selector('#toast-id');`

// ... later in your tests:
await takeSnapshot(toast);

The syntax you used for t.selector[toast] is not valid, as there is no t.selector API available, which I am think is your issue. I mean, a selector is a concept explained by Testcafé itself, and is not an issue within this library if you're not familiar with.