mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-21 04:53:58 +08:00
test(alert): add test for alert without a body
This commit is contained in:
@ -5,13 +5,12 @@ import {App, Page, Alert, NavController} from '../../../../../ionic/ionic';
|
|||||||
templateUrl: 'main.html'
|
templateUrl: 'main.html'
|
||||||
})
|
})
|
||||||
class E2EPage {
|
class E2EPage {
|
||||||
|
testConfirmOpen: boolean = false;
|
||||||
|
testPromptOpen: boolean = false;
|
||||||
|
testConfirmResult: string = '';
|
||||||
|
testPromptResult: string = '';
|
||||||
|
|
||||||
constructor(private nav: NavController) {
|
constructor(private nav: NavController) { }
|
||||||
this.testConfirmOpen = false;
|
|
||||||
this.testPromptOpen = false;
|
|
||||||
this.testConfirmResult = '';
|
|
||||||
this.testPromptResult = '';
|
|
||||||
}
|
|
||||||
|
|
||||||
doAlert() {
|
doAlert() {
|
||||||
let alert = Alert.create({
|
let alert = Alert.create({
|
||||||
@ -60,6 +59,14 @@ class E2EPage {
|
|||||||
this.nav.present(alert);
|
this.nav.present(alert);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
doAlertNoBody() {
|
||||||
|
let alert = Alert.create({
|
||||||
|
title: 'Alert',
|
||||||
|
buttons: ['OK']
|
||||||
|
});
|
||||||
|
this.nav.present(alert);
|
||||||
|
}
|
||||||
|
|
||||||
doMultipleButtons() {
|
doMultipleButtons() {
|
||||||
let alert = Alert.create({
|
let alert = Alert.create({
|
||||||
title: 'Alert',
|
title: 'Alert',
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
<button block class="e2eOpenAlert" (click)="doAlert()">Alert</button>
|
<button block class="e2eOpenAlert" (click)="doAlert()">Alert</button>
|
||||||
<button block class="e2eOpenAlertLongMessage" (click)="doAlertLongMessage()">Alert Long Message</button>
|
<button block class="e2eOpenAlertLongMessage" (click)="doAlertLongMessage()">Alert Long Message</button>
|
||||||
<button block class="e2eOpenMultipleButtons" (click)="doMultipleButtons()">Multiple Buttons (>2)</button>
|
<button block class="e2eOpenMultipleButtons" (click)="doMultipleButtons()">Multiple Buttons (>2)</button>
|
||||||
|
<button block class="e2eOpenAlertNoBody" (click)="doAlertNoBody()">Alert No Body</button>
|
||||||
<button block class="e2eOpenConfirm" (click)="doConfirm()">Confirm</button>
|
<button block class="e2eOpenConfirm" (click)="doConfirm()">Confirm</button>
|
||||||
<button block class="e2eOpenPrompt" (click)="doPrompt()">Prompt</button>
|
<button block class="e2eOpenPrompt" (click)="doPrompt()">Prompt</button>
|
||||||
<button block class="e2eOpenRadio" (click)="doRadio()">Radio</button>
|
<button block class="e2eOpenRadio" (click)="doRadio()">Radio</button>
|
||||||
|
Reference in New Issue
Block a user