Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
08f4237
Catch up to 12.6.31
phantomptr Nov 26, 2026
3449b83
Files: Refresh reads the drives' free space again (#944)
phantomptr Nov 26, 2026
f2ba2a9
Storage: say what the free-space numbers are, in GiB everywhere (#944)
phantomptr Nov 26, 2026
864e03e
Play Together: the engine's own signalling socket takes a bounded num…
phantomptr Nov 26, 2026
89af78c
Phone link: a yes to watching is not a yes to playing
phantomptr Nov 26, 2026
6161cb5
Play Together: picking a user with PS still held turns PS off too
phantomptr Nov 26, 2026
c76bd87
Play Together: an invite after a lapsed one gets its internet link again
phantomptr Nov 26, 2026
6defd2c
Play Together: an internet invite's room takes no hello without the i…
phantomptr Nov 26, 2026
43bc405
Downloads: a folder already renamed into place is not refused on a retry
phantomptr Nov 26, 2026
de1f1c3
Download to a saved server: a console name cannot leave the chosen fo…
phantomptr Nov 26, 2026
74772bd
Zip transfers on 32-bit Android: a resume past 4 GiB no longer hangs
phantomptr Nov 26, 2026
a9dbc76
Share: an offered item of a kind this app does not know is left out
phantomptr Nov 26, 2026
0817b26
Share: received files keep a dot at the start of their name
phantomptr Nov 26, 2026
44c0bbd
Mesh Drive: a console folder is read to its end before it is emptied out
phantomptr Nov 26, 2026
a292f6a
Devices: an upload starting up is not forgotten before it shows
phantomptr Nov 26, 2026
642eca1
Tar uploads: a sparse file made by macOS tar is refused, not sent wrong
phantomptr Nov 26, 2026
c230b1c
Upload shows a game folder's cover whatever the letter case of its name
phantomptr Nov 26, 2026
e032c9f
Opening the app during an update no longer says the update failed
phantomptr Nov 26, 2026
1b3282e
Arabic and Persian: "ShadowMount+" and other Latin names keep their o…
phantomptr Nov 26, 2026
22f300b
"Name on the PS5" says itself when a name is too long, and shows the …
phantomptr Nov 26, 2026
8666828
Upload & Install on a phone: one row of actions, nothing hidden under it
phantomptr Nov 26, 2026
4f8b29d
Files on a phone held sideways: one row at the top, not two
phantomptr Nov 26, 2026
fbeb535
Files ⋮ menu: each item says what it is about, in groups
phantomptr Nov 26, 2026
84f066b
Payloads: saved rows line up on a computer
phantomptr Nov 26, 2026
58bf500
Payloads on a phone: one compact row per saved payload
phantomptr Nov 26, 2026
12a9ee6
After an upload, "You can still do it from the Library" only where it…
phantomptr Nov 26, 2026
abe558b
Website screenshots show the version of the release they are for
phantomptr Nov 26, 2026
77eedf7
Rebuild the embedded Join and pad pages
phantomptr Nov 26, 2026
5839da1
Collection: a package shorter than its header says is not whole
phantomptr Nov 26, 2026
f46354b
Collection: Check reads every part of a split package
phantomptr Nov 26, 2026
ce2fa12
Organize: a failed last undo-log write no longer reads as "nothing mo…
phantomptr Nov 26, 2026
4be5f53
Organize: never file anything inside a folder that is itself a game
phantomptr Nov 26, 2026
bbad941
A blank version sorts below every real one
phantomptr Nov 26, 2026
f1bc63c
exFAT and UFS2 walks: a budget for directory bytes in all
phantomptr Nov 26, 2026
9a1511b
FTP: a folder that is not there is never made or listed as empty
phantomptr Nov 26, 2026
e1a856b
Save backups: never copy a save while its game may be writing it
phantomptr Nov 26, 2026
82c715a
Queue: a stopped job ends as stopped however its error is worded
phantomptr Nov 26, 2026
037ce4c
Package reader: read the boundary table after the shuffle table
phantomptr Nov 26, 2026
0a40ddc
Package rename: refused while an install of it has not finished
phantomptr Nov 26, 2026
d375227
Check: simpler naming of a split set's missing parts
phantomptr Nov 26, 2026
43e9368
API doc regenerated with the combined route changes
phantomptr Nov 26, 2026
0940456
Play Together: nobody with the link can take an internet room, and id…
phantomptr Nov 26, 2026
5843432
Play Together: a friend with the link can no longer cut the host off …
phantomptr Nov 26, 2026
39da921
Phone link: a phone taken out on the home network stays out under a n…
phantomptr Nov 26, 2026
aa06016
Play Together: a guest's pad found as it was keeps their PS button off
phantomptr Nov 26, 2026
ac3a8d3
Play Together: a guest let go cannot press buttons on the next guest'…
phantomptr Nov 26, 2026
fc1d873
Phone link: a phone's input has a rate, and the controller report a size
phantomptr Nov 26, 2026
9659583
Play Together: an internet guest's pings cannot grow what is waiting …
phantomptr Nov 26, 2026
c9a85f9
Play Together: Detailed logs name no guest's address or name
phantomptr Nov 26, 2026
f76e335
Share: a friend who connects again keeps getting the files when the o…
phantomptr Nov 26, 2026
b457887
Share: received controls and cheats are used only when they are in th…
phantomptr Nov 26, 2026
74c9fde
Saves: a zip that unpacks to far more than a save is refused, not unp…
phantomptr Nov 26, 2026
daadd9d
Share: a retail game is refused whatever item it is sent as
phantomptr Nov 26, 2026
378623b
Share: a list of many files reaches the friend over the internet
phantomptr Nov 26, 2026
ed36ef5
Saves: a zip whose list of files is far longer than a save's is refus…
phantomptr Nov 26, 2026
18c5244
Downloads: a folder holding both X and X.ava-part is refused into an …
phantomptr Nov 26, 2026
62abe15
Downloads: the clean-up after a failed download removes nothing outsi…
phantomptr Nov 26, 2026
6b3743c
Tar uploads: a crafted long name or PAX header no longer eats the com…
phantomptr Nov 26, 2026
3ffeceb
Pairing: a code the PS5 never answers no longer blocks that PS5 in th…
phantomptr Nov 26, 2026
4e5ca2c
Downloads: the case check asks the destination's own disk, not the on…
phantomptr Nov 26, 2026
7ff1815
Console delete and chmod: a long path on the error line keeps whole c…
phantomptr Nov 26, 2026
cc96184
Mesh Drive: three linked consoles no longer trash each other's files
phantomptr Nov 26, 2026
4e8adb8
Mesh Drive: a folder that fails over keeps its newer files
phantomptr Nov 26, 2026
7d5cbf9
Mesh Drive: a drive list the console cannot read is never taken as empty
phantomptr Nov 26, 2026
28daa47
Mesh: a shared document that is not valid JSON is refused, not stored
phantomptr Nov 26, 2026
08d4229
Devices: a long device name is cut to fit, not ignored
phantomptr Nov 26, 2026
192b290
Mesh Drive: a folder of a console that never answers can be left
phantomptr Nov 26, 2026
6896f3d
API doc: the phone kick route says the link's key is replaced
phantomptr Nov 26, 2026
d79cefb
AVA1: the audit fixes (a use-after-free on the PS5, job ids, resume a…
phantomptr Nov 26, 2026
290988b
12.6.32 release notes
phantomptr Nov 26, 2026
8bf35c2
Website screenshots retaken for 12.6.32
phantomptr Nov 26, 2026
9c197fc
Updater test: the install-script marker test runs on Unix only, where…
phantomptr Nov 26, 2026
c94ac25
Hub test: no room id derived from a secret in an assert message
phantomptr Nov 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
52 changes: 52 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,58 @@ What's new in ps5upload, written for humans.

## Unreleased

**Storage**
- **Files shows the right free space (#944).** Files kept its own copy of the drives, and Refresh didn't read it again, so a chip could show 98 GiB when the drive had 163 GiB. Every screen that shows drives now reads the same list: on Refresh, when a screen comes back, and when a job on that console ends.
- **The numbers say what they are.** Free space is in GiB everywhere, only space you can copy into is counted, and the Volumes and Hardware screens say that the PS5 holds space back for itself, so its own Storage screen can show less.

**Collection**
- **A package that is cut short or still being copied is no longer treated as whole.** Organize leaves it alone and Check says it is cut short.
- Check reads every part of a split package.
- Organize never files anything inside a folder that is itself a game.
- When the undo log can't be saved after a move, Organize says what moved and that Undo may be incomplete.

**Save Data**
- A save is never written while its game is running, and a console that can't say what is running is treated as busy, not idle.
- A restore is only accepted into the PS5's own save folders and the emulator save places the app supports.

**Upload & Install**
- **A package can't be renamed while an install of it is unfinished**, however long ago the PS5 last read it. The message says how to free it.
- "Name on the PS5" shows how many bytes are left before it sends.
- Covers show for game folders whose `SCE_SYS` folder is in capitals.
- A stopped job in the queue shows as stopped, not failed, and no longer holds the queue.

**Updates**
- **Opening the app while an update is installing no longer says the update failed.** It shows "Finishing the update…" and starts the new version.

**Play Together and phones**
- A link that was replaced or has lapsed no longer reaches the host's "wants to play" prompt, and an invite after a lapsed one gets its internet link again.
- A phone allowed to watch can't come back as a controller. A kicked phone can't get back in (the link's key changes; other phones carry on).
- A guest's PS button stays blocked through a lost connection, and a kicked guest's input can't reach the next guest.
- One guest can no longer cut the host off the internet hub, and idle guests can't hold seats.
- Phone input is paced so a flood can't swamp the host; normal play is untouched.

**Mesh Drive**
- With three or more consoles, links no longer undo each other's changes.
- A folder whose first entries were hidden files could be sent to the trash with files still in it; the whole folder is now read first.
- A newer file here is never overwritten by an older copy during failover; both are kept.
- A folder whose console is gone can be left.

**Sharing and transfers**
- Long file lists are no longer dropped, received settings are checked, and a retail game is refused whatever it is sent as.
- A finished folder download no longer fails on retry. "Download to a saved server" can't write outside the chosen folder.
- Transfers between devices: a use-after-free in the PS5 helper's receiver, a job being ended by another device, an upload that couldn't resume after a disk error, and memory a peer could make grow are fixed.

**Look and wording**
- On a phone, Upload & Install's buttons are one row, sideways Files shows more rows, payload rows are compact, and the Files menu's look-alike items are renamed and grouped.
- Arabic and Persian keep names like "ShadowMount+", paths and versions in their order.

**Fixes found in audits**
- FTP folder checks can't be fooled by servers that treat names as patterns.
- Crafted disk images and archives are refused instead of grinding or filling memory.
- Guest IPs and names are no longer written to the log.

## 12.6.31

**Upload & Install**
- **Change a fake package's name before installing it (#937).** Pick one package and edit "Name on the PS5". The name is changed inside the package, in place, without rebuilding it, and checked afterwards. Packages signed by Sony, split packages and packages on a server are refused.
- **Stream & install no longer sits at 0% in silence (#942).** Before it starts, the app checks that the PS5 can reach this computer. If it can't, or the PS5 never fetches any of the package, the install stops with the likely cause (most often this computer's firewall) and offers Retry via upload.
Expand Down
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1285,6 +1285,12 @@ test-payload: payload
$(PAYLOAD_DIR)/tests/json_escape_selftest.c
@$(RUN_LIMITED) $(SELFTEST_DIR)/ps5upload-json-escape-selftest
@echo "✓ a quote, a backslash or a control byte in a string cannot break a reply"
@echo "Running UTF-8 cut self-test (host build)..."
@cc -O2 -Wall -Wextra -Werror -I$(PAYLOAD_DIR)/include \
-o $(SELFTEST_DIR)/ps5upload-utf8-cut-selftest \
$(PAYLOAD_DIR)/tests/utf8_cut_selftest.c
@$(RUN_LIMITED) $(SELFTEST_DIR)/ps5upload-utf8-cut-selftest
@echo "✓ a path cut short on a status line keeps whole characters"
@echo "Running user delete gate self-test (host build)..."
@cc -O2 -Wall -Wextra -Werror -I$(PAYLOAD_DIR)/include \
-o $(SELFTEST_DIR)/ps5upload-user-guard-selftest \
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
12.6.30
12.6.31
170 changes: 170 additions & 0 deletions client/e2e/files-drives-refresh.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
import { expect, test, type Page, type Route } from "@playwright/test";

// The free space on Files' drive chips is the console's free space of now (#944): Refresh reads
// it again, a finished upload reads it again, and Files and Volumes show the same reading. Files
// used to keep the figure read when it opened, whatever happened after. The engine here is a fake.

const HOST = "192.168.0.5";
const GIB = 1024 ** 3;
const PC_DIR = "/home/me/games";
const PC_FILE = `${PC_DIR}/big.exfat`;
const TOTAL = 10_000_000_000;

/** What the fake console reports, changed by the tests as if space was used or freed. */
interface Fake {
freeBytes: number;
volumeReads: number;
jobFinished: boolean;
}

async function fakeEngine(page: Page, fake: Fake) {
await page.addInitScript((host) => {
window.localStorage.setItem("ps5upload.host", host);
}, HOST);
const json = (route: Route, body: unknown) =>
route.fulfill({ status: 200, contentType: "application/json", body: JSON.stringify(body) });
// Only the engine's routes: the dev server also serves the app's own /src/api/ modules.
await page.route(
(u) => u.pathname.startsWith("/api/"),
async (route) => {
const req = route.request();
const url = new URL(req.url());
const p = url.pathname;
if (p === "/api/version") return json(route, { caps: { rar: true }, version: "6.5.2" });
if (p === "/api/ps5/status")
return json(route, {
command_count: 1,
instance_id: 1,
max_transfer_streams: 8,
prior_instance: "clean",
ps5_kernel: "r229358/releases/13.60 Jul 17 2026 02:16:29",
started_at_unix: 1791360198,
ucred_elevated: true,
version: "6.5.2",
});
if (p === "/api/ps5/volumes") {
fake.volumeReads += 1;
return json(route, {
volumes: [
{
path: "/data",
mount_from: "/user/data",
fs_type: "nullfs",
total_bytes: 670 * GIB,
free_bytes: fake.freeBytes,
writable: true,
is_placeholder: false,
source_image: "",
safety_reserve_bytes: GIB,
allocatable_bytes: Math.max(0, fake.freeBytes - GIB),
},
],
});
}
if (p === "/api/ps5/list-dir")
return json(route, {
path: url.searchParams.get("path") ?? "/data",
entries: [{ name: "homebrew", kind: "dir", size: 0, mtime: 1791360199 }],
truncated: false,
total_scanned: 1,
returned: 1,
});
if (p === "/api/local/storage-roots") return json(route, [PC_DIR]);
if (p === "/api/local/list-dir")
return json(route, [{ name: "big.exfat", path: PC_FILE, is_dir: false, size: TOTAL }]);
if (p === "/api/local/path-kind") return json(route, { kind: "file" });
if (p === "/api/transfer/file" && req.method() === "POST") return json(route, { job_id: "job-1" });
if (p === "/api/jobs/job-1")
return json(
route,
fake.jobFinished
? { status: "done", bytes_sent: TOTAL, total_bytes: TOTAL, dest: "/data/big.exfat" }
: { status: "running", bytes_sent: 2_500_000_000, total_bytes: TOTAL },
);
if (p === "/api/jobs") return json(route, []);
// Anything else the screens poll: an empty answer is enough here.
return json(route, {});
},
);
}

/** The /data chip in Files' drive bar. */
const dataChip = (page: Page) => page.getByRole("main").locator("button.chip", { hasText: "/data" });

test("Refresh in Files reads the drives' free space again, and Volumes shows the same", async ({ page }) => {
// 98.1 GiB, then 163 GiB: the figures of the report.
const fake: Fake = { freeBytes: Math.round(98.1 * GIB), volumeReads: 0, jobFinished: false };
await fakeEngine(page, fake);

await page.goto("/files?path=/data", { waitUntil: "domcontentloaded" });
const main = page.getByRole("main");
await expect(dataChip(page)).toContainText("98.1 GiB", { timeout: 30_000 });
await expect(dataChip(page)).toHaveAttribute("title", "/data · 98.1 GiB free");

// Space was freed on the console. Nothing on screen has asked again yet.
fake.freeBytes = 175_467_069_440;
await main.getByRole("button", { name: "Refresh", exact: true }).click();
await expect(dataChip(page)).toContainText("163 GiB");
await expect(dataChip(page)).toHaveAttribute("title", "/data · 163 GiB free");

// Volumes shows that reading, and its own Refresh a newer one.
const primary = page.getByRole("navigation", { name: "Primary" });
await primary.getByRole("link", { name: "Volumes", exact: true }).click();
await expect(page.getByRole("heading", { name: "Volumes" })).toBeVisible();
await expect(main.getByText("163 GiB free of 670 GiB")).toBeVisible();
fake.freeBytes = 150 * GIB;
await main.getByRole("button", { name: "Refresh", exact: true }).click();
await expect(main.getByText("150 GiB free of 670 GiB")).toBeVisible();

// Back on Files: what Volumes just read, not what Files last showed.
await primary.getByRole("link", { name: "Files", exact: true }).click();
await expect(dataChip(page)).toContainText("150 GiB");
await expect(dataChip(page)).not.toContainText("163");

// And a screen that comes back into view asks again by itself.
await primary.getByRole("link", { name: "Volumes", exact: true }).click();
await expect(main.getByText("150 GiB free of 670 GiB")).toBeVisible();
fake.freeBytes = 140 * GIB;
await primary.getByRole("link", { name: "Files", exact: true }).click();
await expect(dataChip(page)).toContainText("140 GiB");
});

test("an upload that finishes updates the free space on the drive chip", async ({ page }) => {
const fake: Fake = { freeBytes: 163 * GIB, volumeReads: 0, jobFinished: false };
await fakeEngine(page, fake);

await page.goto("/files?path=/data", { waitUntil: "domcontentloaded" });
const main = page.getByRole("main");
await expect(dataChip(page)).toContainText("163 GiB", { timeout: 30_000 });

await main.getByRole("button", { name: "Add files" }).click();
// The browser build picks from the engine's machine: choose the file there.
await page.getByText("big.exfat").first().click();
await page.getByRole("button", { name: "Add 1" }).click();
const progress = page.getByTestId("fs-upload-progress");
await expect(progress).toBeVisible({ timeout: 15_000 });

// The copy lands and the drive has less room. No Refresh is pressed.
fake.freeBytes = 153 * GIB;
fake.jobFinished = true;
await expect(dataChip(page)).toContainText("153 GiB", { timeout: 20_000 });
});

test("opening folders does not read the drives each time", async ({ page }) => {
const fake: Fake = { freeBytes: 163 * GIB, volumeReads: 0, jobFinished: false };
await fakeEngine(page, fake);

await page.goto("/files?path=/data", { waitUntil: "domcontentloaded" });
await expect(dataChip(page)).toContainText("163 GiB", { timeout: 30_000 });
const before = fake.volumeReads;
const homebrew = page.locator('[data-fs-name="homebrew"]');
for (let i = 0; i < 3; i++) {
await homebrew.locator("button[data-fs-open]").click();
await expect(page.getByRole("button", { name: "homebrew", exact: true }).first()).toBeVisible();
await page.locator("body").click({ position: { x: 1, y: 1 } });
await page.keyboard.press("Backspace");
await expect(homebrew).toHaveAttribute("data-fs-revealed", "", { timeout: 10_000 });
}
// A reading of a moment ago is kept while browsing.
expect(fake.volumeReads).toBe(before);
});
84 changes: 77 additions & 7 deletions client/e2e/files-phone-header.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,15 +151,28 @@ for (const phone of PHONES) {
// No boxes until selecting.
await expect(row(page, "file-01.pkg").getByRole("checkbox")).toBeHidden();
// One bar at the top: no Back and Forward arrows (the phone's Back goes back), and one
// bell. Where the app's own top bar would show (below 768 px) the bell is in this header
// and that bar is gone; wider, it stays in the row beside the sidebar.
// bell, in this header. Below 768 px the app's own top bar gives way; held sideways, the
// row beside the sidebar does (its search, reload and theme buttons go too): with both
// rows there, about two files were left in view.
await expect(page.getByRole("navigation", { name: "View history" }).locator("visible=true")).toHaveCount(0);
const bell = page.getByRole("button", { name: "Open notifications" }).locator("visible=true");
await expect(bell).toHaveCount(1);
if (phone.viewport.width < 768) {
{
await expect(header.getByRole("button", { name: "Open notifications" })).toBeVisible();
await expect(page.locator("[data-top-bar]").getByText("PS5Upload")).toBeHidden();
expect((await header.boundingBox())!.y).toBeLessThan(24);
await expect(page.getByRole("button", { name: "Reload page" }).locator("visible=true")).toHaveCount(0);
await expect(page.getByRole("button", { name: "Search screens and commands" }).locator("visible=true")).toHaveCount(0);
// At the top (held sideways, under the page's own top margin only: it was under a row
// of buttons, at about 88 px).
expect((await header.boundingBox())!.y).toBeLessThan(phone.viewport.width < 768 ? 24 : 40);
// Rows of files in view under the header (two, before).
const shown = await main(page)
.locator("li[data-fs-name]")
.evaluateAll((rows) => rows.filter((r) => {
const b = r.getBoundingClientRect();
return b.top >= 0 && b.bottom <= window.innerHeight;
}).length);
expect(shown).toBeGreaterThanOrEqual(3);
// Its panel hangs under the header, inside the window.
await bell.tap();
const panel = page.getByTestId("notifications-panel").locator("visible=true");
Expand All @@ -173,8 +186,6 @@ for (const phone of PHONES) {
await shot(page, `bell-${phone.viewport.width}x${phone.viewport.height}`);
expect(await back(page)).toBe(true);
await expect(panel).toHaveCount(0);
} else {
await expect(header.getByRole("button", { name: "Open notifications" })).toHaveCount(0);
}
await shot(page, `header-${phone.viewport.width}x${phone.viewport.height}`);

Expand Down Expand Up @@ -306,7 +317,7 @@ for (const phone of PHONES) {
await openFiles(page);
const header = main(page).getByTestId("fs-header");
await header.getByRole("button", { name: "More" }).tap();
for (const name of ["Add files", "Add folder", "New folder", "Refresh", "Select", "Snapshots"])
for (const name of ["Add files", "Add folder", "New folder", "Refresh", "Select", "See snapshots"])
await expect(menu(page).getByRole("menuitem", { name, exact: true })).toBeVisible();
await shot(page, `more-menu-${phone.viewport.width}x${phone.viewport.height}`);
// Select: selection mode with nothing ticked yet, for a keyboard or a D-pad.
Expand All @@ -332,6 +343,64 @@ for (const phone of PHONES) {
});
}

// The ⋮ menu's pairs read as twins before: "What takes space here?" beside "What takes space?",
// "Snapshot this folder" beside "Snapshots". Now each says what it is about (this folder, this
// drive) and what it does (make a snapshot, see them), in groups with a line between them. In a
// wide font (Linux CI's), every item is one line and the menu is whole on screen.
for (const viewport of [
{ width: 360, height: 800 },
{ width: 844, height: 390 },
]) {
test.describe(`the ⋮ menu's groups, ${viewport.width}x${viewport.height}`, () => {
test.use({ viewport, hasTouch: true, isMobile: true });

test("each folder and drive item says which it is, in groups", async ({ page }) => {
await openFiles(page);
await page.addStyleTag({ content: "*{font-family:Verdana,'DejaVu Sans',sans-serif!important}" });
await main(page).getByTestId("fs-header").getByRole("button", { name: "More" }).tap();
const items = menu(page).getByRole("menuitem");
const labels = (await items.allTextContents()).map((t) => t.trim());
expect(labels).toEqual([
"Add files",
"Add folder",
"New folder",
"Refresh",
"Select",
"What takes space in this folder?",
"Make a snapshot of this folder",
"Download from a link",
"What takes space on this drive?",
"See snapshots",
"Search all drives",
"Search this folder",
]);
// Groups: the page's actions, this folder, a link, the drive.
const separators = menu(page).getByRole("separator");
await expect(separators).toHaveCount(3);
const order = await menu(page).evaluate((m) =>
Array.from(m.querySelectorAll('[role="menuitem"], [role="separator"]')).map((e) =>
e.getAttribute("role") === "separator" ? "|" : (e.textContent ?? "").trim(),
),
);
expect(order.indexOf("|")).toBe(order.indexOf("What takes space in this folder?") - 1);
expect(order.lastIndexOf("|")).toBe(order.indexOf("What takes space on this drive?") - 1);
// One line each (as tall as "Refresh", which is one line), and the menu whole on screen.
const line = (await items.filter({ hasText: /^Refresh$/ }).boundingBox())!.height;
for (const item of await items.all()) {
const h = (await item.boundingBox())!.height;
expect(h, await item.textContent()).toBeLessThanOrEqual(line + 1);
}
const box = (await menu(page).boundingBox())!;
expect(box.x).toBeGreaterThanOrEqual(0);
expect(box.x + box.width).toBeLessThanOrEqual(viewport.width + 0.5);
await shot(page, `more-menu-groups-${viewport.width}x${viewport.height}`);
// Each opens what it says.
await menu(page).getByRole("menuitem", { name: "See snapshots", exact: true }).click();
await expect(page).toHaveURL(/view=snapshots/);
});
});
}

test.describe("phone browser (the web UI)", () => {
test.use({
viewport: { width: 360, height: 800 },
Expand Down Expand Up @@ -377,6 +446,7 @@ test.describe("desktop width", () => {
await expect(arrows.getByRole("button", { name: "Forward" })).toBeVisible();
await expect(page.getByRole("button", { name: "Open notifications" }).locator("visible=true")).toHaveCount(1);
await expect(main(page).getByTestId("fs-header").getByRole("button", { name: "Open notifications" })).toHaveCount(0);
await expect(page.getByRole("button", { name: "Reload page" })).toBeVisible();
await shot(page, "desktop-1280x800");
});
});
Expand Down
Loading
Loading