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 noticed an issue with the playwright/valid-title rule when the test name comes from a string variable inside of a loop or read from a cases array.
Here is an example:
typeTestCase={name: string;// ...};constcases: TestCase[]=[{name: 'my first test',// ...},{name: 'my second test',// ...},];test.describe('Tests with loop',()=>{for(const{ name }ofcases){test(name,async()=>{// ...expect(1+1).toBe(2);});}});
It wrongly complains that the title is expected to be a string, which is actually the case.
We have the same issue when reading from the cases array instead of looping.