Skip to content

Commit b58c5de

Browse files
authored
Merge pull request #323 from debrief/UI-refactoring-2
UI refactoring 2
2 parents 295719d + ee123d9 commit b58c5de

2 files changed

Lines changed: 11 additions & 11 deletions

File tree

tests/control-panel/time-filter-step-forward.spec.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,19 +42,19 @@ test('Open Sample Plot, apply time filter, and step forward in time', async ({ p
4242

4343
// Get the initial time text before any actions
4444
const timeTextBeforeFilter = await page.locator('.time-period-panel p').textContent()
45-
console.log('Time period before filter:', timeTextBeforeFilter)
45+
4646

4747
// check time step buttons are disabled
4848
await expect(page.locator('.step-forward')).toBeDisabled()
4949
await expect(page.locator('.step-backward')).toBeDisabled()
5050

5151
// Get the time text after clicking step forward (should be unchanged)
5252
const timeTextAfterClick = await page.locator('.time-period-panel p').textContent()
53-
console.log('Time period after clicking step forward (before filter):', timeTextAfterClick)
53+
5454

5555
// Verify that the time text has NOT changed (because filter is not applied)
5656
expect(timeTextAfterClick).toEqual(timeTextBeforeFilter)
57-
console.log('Verified: Time period did not change when filter is not applied')
57+
5858

5959
// Find and click the time filter button in the control panel
6060
// Based on the application code, it's a button with FilterOutlined/FilterFilled icon
@@ -88,7 +88,7 @@ test('Open Sample Plot, apply time filter, and step forward in time', async ({ p
8888

8989
// Get the text content of the TimePeriod before stepping forward
9090
const initialTimeText = await page.locator('.time-period-panel p').textContent()
91-
console.log('Initial time period:', initialTimeText)
91+
9292

9393
// Click the step forward button again
9494
await stepForwardButton.click()
@@ -98,11 +98,11 @@ test('Open Sample Plot, apply time filter, and step forward in time', async ({ p
9898

9999
// Get the updated text content
100100
const updatedTimeText = await page.locator('.time-period-panel p').textContent()
101-
console.log('Updated time period:', updatedTimeText)
101+
102102

103103
// Verify that the time text has changed
104104
expect(updatedTimeText).not.toEqual(initialTimeText)
105-
console.log('Time period changed successfully from', initialTimeText, 'to', updatedTimeText)
105+
106106

107107
// check the time start and end times have moved forwards
108108
expect(await timeStart.textContent()).toEqual('Nov 141800Z')
@@ -117,11 +117,11 @@ test('Open Sample Plot, apply time filter, and step forward in time', async ({ p
117117

118118
// Get the updated text content
119119
const updatedTimeText2 = await page.locator('.time-period-panel p').textContent()
120-
console.log('Updated time period:', updatedTimeText2)
120+
121121

122122
// Verify that the time text has changed
123123
expect(updatedTimeText2).not.toEqual(initialTimeText)
124-
console.log('Time period changed successfully from', initialTimeText, 'to', updatedTimeText2)
124+
125125

126126
// check the time start and end times have moved to end
127127
expect(await timeStart.textContent()).toEqual('Nov 151000Z')

tests/control-panel/time-step-interval.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ test('Test time step interval selection in control panel', async ({ page }) => {
6363
// The difference should be 15 minutes (our selected interval)
6464
// We can verify this by checking the format (MMM ddHHmm'Z')
6565
// Format example: 'Nov 141600Z'
66-
console.log('Time values:', trimmedStart, updatedStart)
66+
6767

6868
// Extract hours and minutes from the time strings
6969
// The format is 'MMM ddHHmmZ' where HH is at position 6-8 and mm is at position 8-10
@@ -72,15 +72,15 @@ test('Test time step interval selection in control panel', async ({ page }) => {
7272
const updatedHour = parseInt(updatedStart?.substring(6, 8) || '0')
7373
const updatedMinute = parseInt(updatedStart?.substring(8, 10) || '0')
7474

75-
console.log('Parsed time components:', initialHour, initialMinute, updatedHour, updatedMinute)
75+
7676

7777
// Calculate the time in minutes for comparison
7878
const initialTimeInMinutes = initialHour * 60 + initialMinute
7979
const updatedTimeInMinutes = updatedHour * 60 + updatedMinute
8080

8181
// Check if the difference is approximately 15 minutes (allowing for rounding)
8282
const timeDiff = Math.abs(updatedTimeInMinutes - initialTimeInMinutes)
83-
console.log('Time difference in minutes:', timeDiff)
83+
8484

8585
// We selected 15 minutes as the step, so expect a difference of about 15 minutes
8686
expect(timeDiff).toEqual(15)

0 commit comments

Comments
 (0)