@@ -871,31 +871,6 @@ runRuleTester('prefer-web-first-assertions', rule, {
871
871
await expect(fooLocatorText).toHaveText('foo');
872
872
` ) ,
873
873
} ,
874
- {
875
- code : test ( `
876
- const fooLocator = page.locator('.fooClass');
877
- let fooLocatorText = await fooLocator.allInnerTexts();
878
- expect(fooLocatorText).toEqual('foo');
879
- fooLocatorText = 'foo';
880
- expect(fooLocatorText).toEqual('foo');
881
- ` ) ,
882
- errors : [
883
- {
884
- column : 9 ,
885
- data : { matcher : 'toHaveText' , method : 'allInnerTexts' } ,
886
- endColumn : 31 ,
887
- line : 4 ,
888
- messageId : 'useWebFirstAssertion' ,
889
- } ,
890
- ] ,
891
- output : test ( `
892
- const fooLocator = page.locator('.fooClass');
893
- let fooLocatorText = fooLocator;
894
- await expect(fooLocatorText).toHaveText('foo');
895
- fooLocatorText = 'foo';
896
- expect(fooLocatorText).toEqual('foo');
897
- ` ) ,
898
- } ,
899
874
{
900
875
code : test ( `
901
876
let fooLocatorText;
@@ -921,33 +896,6 @@ runRuleTester('prefer-web-first-assertions', rule, {
921
896
await expect(fooLocatorText).toHaveText('foo');
922
897
` ) ,
923
898
} ,
924
- {
925
- code : test ( `
926
- let fooLocatorText;
927
- let fooLocatorText2;
928
- const fooLocator = page.locator('.fooClass');
929
- fooLocatorText = await fooLocator.allInnerTexts();
930
- fooLocatorText2 = await fooLocator.allInnerTexts();
931
- expect(fooLocatorText).toEqual('foo');
932
- ` ) ,
933
- errors : [
934
- {
935
- column : 9 ,
936
- data : { matcher : 'toHaveText' , method : 'allInnerTexts' } ,
937
- endColumn : 31 ,
938
- line : 7 ,
939
- messageId : 'useWebFirstAssertion' ,
940
- } ,
941
- ] ,
942
- output : test ( `
943
- let fooLocatorText;
944
- let fooLocatorText2;
945
- const fooLocator = page.locator('.fooClass');
946
- fooLocatorText = fooLocator;
947
- fooLocatorText2 = await fooLocator.allInnerTexts();
948
- await expect(fooLocatorText).toHaveText('foo');
949
- ` ) ,
950
- } ,
951
899
{
952
900
code : test ( `
953
901
let fooLocatorText;
0 commit comments