-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* fix youtube tests flakiness * add function for moving earth scale indicator * regression test for #647 * default baseDiffTime should be UTC * helper function to identify ISO8601 date strings, also do not do conversions if they are already in ISO8601 * fix newly added layers to UTC and use correct ISO8601 date strings * regression tests for issue_649 * new function for layers, to get base difference date as a Date object * add regression tests for issue_650 * add clearStorage get var to be able to clean local storage for development * fix image name path * snapshots for issue 647 * prettier and tscheck things
- Loading branch information
Showing
15 changed files
with
198 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import { test, expect } from "@playwright/test"; | ||
import { Helioviewer } from "../../../page_objects/helioviewer"; | ||
import * as fs from "fs"; | ||
|
||
/** | ||
* This test is a regression test for proving issue 647 is fixed for the given helioviewer | ||
* @see https://github.com/Helioviewer-Project/helioviewer.org/issues/647 | ||
*/ | ||
test("Issue 647, Movie making, 'Earth Scale Indicator' is off location if the requested movie needs tobe in resolution other than 'Original' ", async ({ | ||
page, | ||
browser | ||
}, info) => { | ||
const hv = new Helioviewer(page, info); | ||
|
||
// 1. LOAD HV | ||
await hv.Load(); | ||
await hv.CloseAllNotifications(); | ||
await hv.OpenSidebar(); | ||
|
||
// 2. USE NEWEST SOHO | ||
const layer = await hv.getImageLayer(0); | ||
await layer.set("Observatory:", "SOHO"); | ||
await hv.UseNewestImage(); | ||
await hv.WaitForLoadingComplete(); | ||
await hv.CloseAllNotifications(); | ||
await hv.CloseSidebar(); | ||
|
||
// 3. MOVE EARTH SCALE INDICATOR TO SOMEWHERE | ||
await hv.moveEarthScaleIndicator(200, 200); | ||
|
||
// 4. OPEN MOVIE DRAWER | ||
await hv.movie.toggleMovieDrawer(); | ||
|
||
// 5. SET IMAGE TO RESOLUTION | ||
await hv.movie.selectFullScreenMovie(); | ||
|
||
// 6. GET ADVANCED MOVIE CONTROLS | ||
await hv.movie.getAdvancedControls(); | ||
|
||
// 7. SELECT SIZE OTHER THAN ORIGINAL | ||
await page.getByLabel("Size").selectOption({ label: "1440p (2560 x 1440, Quad HD)" }); | ||
|
||
// 8. START MAKING | ||
await page.getByLabel("Submit").click(); | ||
|
||
// 9. WAIT FOR MOVIE TO END | ||
await expect(page.getByText("Your LASCO C2 movie is ready! Click here to watch or download it.")).toBeVisible({ | ||
timeout: 100000 | ||
}); | ||
|
||
// 10. CLICK MOVIE TO OPEN WATCH DIALOG | ||
await page.getByText("Your LASCO C2 movie is ready! Click here to watch or download it.").click(); | ||
|
||
// 11. SCREENSHOT SHOULD MATCH | ||
await expect(page.locator(".movie-player-dialog")).toHaveScreenshot("movie_player_screenshot.png"); | ||
}); |
Binary file added
BIN
+165 KB
...gression/issue_647.spec.ts-snapshots/movie-player-screenshot-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+165 KB
...l/regression/issue_647.spec.ts-snapshots/movie-player-screenshot-edge-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+245 KB
...egression/issue_647.spec.ts-snapshots/movie-player-screenshot-firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+174 KB
...regression/issue_647.spec.ts-snapshots/movie-player-screenshot-webkit-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { test } from "@playwright/test"; | ||
import { Helioviewer } from "../../../page_objects/helioviewer"; | ||
|
||
/** | ||
* This test is a regression test for proving issue 649 is fixed for the given helioviewer | ||
* @see https://github.com/Helioviewer-Project/helioviewer.org/issues/649 | ||
*/ | ||
test("Issue 649, New Layer for fresh state break url sharing ", async ({ page, browser }, info) => { | ||
let hv = new Helioviewer(page, info); | ||
|
||
// load helioviewer | ||
// Action 1 : BROWSE TO HELIOVIEWER | ||
await hv.Load(); | ||
await hv.WaitForLoadingComplete(); | ||
await hv.CloseAllNotifications(); | ||
|
||
// Action 2 : Open left sources panel | ||
await hv.ClickDataSourcesTab(); | ||
|
||
// Action 3: Add new layer | ||
await hv.AddImageLayer(); | ||
await hv.WaitForLoadingComplete(); | ||
await hv.CloseAllNotifications(); | ||
|
||
// Action 4: Check if we can do share url | ||
await hv.urlshare.triggerShareURL(); | ||
await hv.urlshare.sharedURLIsVisibleAndDone(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { test, expect } from "@playwright/test"; | ||
import { Helioviewer } from "../../../page_objects/helioviewer"; | ||
|
||
/** | ||
* This test is a regression test for proving issue 650 is fixed for the given helioviewer | ||
* @see https://github.com/Helioviewer-Project/helioviewer.org/issues/650 | ||
*/ | ||
test("Issue 650, Default base difference should be one hour earlier of observation date", async ({ | ||
page, | ||
browser | ||
}, info) => { | ||
let hv = new Helioviewer(page, info); | ||
|
||
// load helioviewer | ||
// Action 1 : BROWSE TO HELIOVIEWER | ||
await hv.Load(); | ||
await hv.WaitForLoadingComplete(); | ||
await hv.CloseAllNotifications(); | ||
|
||
// Action 2 : Open left sources panel | ||
await hv.OpenSidebar(); | ||
|
||
// Action 3: Add new layer | ||
let layer = await hv.getImageLayer(0); | ||
await layer.set("Difference", "Base difference"); | ||
|
||
// Action 4: Get the default base difference date from layer 0 | ||
let baseDifferenceDateForLayer = await layer.getBaseDifferenceDateObject(); | ||
|
||
// Action 5: Get the observation date | ||
let observationDate = await hv.GetLoadedDate(); | ||
|
||
// Action 6: Get one hour earlier of observation date | ||
let oneHourEarlierOfObservationDate: number = observationDate.getTime() - 1000 * 60 * 60; | ||
|
||
// Action 7: Layer's base difference date should be one our earlier of observation date | ||
await expect(baseDifferenceDateForLayer.getTime()).toBe(oneHourEarlierOfObservationDate); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters