Skip to content

Commit

Permalink
focus on last failed test
Browse files Browse the repository at this point in the history
  • Loading branch information
mudhoney committed Jan 21, 2025
1 parent 863e020 commit 4eaa9f8
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 32 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ jobs:
playwright-e2e-tests:
strategy:
matrix:
shardIndex: [1, 2, 3, 4, 5]
shardTotal: [5]
shardIndex: [1]
shardTotal: [1]
# If one of the shards fails, continue running the remaining tests
fail-fast: false

Expand Down Expand Up @@ -114,7 +114,7 @@ jobs:
- name: Run Playwright tests
run: |
cd helioviewer.org
npx playwright test --shard=${{matrix.shardIndex}}/${{matrix.shardTotal}}
npx playwright test --shard=${{matrix.shardIndex}}/${{matrix.shardTotal}} tests/desktop/normal/urlsharing.spec.ts
- uses: actions/upload-artifact@v4
if: always()
with:
Expand Down
56 changes: 27 additions & 29 deletions tests/desktop/normal/urlsharing.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,37 +3,37 @@ import { Helioviewer } from "../../page_objects/helioviewer";
import * as fs from "fs";

// loading of wrong url , is creating problems
test("Non-Existing Shared URLs Should Be Reported To User", async ({ page, context }, info) => {
let hv = new Helioviewer(page);

const response = await hv.Load("/load/DONOTEXIST");
await hv.CloseAllNotifications();
await expect(page).toHaveScreenshot();
});
// test("Non-Existing Shared URLs Should Be Reported To User", async ({ page, context }, info) => {
// let hv = new Helioviewer(page);
//
// const response = await hv.Load("/load/DONOTEXIST");
// await hv.CloseAllNotifications();
// await expect(page).toHaveScreenshot();
// });

/**
* This test plays through creating a short url and makes a test for short url should exactly resolved what is shared
*/
test("Shared URLs redirection should be done correctly", async ({ page }, info) => {
let hv = new Helioviewer(page);

await hv.Load();
await hv.CloseAllNotifications();

await page.locator("#share-button").click();

await page.waitForTimeout(1000);

await expect(page.locator("#hv-drawer-share")).toBeVisible();

const shortURL = await page.locator("#helioviewer-share-url").inputValue();
await hv.Load(shortURL);

const loadURL = shortURL.split("/load/")[0];
const loadID = shortURL.split("/load/")[1];

await expect(`${loadURL}/?loadState=${loadID}`).toBe(page.url());
});
// test("Shared URLs redirection should be done correctly", async ({ page }, info) => {
// let hv = new Helioviewer(page);
//
// await hv.Load();
// await hv.CloseAllNotifications();
//
// await page.locator("#share-button").click();
//
// await page.waitForTimeout(1000);
//
// await expect(page.locator("#hv-drawer-share")).toBeVisible();
//
// const shortURL = await page.locator("#helioviewer-share-url").inputValue();
// await hv.Load(shortURL);
//
// const loadURL = shortURL.split("/load/")[0];
// const loadID = shortURL.split("/load/")[1];
//
// await expect(`${loadURL}/?loadState=${loadID}`).toBe(page.url());
// });

/**
* This test plays through creating a short url and makes a test for short url should exactly resolved what is shared
Expand All @@ -43,8 +43,6 @@ test("Shared URLs should produce pages, exactly like they shared", async ({ page
browserName === "webkit",
"We couldn't be able to trigger download event for webkit, skipping this test now"
);

test.fixme(browserName === "firefox", "Need to be fixed later base64 screenshots are problem for this one.");
let hv = new Helioviewer(page);

await hv.Load();
Expand Down

0 comments on commit 4eaa9f8

Please sign in to comment.