Skip to content

Commit f74ad63

Browse files
test(progress-bar): remove range from basic screenshot tests (#28035)
Issue number: N/A --------- <!-- 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. --> The progress bar basic test makes use of the `ion-range` component in the captured screenshot. This results in tight coupling when the appearance of the range changes. ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> - Decouples `ion-range` from the progress bar basic screenshot captures - Splits out dynamic behavior that was used with `ion-range` to test files that can be manually interacted with ## Does this introduce a breaking change? - [ ] Yes - [x] No <!-- If this introduces a breaking change, please describe the impact and migration path for existing applications below. --> ## 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 <[email protected]>
1 parent a079d20 commit f74ad63

23 files changed

+223
-43
lines changed

core/src/components/progress-bar/test/basic/index.html

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -79,18 +79,6 @@
7979
</ion-list-header>
8080
<ion-progress-bar class="custom-bar-background" value="0.75"></ion-progress-bar>
8181

82-
<ion-list-header>
83-
<ion-label> Determinate (change progress with slider) </ion-label>
84-
</ion-list-header>
85-
<ion-progress-bar id="progressBar"></ion-progress-bar>
86-
87-
<ion-item>
88-
<ion-range legacy="true" pin="true" value="0" id="progressValue">
89-
<ion-label slot="start">0</ion-label>
90-
<ion-label slot="end">100</ion-label>
91-
</ion-range>
92-
</ion-item>
93-
9482
<ion-list-header>
9583
<ion-label> Buffer </ion-label>
9684
</ion-list-header>
@@ -105,39 +93,8 @@
10593
<ion-label> Buffer (without value) </ion-label>
10694
</ion-list-header>
10795
<ion-progress-bar color="tertiary" buffer="0"></ion-progress-bar>
108-
109-
<ion-list-header>
110-
<ion-label> Buffer (change buffer with slider) </ion-label>
111-
</ion-list-header>
112-
<ion-progress-bar class="progressBarBuffer" value="0.20" buffer="0.4"></ion-progress-bar>
113-
<ion-progress-bar class="progressBarBuffer" value="0.20" buffer="0.4" reversed="true"></ion-progress-bar>
114-
115-
<ion-item>
116-
<ion-range legacy="true" pin="true" value="0" id="progressValueBuffer">
117-
<ion-label slot="start">0</ion-label>
118-
<ion-label slot="end">100</ion-label>
119-
</ion-range>
120-
</ion-item>
12196
</ion-list>
12297
</ion-content>
12398
</ion-app>
124-
125-
<script>
126-
// Progress Bar Value
127-
const progressValue = document.getElementById('progressValue');
128-
const progressBar = document.getElementById('progressBar');
129-
130-
progressValue.addEventListener('ionChange', function (ev) {
131-
progressBar.value = ev.detail.value / 100;
132-
});
133-
134-
// Progress Bar Buffer
135-
const progressValueBuffer = document.getElementById('progressValueBuffer');
136-
const progressBarBuffer = document.querySelectorAll('.progressBarBuffer');
137-
138-
progressValueBuffer.addEventListener('ionChange', function (ev) {
139-
progressBarBuffer.forEach((ele) => (ele.buffer = ev.detail.value / 100));
140-
});
141-
</script>
14299
</body>
143100
</html>
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading

0 commit comments

Comments
 (0)