File tree Expand file tree Collapse file tree 5 files changed +11
-11
lines changed
packages/angular/test/base Expand file tree Collapse file tree 5 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -89,17 +89,17 @@ test.describe('Inputs', () => {
8989 } ) ;
9090
9191 test ( 'should update values when erasing input' , async ( { page } ) => {
92- // Focus the input and use global keyboard to press backspace
93- await page . locator ( 'ion-input' ) . nth ( 0 ) . locator ( 'input' ) . focus ( ) ;
94- await page . keyboard . press ( 'Backspace' ) ;
92+ // Focus the input and press backspace to remove last character
93+ await page . locator ( 'ion-input' ) . nth ( 0 ) . locator ( 'input' ) . click ( ) ;
94+ await page . locator ( 'ion-input' ) . nth ( 0 ) . locator ( 'input' ) . press ( 'Backspace' ) ;
9595 // Check mirror element reflects the change
9696 await expect ( page . locator ( 'ion-input' ) . nth ( 1 ) ) . toHaveJSProperty ( 'value' , 'some tex' ) ;
9797 // Check note text (Angular binding)
9898 await expect ( page . locator ( '#input-note' ) ) . toHaveText ( 'some tex' ) ;
9999
100- // Focus the last OTP input and use global keyboard to press backspace
101- await page . locator ( 'ion-input-otp input' ) . last ( ) . focus ( ) ;
102- await page . keyboard . press ( 'Backspace' ) ;
100+ // Focus the last OTP input and press backspace
101+ await page . locator ( 'ion-input-otp input' ) . last ( ) . click ( ) ;
102+ await page . locator ( 'ion-input-otp input' ) . last ( ) . press ( 'Backspace' ) ;
103103 // Check mirror element reflects the change
104104 await expect ( page . locator ( 'ion-input-otp' ) . nth ( 1 ) ) . toHaveJSProperty ( 'value' , '123' ) ;
105105 // Check note text (Angular binding)
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ test.describe('Providers', () => {
1515 await expect ( page . locator ( '#is-desktop' ) ) . toHaveText ( 'true' ) ;
1616 await expect ( page . locator ( '#is-mobile' ) ) . toHaveText ( 'false' ) ;
1717 await expect ( page . locator ( '#keyboard-height' ) ) . toHaveText ( '12345' ) ;
18- await expect ( page . locator ( '#query-params' ) ) . toHaveText ( 'firstParam: null, firstParam : null' ) ;
18+ await expect ( page . locator ( '#query-params' ) ) . toHaveText ( 'firstParam: null, secondParam : null' ) ;
1919 } ) ;
2020
2121 test ( 'should detect testing mode' , async ( { page } ) => {
@@ -27,7 +27,7 @@ test.describe('Providers', () => {
2727 test ( 'should get query params' , async ( { page } ) => {
2828 await page . goto ( '/lazy/providers?firstParam=abc&secondParam=true' ) ;
2929
30- await expect ( page . locator ( '#query-params' ) ) . toHaveText ( 'firstParam: abc, firstParam : true' ) ;
30+ await expect ( page . locator ( '#query-params' ) ) . toHaveText ( 'firstParam: abc, secondParam : true' ) ;
3131 } ) ;
3232
3333 // https://github.com/ionic-team/ionic-framework/issues/28337
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ test.describe('Range', () => {
66 } ) ;
77
88 test ( 'should have form control initial value' , async ( { page } ) => {
9- await expect ( page . locator ( 'ion-range input ' ) ) . toHaveValue ( '5' ) ;
9+ await expect ( page . locator ( 'ion-range' ) ) . toHaveJSProperty ( 'value' , 5 ) ;
1010 } ) ;
1111
1212 test ( 'should reflect Ionic form control status classes' , async ( { page } ) => {
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ test.describe('RouterLink', () => {
3030 // checking here that it is only removed from Ionic components.
3131 // https://github.com/ionic-team/ionic-framework/issues/20632
3232 test ( 'should have tabindex="0" with a native span' , async ( { page } ) => {
33- await expect ( page . locator ( 'span[routerlink="/standalone/popover" ]' ) ) . toHaveAttribute ( 'tabindex' , '0' ) ;
33+ await expect ( page . locator ( 'span[routerlink]' ) ) . toHaveAttribute ( 'tabindex' , '0' ) ;
3434 } ) ;
3535
3636 test ( 'should not have tabindex set with an ionic button' , async ( { page } ) => {
Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ export class ProvidersComponent {
8787 } ) ;
8888 const firstQuery = platform . getQueryParam ( 'firstParam' ) ;
8989 const secondQuery = platform . getQueryParam ( 'secondParam' ) ;
90- this . queryParams = `firstParam: ${ firstQuery } , firstParam : ${ secondQuery } ` ;
90+ this . queryParams = `firstParam: ${ firstQuery } , secondParam : ${ secondQuery } ` ;
9191
9292 this . isDesktop = platform . is ( 'desktop' ) ;
9393 this . isMobile = platform . is ( 'mobile' ) ;
You can’t perform that action at this time.
0 commit comments