removed fp6 from shop
All checks were successful
Deploy / build-deploy (push) Successful in 5m35s

This commit is contained in:
Jorijn van der Graaf 2026-09-05 18:38:39 +02:00
commit 25805a093a
20 changed files with 788 additions and 805 deletions

View file

@ -28,6 +28,10 @@ module;
export module Catcrafts.E2eHarness;
import std;
import Crafter.Network;
// For the compiled-in catalogue: the suites address whatever priced product it
// lists rather than a slug written into them, so a listing coming or going is
// a content change and not a test edit.
import Catcrafts.Shared;
namespace fs = std::filesystem;
@ -62,6 +66,18 @@ inline std::string ReadFile(const fs::path& p) {
return buf.str();
}
// The priced product the goods suites run against: the first non-donation
// entry of the compiled catalogue, or nullptr while it lists none — the state
// since 2026-09-05, when the two handsets were withdrawn. A suite with goods
// checks prints a note and skips them in that case; the donation item keeps
// the shared order lifecycle covered regardless.
inline const Catcrafts::Product* FirstPricedProduct() {
for (const Catcrafts::Product& p : Catcrafts::Content::Products()) {
if (!p.donation) return &p;
}
return nullptr;
}
inline std::size_t CountOccurrences(std::string_view haystack, std::string_view needle) {
if (needle.empty()) return 0;
std::size_t n = 0;
@ -302,9 +318,12 @@ public:
return Body(path);
}
// Open shop or coming-soon? The pricing blob (data-cc) exists only on the
// real order form, so its presence is the probe.
bool ShopOpen() { return Body("/shop/fp6-pmos").find("data-cc=") != std::string::npos; }
// Open shop or coming-soon, for one priced product? The pricing blob
// (data-cc) exists only on the real order form, so its presence is the
// probe.
bool ShopOpen(std::string_view slug) {
return Body("/shop/" + std::string(slug)).find("data-cc=") != std::string::npos;
}
private:
void Spawn(const std::vector<std::string>& argv) {