You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have made a testcafe framework and it uses the implicit test controller of test cafe from the import so that I wont be needed to give it on all functions as a parameter. to this framework I started adding percy as a visual testing tool and i got in a bit of conflict. If I'm calling percySnapshot in one of the classes or functions used in the test itself, percy wont see the test controller as being good and it will fail to take the screenshot.
Login File
import { Selector, t } from 'testcafe';
import percySnapshot from '@percy/testcafe';
class LoginPage {
constructor() {
this.username = Selector('#user-name');
this.password = Selector('#password');
this.loginBtn = Selector('#login-button');
}
async loginUser(user, pass) {
await t.typeText(this.username, user).typeText(this.password, pass);
await percySnapshot(t, 'Login page: ' + user + ' ' + pass);
await t.click(this.loginBtn);
}
}
export default new LoginPage();
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
I have made a testcafe framework and it uses the implicit test controller of test cafe from the import so that I wont be needed to give it on all functions as a parameter. to this framework I started adding percy as a visual testing tool and i got in a bit of conflict. If I'm calling percySnapshot in one of the classes or functions used in the test itself, percy wont see the test controller as being good and it will fail to take the screenshot.
Login File
start of test file, having correct imports
Can someone please explain why this way it's not possible to run the percysnapshot?
Beta Was this translation helpful? Give feedback.
All reactions