Error in `gzfile(file, mode)`: cannot open the connection

mylist <- x |> build_injec_seq(inject_vol = 2, tray = "1", inlet_method = "method.ql")
x |> build_injec_seq(inject_vol = 2, suffix = "4", tray = "1", inlet_method = "method.q") |> # suffix changed
write_injec_seq()  |> expect_no_error() # changed the suffix
write_injec_seq(mylist)  |> expect_message()  # already written
test_that("multiple_plates", { # expect 1 list
build_injec_seq(x, tray = c("1", "2"), inject_vol = 2, inlet_method = "method.q") |> expect_no_error()
build_injec_seq(x, tray = "1", inject_vol = 2, explore_mode = TRUE, inlet_method = "method.q1")  |>
# The metadata table is accommodating for the list
build_injec_seq(x, inlet_method = "method.ql", tray = "1", inject_vol = 2, explore_mode = TRUE)  |>
build_injec_seq(x, inlet_method = "method.ql", tray = "1", inject_vol = 2, explore_mode = TRUE, suffix = "2")  |>

x <- generate_96() |> add_blank(TRUE, FALSE)
x <- generate_96() |> add_blank(TRUE, FALSE) |> register_plate()
x <- generate_96() |> add_suitability("Suitability", conc = 2)
generate_96() |> add_samples(paste0("S", 1:96)) |> expect_no_error()
generate_96() |>  add_cs_curve(1:10) |> .last_std() |> expect_equal(1)
# retun 0, even if there is cs without qc
generate_96() |>  add_cs_curve(1:10) |> .last_qc() |> expect_equal(0)
x <- generate_96(empty_rows = c("H"), extra_fill = 4) |>
x$plate[8, 12] |> unname()|> expect_equal("DB")
add_samples(samples = 1:10, time = 1:10*30, conc = 1:10)  |>
plot(color = "conc") |> expect_no_error()
add_samples(samples = 1:10, time = 10, conc = 1:10)  |>
add_samples(samples = 1:10, time = 1:10*30, conc = 1)  |>
plot(color = "factor") |> expect_no_error()
add_samples(samples = 1:10, time = 1:10*30, conc = NA)  |>
plot(color = "time") |> expect_no_error()
add_samples(samples = 1:10, time = 1:10*30, conc = 1:2)  |>
plot(x[[1]], color = "time") |> expect_no_error()
plot(x[[1]], color = "factor") |> expect_no_error()
plot(x[[1]], color = "conc") |> expect_no_error()
plot(x[[1]], color = "TYPE") |> expect_no_error()
plot(x[[1]], color = "samples") |> expect_no_error()
add_samples_c(samples = 1:3, time = 0:5*30, conc = c(1,2), factor = c("M", "F"))
sum(!is.na(x$df$samples)) |> expect_equal(72) # cartesian product