mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-08 15:51:16 +08:00
test: migrate form control usages to modern syntax (#28897)
Issue number: Internal --------- <!-- Please do not submit updates to dependencies unless it fixes an issue. --> <!-- Please try to limit your pull request to one type (bugfix, feature, etc). Submit multiple pull requests if needed. --> ## What is the current behavior? <!-- Please describe the current behavior that you are modifying. --> Several tests were still using the legacy form syntax. ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> - Migrated tests in `core`, `angular`, and `vue` to use the modern form syntax (`react` did not have form controls). I opted not to migrate `item/test/highlight` and `item/test/counter` because those tests are going to be removed in the future once the deprecate item APIs are removed. ## Does this introduce a breaking change? - [ ] Yes - [x] No <!-- If this introduces a breaking change: 1. Describe the impact and migration path for existing applications below. 2. Update the BREAKING.md file with the breaking change. 3. Add "BREAKING CHANGE: [...]" to the commit description when merging. See https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#footer for more information. --> ## Other information <!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. --> --------- Co-authored-by: ionitron <hi@ionicframework.com> Co-authored-by: Maria Hutt <thetaPC@users.noreply.github.com>
This commit is contained in:
@ -10,7 +10,7 @@
|
||||
</ion-header>
|
||||
<ion-content class="ion-padding">
|
||||
<ion-label id="title">{{ title }}</ion-label>
|
||||
<ion-input></ion-input>
|
||||
<ion-input :aria-label="title"></ion-input>
|
||||
</ion-content>
|
||||
</ion-page>
|
||||
</template>
|
||||
|
||||
@ -30,28 +30,23 @@
|
||||
</ion-header>
|
||||
|
||||
<ion-item>
|
||||
<ion-label>Checkbox</ion-label>
|
||||
<ion-checkbox slot="start" v-model="checkbox"></ion-checkbox>
|
||||
<ion-checkbox v-model="checkbox">Checkbox</ion-checkbox>
|
||||
</ion-item>
|
||||
|
||||
<ion-item>
|
||||
<ion-label>Toggle</ion-label>
|
||||
<ion-toggle slot="end" v-model="toggle"></ion-toggle>
|
||||
<ion-toggle v-model="toggle">Toggle</ion-toggle>
|
||||
</ion-item>
|
||||
|
||||
<ion-item>
|
||||
<ion-label>Input</ion-label>
|
||||
<ion-input slot="end" v-model="input"></ion-input>
|
||||
<ion-input v-model="input" label="Input"></ion-input>
|
||||
</ion-item>
|
||||
|
||||
<ion-item>
|
||||
<ion-label>Range</ion-label>
|
||||
<ion-range :dual-knobs="true" :min="0" :max="100" slot="end" v-model="range"></ion-range>
|
||||
<ion-range label="Range" :dual-knobs="true" :min="0" :max="100" slot="end" v-model="range"></ion-range>
|
||||
</ion-item>
|
||||
|
||||
<ion-item>
|
||||
<ion-label>Textarea</ion-label>
|
||||
<ion-textarea slot="end" v-model="textarea"></ion-textarea>
|
||||
<ion-textarea label="Textarea" v-model="textarea"></ion-textarea>
|
||||
</ion-item>
|
||||
|
||||
<ion-item>
|
||||
@ -61,22 +56,18 @@
|
||||
|
||||
<ion-radio-group v-model="radio">
|
||||
<ion-item>
|
||||
<ion-label>Red</ion-label>
|
||||
<ion-radio value="red"></ion-radio>
|
||||
<ion-radio value="red">Red</ion-radio>
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
<ion-label>Green</ion-label>
|
||||
<ion-radio value="green"></ion-radio>
|
||||
<ion-radio value="green">Green</ion-radio>
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
<ion-label>Blue</ion-label>
|
||||
<ion-radio value="blue"></ion-radio>
|
||||
<ion-radio value="blue">Blue</ion-radio>
|
||||
</ion-item>
|
||||
</ion-radio-group>
|
||||
|
||||
<ion-item>
|
||||
<ion-label>Select</ion-label>
|
||||
<ion-select v-model="select">
|
||||
<ion-select v-model="select" label="Select">
|
||||
<ion-select-option value="apples">Apples</ion-select-option>
|
||||
<ion-select-option value="bananas">Bananas</ion-select-option>
|
||||
</ion-select>
|
||||
|
||||
@ -18,28 +18,22 @@
|
||||
</ion-list-header>
|
||||
|
||||
<ion-item>
|
||||
<ion-label>Alert</ion-label>
|
||||
<ion-radio value="alert" id="ion-alert"></ion-radio>
|
||||
<ion-radio value="alert" id="ion-alert">Alert</ion-radio>
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
<ion-label>Action Sheet</ion-label>
|
||||
<ion-radio value="action-sheet" id="ion-action-sheet"></ion-radio>
|
||||
<ion-radio value="action-sheet" id="ion-action-sheet">Action Sheet</ion-radio>
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
<ion-label>Loading</ion-label>
|
||||
<ion-radio value="loading" id="ion-loading"></ion-radio>
|
||||
<ion-radio value="loading" id="ion-loading">Loading</ion-radio>
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
<ion-label>Modal</ion-label>
|
||||
<ion-radio value="modal" id="ion-modal"></ion-radio>
|
||||
<ion-radio value="modal" id="ion-modal">Modal</ion-radio>
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
<ion-label>Popover</ion-label>
|
||||
<ion-radio value="popover" id="ion-popover"></ion-radio>
|
||||
<ion-radio value="popover" id="ion-popover">Popover</ion-radio>
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
<ion-label>Toast</ion-label>
|
||||
<ion-radio value="toast" id="ion-toast"></ion-radio>
|
||||
<ion-radio value="toast" id="ion-toast">Toast</ion-radio>
|
||||
</ion-item>
|
||||
</ion-radio-group>
|
||||
|
||||
@ -51,12 +45,10 @@
|
||||
</ion-list-header>
|
||||
|
||||
<ion-item>
|
||||
<ion-label>Controller</ion-label>
|
||||
<ion-radio value="controller" id="controller"></ion-radio>
|
||||
<ion-radio value="controller" id="controller">Controller</ion-radio>
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
<ion-label>Component</ion-label>
|
||||
<ion-radio value="component" id="component"></ion-radio>
|
||||
<ion-radio value="component" id="component">Component</ion-radio>
|
||||
</ion-item>
|
||||
</ion-radio-group>
|
||||
|
||||
|
||||
@ -7,8 +7,8 @@
|
||||
</ion-header>
|
||||
<ion-content>
|
||||
<ion-item>
|
||||
<ion-label>Select Popover</ion-label>
|
||||
<ion-select
|
||||
label="Select Popover"
|
||||
id="select-popover"
|
||||
interface="popover"
|
||||
placeholder="Select fruit"
|
||||
@ -30,7 +30,6 @@ import {
|
||||
IonTitle,
|
||||
IonContent,
|
||||
IonItem,
|
||||
IonLabel,
|
||||
IonSelect,
|
||||
IonSelectOption,
|
||||
} from "@ionic/vue";
|
||||
@ -44,7 +43,6 @@ export default defineComponent({
|
||||
IonTitle,
|
||||
IonContent,
|
||||
IonItem,
|
||||
IonLabel,
|
||||
IonSelect,
|
||||
IonSelectOption,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user