mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-14 16:52:26 +08:00
chore(): sync with main
This commit is contained in:
@ -9,7 +9,8 @@
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
<ion-content class="ion-padding">
|
||||
{{ title }}
|
||||
<ion-label id="title">{{ title }}</ion-label>
|
||||
<ion-input></ion-input>
|
||||
</ion-content>
|
||||
</ion-page>
|
||||
</template>
|
||||
@ -23,6 +24,7 @@ import {
|
||||
IonHeader,
|
||||
IonTitle,
|
||||
IonToolbar,
|
||||
IonInput,
|
||||
modalController
|
||||
} from '@ionic/vue';
|
||||
import { defineComponent } from 'vue';
|
||||
@ -38,7 +40,8 @@ export default defineComponent({
|
||||
IonContent,
|
||||
IonHeader,
|
||||
IonTitle,
|
||||
IonToolbar
|
||||
IonToolbar,
|
||||
IonInput
|
||||
},
|
||||
setup() {
|
||||
const dismiss = async () => {
|
||||
|
@ -132,7 +132,7 @@ describe('Overlays', () => {
|
||||
cy.get('ion-button#present-overlay').click();
|
||||
cy.get('ion-modal').should('exist');
|
||||
|
||||
cy.get('ion-modal ion-content').should('have.text', 'Custom Title');
|
||||
cy.get('ion-modal ion-content #title').should('have.text', 'Custom Title');
|
||||
});
|
||||
|
||||
it('should pass props to modal via component', () => {
|
||||
@ -142,7 +142,7 @@ describe('Overlays', () => {
|
||||
cy.get('ion-button#present-overlay').click();
|
||||
cy.get('ion-modal').should('exist');
|
||||
|
||||
cy.get('ion-modal ion-content').should('have.text', 'Custom Title');
|
||||
cy.get('ion-modal ion-content #title').should('have.text', 'Custom Title');
|
||||
});
|
||||
|
||||
it('should pass props to popover via controller', () => {
|
||||
@ -213,6 +213,44 @@ describe('Overlays', () => {
|
||||
didDismiss: 2
|
||||
});
|
||||
});
|
||||
|
||||
it('should unmount modal via component', () => {
|
||||
cy.get('ion-radio#ion-modal').click();
|
||||
cy.get('ion-radio#component').click();
|
||||
|
||||
cy.get('ion-button#present-overlay').click();
|
||||
cy.get('ion-modal').should('exist');
|
||||
|
||||
cy.get('ion-modal ion-input').should('have.value', '');
|
||||
cy.get('ion-modal ion-input').type('1');
|
||||
|
||||
cy.get('ion-modal #dismiss').click();
|
||||
|
||||
cy.get('ion-button#present-overlay').click();
|
||||
cy.get('ion-modal').should('exist');
|
||||
|
||||
cy.get('ion-modal ion-input').should('have.value', '');
|
||||
});
|
||||
|
||||
|
||||
it('should unmount modal via controller', () => {
|
||||
cy.get('ion-radio#ion-modal').click();
|
||||
cy.get('ion-radio#controller').click();
|
||||
|
||||
cy.get('ion-button#present-overlay').click();
|
||||
cy.get('ion-modal').should('exist');
|
||||
|
||||
cy.get('ion-modal ion-input').should('have.value', '');
|
||||
cy.get('ion-modal ion-input').type('1');
|
||||
|
||||
cy.get('ion-modal #dismiss').click();
|
||||
|
||||
cy.get('ion-button#present-overlay').click();
|
||||
cy.get('ion-modal').should('exist');
|
||||
|
||||
cy.get('ion-modal ion-input').should('have.value', '');
|
||||
});
|
||||
|
||||
})
|
||||
|
||||
const testLifecycle = (selector, expected = {}) => {
|
||||
|
Reference in New Issue
Block a user