diff --git a/cypress/dumps/submissioncomplete.sql b/cypress/dumps/submissioncomplete.sql new file mode 100644 index 0000000000000000000000000000000000000000..60c3bd90d800ddfe076077ab3284998427ae9f3e --- /dev/null +++ b/cypress/dumps/submissioncomplete.sql @@ -0,0 +1,802 @@ +-- +-- PostgreSQL database dump +-- + +-- Dumped from database version 10.5 +-- Dumped by pg_dump version 10.5 + +SET statement_timeout = 0; +SET lock_timeout = 0; +SET idle_in_transaction_session_timeout = 0; +SET client_encoding = 'UTF8'; +SET standard_conforming_strings = on; +SELECT pg_catalog.set_config('search_path', '', false); +SET check_function_bodies = false; +SET client_min_messages = warning; +SET row_security = off; + +-- +-- Name: pgboss; Type: SCHEMA; Schema: -; Owner: test +-- + +CREATE SCHEMA pgboss; + + +ALTER SCHEMA pgboss OWNER TO test; + +-- +-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: +-- + +CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog; + + +-- +-- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: +-- + +COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language'; + + +-- +-- Name: pgcrypto; Type: EXTENSION; Schema: -; Owner: +-- + +CREATE EXTENSION IF NOT EXISTS pgcrypto WITH SCHEMA public; + + +-- +-- Name: EXTENSION pgcrypto; Type: COMMENT; Schema: -; Owner: +-- + +COMMENT ON EXTENSION pgcrypto IS 'cryptographic functions'; + + +-- +-- Name: job_state; Type: TYPE; Schema: pgboss; Owner: test +-- + +CREATE TYPE pgboss.job_state AS ENUM ( + 'created', + 'retry', + 'active', + 'completed', + 'expired', + 'cancelled', + 'failed' +); + + +ALTER TYPE pgboss.job_state OWNER TO test; + +SET default_tablespace = ''; + +SET default_with_oids = false; + +-- +-- Name: archive; Type: TABLE; Schema: pgboss; Owner: test +-- + +CREATE TABLE pgboss.archive ( + id uuid NOT NULL, + name text NOT NULL, + priority integer NOT NULL, + data jsonb, + state pgboss.job_state NOT NULL, + retrylimit integer NOT NULL, + retrycount integer NOT NULL, + retrydelay integer NOT NULL, + retrybackoff boolean NOT NULL, + startafter timestamp with time zone NOT NULL, + startedon timestamp with time zone, + singletonkey text, + singletonon timestamp without time zone, + expirein interval NOT NULL, + createdon timestamp with time zone NOT NULL, + completedon timestamp with time zone, + archivedon timestamp with time zone DEFAULT now() NOT NULL +); + + +ALTER TABLE pgboss.archive OWNER TO test; + +-- +-- Name: job; Type: TABLE; Schema: pgboss; Owner: test +-- + +CREATE TABLE pgboss.job ( + id uuid DEFAULT public.gen_random_uuid() NOT NULL, + name text NOT NULL, + priority integer DEFAULT 0 NOT NULL, + data jsonb, + state pgboss.job_state DEFAULT 'created'::pgboss.job_state NOT NULL, + retrylimit integer DEFAULT 0 NOT NULL, + retrycount integer DEFAULT 0 NOT NULL, + retrydelay integer DEFAULT 0 NOT NULL, + retrybackoff boolean DEFAULT false NOT NULL, + startafter timestamp with time zone DEFAULT now() NOT NULL, + startedon timestamp with time zone, + singletonkey text, + singletonon timestamp without time zone, + expirein interval DEFAULT '00:15:00'::interval NOT NULL, + createdon timestamp with time zone DEFAULT now() NOT NULL, + completedon timestamp with time zone +); + + +ALTER TABLE pgboss.job OWNER TO test; + +-- +-- Name: version; Type: TABLE; Schema: pgboss; Owner: test +-- + +CREATE TABLE pgboss.version ( + version text NOT NULL +); + + +ALTER TABLE pgboss.version OWNER TO test; + +-- +-- Name: aliases; Type: TABLE; Schema: public; Owner: test +-- + +CREATE TABLE public.aliases ( + id uuid NOT NULL, + created timestamp with time zone DEFAULT CURRENT_TIMESTAMP, + updated timestamp with time zone DEFAULT CURRENT_TIMESTAMP, + name character varying(255), + email character varying(255), + aff character varying(255) +); + + +ALTER TABLE public.aliases OWNER TO test; + +-- +-- Name: channel_members; Type: TABLE; Schema: public; Owner: test +-- + +CREATE TABLE public.channel_members ( + id uuid NOT NULL, + created timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + updated timestamp with time zone, + user_id uuid NOT NULL, + channel_id uuid NOT NULL +); + + +ALTER TABLE public.channel_members OWNER TO test; + +-- +-- Name: channels; Type: TABLE; Schema: public; Owner: test +-- + +CREATE TABLE public.channels ( + id uuid NOT NULL, + manuscript_id uuid, + team_id uuid, + created timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + updated timestamp with time zone, + topic text, + type text +); + + +ALTER TABLE public.channels OWNER TO test; + +-- +-- Name: entities; Type: TABLE; Schema: public; Owner: test +-- + +CREATE TABLE public.entities ( + id uuid NOT NULL, + data jsonb +); + + +ALTER TABLE public.entities OWNER TO test; + +-- +-- Name: files; Type: TABLE; Schema: public; Owner: test +-- + +CREATE TABLE public.files ( + id uuid NOT NULL, + created timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + updated timestamp with time zone, + object text, + object_id uuid, + label text, + file_type text, + filename text, + url text, + mime_type text, + size integer, + type text NOT NULL +); + + +ALTER TABLE public.files OWNER TO test; + +-- +-- Name: identities; Type: TABLE; Schema: public; Owner: test +-- + +CREATE TABLE public.identities ( + id uuid NOT NULL, + user_id uuid NOT NULL, + created timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + updated timestamp with time zone, + type text NOT NULL, + identifier text, + name text, + aff text, + oauth jsonb, + is_default boolean +); + + +ALTER TABLE public.identities OWNER TO test; + +-- +-- Name: manuscripts; Type: TABLE; Schema: public; Owner: test +-- + +CREATE TABLE public.manuscripts ( + id uuid NOT NULL, + created timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + updated timestamp with time zone, + parent_id uuid, + submitter_id uuid, + status text, + decision text, + authors jsonb, + suggestions jsonb, + meta jsonb, + submission jsonb, + type text NOT NULL +); + + +ALTER TABLE public.manuscripts OWNER TO test; + +-- +-- Name: messages; Type: TABLE; Schema: public; Owner: test +-- + +CREATE TABLE public.messages ( + id uuid NOT NULL, + user_id uuid NOT NULL, + channel_id uuid NOT NULL, + created timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + updated timestamp with time zone, + content text +); + + +ALTER TABLE public.messages OWNER TO test; + +-- +-- Name: migrations; Type: TABLE; Schema: public; Owner: test +-- + +CREATE TABLE public.migrations ( + id text NOT NULL, + run_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE public.migrations OWNER TO test; + +-- +-- Name: reviews; Type: TABLE; Schema: public; Owner: test +-- + +CREATE TABLE public.reviews ( + id uuid NOT NULL, + created timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + updated timestamp with time zone, + recommendation text, + is_decision boolean DEFAULT false, + comments jsonb, + user_id uuid, + manuscript_id uuid, + type text NOT NULL +); + + +ALTER TABLE public.reviews OWNER TO test; + +-- +-- Name: team_members; Type: TABLE; Schema: public; Owner: test +-- + +CREATE TABLE public.team_members ( + id uuid NOT NULL, + created timestamp with time zone DEFAULT CURRENT_TIMESTAMP, + updated timestamp with time zone DEFAULT CURRENT_TIMESTAMP, + status character varying(255), + team_id uuid, + user_id uuid, + alias_id uuid +); + + +ALTER TABLE public.team_members OWNER TO test; + +-- +-- Name: teams; Type: TABLE; Schema: public; Owner: test +-- + +CREATE TABLE public.teams ( + id uuid NOT NULL, + created timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + updated timestamp with time zone, + name text, + role text NOT NULL, + owners jsonb, + global boolean, + type text NOT NULL, + object_id uuid, + object_type character varying(255) +); + + +ALTER TABLE public.teams OWNER TO test; + +-- +-- Name: users; Type: TABLE; Schema: public; Owner: test +-- + +CREATE TABLE public.users ( + id uuid NOT NULL, + created timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + updated timestamp with time zone, + admin boolean, + email text, + username text, + password_hash text, + teams jsonb, + password_reset_token text, + password_reset_timestamp timestamp with time zone, + type text NOT NULL, + profile_picture text, + online boolean +); + + +ALTER TABLE public.users OWNER TO test; + +-- +-- Data for Name: archive; Type: TABLE DATA; Schema: pgboss; Owner: test +-- + + + +-- +-- Data for Name: job; Type: TABLE DATA; Schema: pgboss; Owner: test +-- + + + +-- +-- Data for Name: version; Type: TABLE DATA; Schema: pgboss; Owner: test +-- + +INSERT INTO pgboss.version (version) VALUES ('11'); + + +-- +-- Data for Name: aliases; Type: TABLE DATA; Schema: public; Owner: test +-- + + + +-- +-- Data for Name: channel_members; Type: TABLE DATA; Schema: public; Owner: test +-- + + + +-- +-- Data for Name: channels; Type: TABLE DATA; Schema: public; Owner: test +-- + +INSERT INTO public.channels (id, manuscript_id, team_id, created, updated, topic, type) VALUES ('ff5e86ef-2eaf-4327-afc2-9eb968c28fd0', '2357fc20-b99d-4b6f-a715-7d26a05becc3', NULL, '2020-07-27 00:53:31.57+02', '2020-07-27 00:53:31.57+02', 'Manuscript discussion', 'all'); +INSERT INTO public.channels (id, manuscript_id, team_id, created, updated, topic, type) VALUES ('b01cfc74-f6e9-495f-9c4c-0e2a419bc849', '2357fc20-b99d-4b6f-a715-7d26a05becc3', NULL, '2020-07-27 00:53:31.577+02', '2020-07-27 00:53:31.577+02', 'Editorial discussion', 'editorial'); + + +-- +-- Data for Name: entities; Type: TABLE DATA; Schema: public; Owner: test +-- + + + +-- +-- Data for Name: files; Type: TABLE DATA; Schema: public; Owner: test +-- + + + +-- +-- Data for Name: identities; Type: TABLE DATA; Schema: public; Owner: test +-- + +INSERT INTO public.identities (id, user_id, created, updated, type, identifier, name, aff, oauth, is_default) VALUES ('d341a633-cdce-4a7f-a9ad-5afc03cd0dd1', '027afa6a-edbc-486e-bb31-71e12f8ea1c5', '2020-07-21 16:17:24.741+02', '2020-07-21 16:17:25.87+02', 'orcid', '0000-0002-0564-2016', 'Emily Clay', NULL, '{"accessToken": "079a1165-31e5-4b59-9a99-d80ff7a21ebf", "refreshToken": "ccadc737-defc-419e-823b-a9f3673848ba"}', true); +INSERT INTO public.identities (id, user_id, created, updated, type, identifier, name, aff, oauth, is_default) VALUES ('bcda196e-765a-42c8-94da-ca2e43b80f96', '3802b0e7-aadc-45de-9cf9-918fede99b97', '2020-07-21 16:30:45.721+02', '2020-07-21 16:33:26.742+02', 'orcid', '0000-0002-5641-5729', 'Sinead Sullivan', NULL, '{"accessToken": "ef1ed3ec-8371-41b2-a136-fd196ae52a72", "refreshToken": "6972dace-d9a6-4cd3-a2ad-ec7eb3e457c7"}', true); +INSERT INTO public.identities (id, user_id, created, updated, type, identifier, name, aff, oauth, is_default) VALUES ('4af83984-6359-47c5-a075-5ddfa9c555d9', '0da0bbec-9261-4706-b990-0c10aa3cc6b4', '2020-07-21 16:35:06.127+02', '2020-07-21 16:35:07.104+02', 'orcid', '0000-0002-7645-9921', 'Sherry Crofoot', NULL, '{"accessToken": "2ad4e130-0775-4e13-87fb-8e8f5a0570ae", "refreshToken": "159933d9-2020-4c02-bdfb-163af41017dc"}', true); +INSERT INTO public.identities (id, user_id, created, updated, type, identifier, name, aff, oauth, is_default) VALUES ('acfa1777-0aec-4fe1-bc16-92bb9d19e884', '85e1300e-003c-4e96-987b-23812f902477', '2020-07-21 16:35:38.384+02', '2020-07-21 16:35:39.358+02', 'orcid', '0000-0002-9429-4446', 'Elaine Barnes', NULL, '{"accessToken": "dcf07bc7-e59c-41b3-9ce0-924ac20aeeea", "refreshToken": "ae49d6a1-8e62-419d-8767-4a3ec22c1950"}', true); +INSERT INTO public.identities (id, user_id, created, updated, type, identifier, name, aff, oauth, is_default) VALUES ('88c85115-d83c-42d7-a1a1-0139827977da', '40e3d054-9ac8-4c0f-84ed-e3c6307662cd', '2020-07-21 16:36:24.975+02', '2020-07-21 16:36:26.059+02', 'orcid', '0000-0001-5956-7341', 'Gale Davis', NULL, '{"accessToken": "3e9f6f6c-7cc0-4afa-9fdf-6ed377c36aad", "refreshToken": "80b1e911-df97-43f1-9f11-17b61913f6d7"}', true); +INSERT INTO public.identities (id, user_id, created, updated, type, identifier, name, aff, oauth, is_default) VALUES ('049f91da-c84e-4b80-be2e-6e0cfca7a136', '231717dd-ba09-43d4-ac98-9d5542b27a0c', '2020-07-22 14:18:36.611+02', '2020-07-22 14:18:37.745+02', 'orcid', '0000-0003-2536-230X', 'Test Account', NULL, '{"accessToken": "eb551178-79e5-4189-8c5f-0a553092a9b5", "refreshToken": "4506fa5f-bd77-4867-afb4-0b07ea5302d6"}', true); +INSERT INTO public.identities (id, user_id, created, updated, type, identifier, name, aff, oauth, is_default) VALUES ('2fb8359c-239c-43fa-91f5-1ff2058272a6', '1d599f2c-d293-4d5e-b6c1-ba34e81e3fc8', '2020-07-24 15:21:54.604+02', '2020-07-24 15:21:55.7+02', 'orcid', '0000-0003-1838-2441', 'Joanne Pilger', NULL, '{"accessToken": "842de329-ef16-4461-b83b-e8fe57238904", "refreshToken": "524fbdc5-9c67-4b4c-af17-2ce4cf294e88"}', true); + + +-- +-- Data for Name: manuscripts; Type: TABLE DATA; Schema: public; Owner: test +-- + +INSERT INTO public.manuscripts (id, created, updated, parent_id, submitter_id, status, decision, authors, suggestions, meta, submission, type) VALUES ('2357fc20-b99d-4b6f-a715-7d26a05becc3', '2020-07-27 00:53:31.558+02', '2020-07-27 00:53:56.661+02', NULL, '027afa6a-edbc-486e-bb31-71e12f8ea1c5', 'submitted', NULL, NULL, NULL, '{"notes": [{"content": "", "notesType": "fundingAcknowledgement"}, {"content": "", "notesType": "specialInstructions"}], "title": "My URL submission"}', '{"irb": "yes", "name": "Emily Clay", "cover": "This is my cover letter", "links": "https://doi.org/10.6084/m9.figshare.913521.v1, https://github.com/jure/mathtype_to_mathml", "ethics": "This is my ethics statement", "contact": "emily@example.com", "methods": ["Functional MRI", "Optical Imaging"], "datacode": "This is my data and code availability statement", "humanMRI": "3T", "keywords": "some, keywords", "packages": ["SPM", "FSL"], "subjects": "patients", "suggested": "Erica James, Matthew Matretzky", "objectType": "software", "affiliation": "Example University, Egland", "otherMethods": "Erica James, Matthew Matretzky", "humanMRIother": "7T", "otherPackages": "Jupyter, Stencila", "animal_research_approval": "yes"}', 'Manuscript'); + + +-- +-- Data for Name: messages; Type: TABLE DATA; Schema: public; Owner: test +-- + + + +-- +-- Data for Name: migrations; Type: TABLE DATA; Schema: public; Owner: test +-- + +INSERT INTO public.migrations (id, run_at) VALUES ('1524494862-entities.sql', '2020-07-21 16:01:00.856209+02'); +INSERT INTO public.migrations (id, run_at) VALUES ('1537450834-files.sql', '2020-07-21 16:01:00.866487+02'); +INSERT INTO public.migrations (id, run_at) VALUES ('1537450834-review.sql', '2020-07-21 16:01:00.876573+02'); +INSERT INTO public.migrations (id, run_at) VALUES ('1542276313-initial-user-migration.sql', '2020-07-21 16:01:00.887088+02'); +INSERT INTO public.migrations (id, run_at) VALUES ('1542801241-initial-team-migration.sql', '2020-07-21 16:01:00.898301+02'); +INSERT INTO public.migrations (id, run_at) VALUES ('1547596236-initial-team-member-migration.js', '2020-07-21 16:01:00.954317+02'); +INSERT INTO public.migrations (id, run_at) VALUES ('1548205275-move-members.js', '2020-07-21 16:01:01.009825+02'); +INSERT INTO public.migrations (id, run_at) VALUES ('1548205276-simplify-object.js', '2020-07-21 16:01:01.025532+02'); +INSERT INTO public.migrations (id, run_at) VALUES ('1548328420-add-alias-migration.js', '2020-07-21 16:01:01.068783+02'); +INSERT INTO public.migrations (id, run_at) VALUES ('1560771823-add-unique-constraints-to-users.sql', '2020-07-21 16:01:01.078878+02'); +INSERT INTO public.migrations (id, run_at) VALUES ('1580908536-add-identities.sql', '2020-07-21 16:01:01.092107+02'); +INSERT INTO public.migrations (id, run_at) VALUES ('1581371297-migrate-users-to-identities.js', '2020-07-21 16:01:01.107057+02'); +INSERT INTO public.migrations (id, run_at) VALUES ('1581450834-manuscript.sql', '2020-07-21 16:01:01.118725+02'); +INSERT INTO public.migrations (id, run_at) VALUES ('1582930582-drop-fragments-and-collections.js', '2020-07-21 16:01:01.12668+02'); +INSERT INTO public.migrations (id, run_at) VALUES ('1585323910-add-channels.sql', '2020-07-21 16:01:01.14497+02'); +INSERT INTO public.migrations (id, run_at) VALUES ('1585344885-add-messages.sql', '2020-07-21 16:01:01.15657+02'); +INSERT INTO public.migrations (id, run_at) VALUES ('1585513226-add-profile-pic.sql', '2020-07-21 16:01:01.162443+02'); +INSERT INTO public.migrations (id, run_at) VALUES ('1592915682-change-identities-constraint.sql', '2020-07-21 16:01:01.17359+02'); + + +-- +-- Data for Name: reviews; Type: TABLE DATA; Schema: public; Owner: test +-- + + + +-- +-- Data for Name: team_members; Type: TABLE DATA; Schema: public; Owner: test +-- + +INSERT INTO public.team_members (id, created, updated, status, team_id, user_id, alias_id) VALUES ('46aae2bc-0014-494b-84b9-78347f985031', '2020-07-27 00:53:31.583+02', '2020-07-27 00:53:31.583+02', NULL, '6e56669b-d835-4a06-b121-922fcaa52c47', '027afa6a-edbc-486e-bb31-71e12f8ea1c5', NULL); + + +-- +-- Data for Name: teams; Type: TABLE DATA; Schema: public; Owner: test +-- + +INSERT INTO public.teams (id, created, updated, name, role, owners, global, type, object_id, object_type) VALUES ('6e56669b-d835-4a06-b121-922fcaa52c47', '2020-07-27 00:53:31.576+02', '2020-07-27 00:53:31.576+02', 'Author', 'author', NULL, NULL, 'team', '2357fc20-b99d-4b6f-a715-7d26a05becc3', 'Manuscript'); + + +-- +-- Data for Name: users; Type: TABLE DATA; Schema: public; Owner: test +-- + +INSERT INTO public.users (id, created, updated, admin, email, username, password_hash, teams, password_reset_token, password_reset_timestamp, type, profile_picture, online) VALUES ('85e1300e-003c-4e96-987b-23812f902477', '2020-07-21 16:35:38.381+02', '2020-07-24 16:43:03.114+02', NULL, NULL, '0000000294294446', NULL, NULL, NULL, NULL, 'user', '/static/profiles/testuser1.jpg', false); +INSERT INTO public.users (id, created, updated, admin, email, username, password_hash, teams, password_reset_token, password_reset_timestamp, type, profile_picture, online) VALUES ('1d599f2c-d293-4d5e-b6c1-ba34e81e3fc8', '2020-07-24 15:21:54.59+02', '2020-07-24 16:43:26.378+02', NULL, NULL, '0000000318382441', NULL, NULL, NULL, NULL, 'user', '/static/profiles/testuser3.jpg', false); +INSERT INTO public.users (id, created, updated, admin, email, username, password_hash, teams, password_reset_token, password_reset_timestamp, type, profile_picture, online) VALUES ('40e3d054-9ac8-4c0f-84ed-e3c6307662cd', '2020-07-21 16:36:24.973+02', '2020-07-24 16:43:43.943+02', NULL, NULL, '0000000159567341', NULL, NULL, NULL, NULL, 'user', '/static/profiles/testuser4.jpg', true); +INSERT INTO public.users (id, created, updated, admin, email, username, password_hash, teams, password_reset_token, password_reset_timestamp, type, profile_picture, online) VALUES ('231717dd-ba09-43d4-ac98-9d5542b27a0c', '2020-07-22 14:18:36.597+02', '2020-07-24 16:43:54.939+02', NULL, NULL, '000000032536230X', NULL, NULL, NULL, NULL, 'user', '/static/profiles/testuser5.jpg', false); +INSERT INTO public.users (id, created, updated, admin, email, username, password_hash, teams, password_reset_token, password_reset_timestamp, type, profile_picture, online) VALUES ('0da0bbec-9261-4706-b990-0c10aa3cc6b4', '2020-07-21 16:35:06.125+02', '2020-07-24 16:44:59.306+02', NULL, NULL, '0000000276459921', NULL, NULL, NULL, NULL, 'user', '/static/profiles/testuser7.jpg', true); +INSERT INTO public.users (id, created, updated, admin, email, username, password_hash, teams, password_reset_token, password_reset_timestamp, type, profile_picture, online) VALUES ('3802b0e7-aadc-45de-9cf9-918fede99b97', '2020-07-21 16:30:45.719+02', '2020-07-27 00:53:30.642+02', true, NULL, '0000000256415729', NULL, NULL, NULL, NULL, 'user', '/static/profiles/testuser6.jpg', false); +INSERT INTO public.users (id, created, updated, admin, email, username, password_hash, teams, password_reset_token, password_reset_timestamp, type, profile_picture, online) VALUES ('027afa6a-edbc-486e-bb31-71e12f8ea1c5', '2020-07-21 16:17:24.734+02', '2020-07-27 00:53:31.589+02', NULL, NULL, '0000000205642016', NULL, NULL, NULL, NULL, 'user', '/static/profiles/testuser2.jpg', true); + + +-- +-- Name: job job_pkey; Type: CONSTRAINT; Schema: pgboss; Owner: test +-- + +ALTER TABLE ONLY pgboss.job + ADD CONSTRAINT job_pkey PRIMARY KEY (id); + + +-- +-- Name: version version_pkey; Type: CONSTRAINT; Schema: pgboss; Owner: test +-- + +ALTER TABLE ONLY pgboss.version + ADD CONSTRAINT version_pkey PRIMARY KEY (version); + + +-- +-- Name: aliases aliases_pkey; Type: CONSTRAINT; Schema: public; Owner: test +-- + +ALTER TABLE ONLY public.aliases + ADD CONSTRAINT aliases_pkey PRIMARY KEY (id); + + +-- +-- Name: channel_members channel_members_pkey; Type: CONSTRAINT; Schema: public; Owner: test +-- + +ALTER TABLE ONLY public.channel_members + ADD CONSTRAINT channel_members_pkey PRIMARY KEY (id); + + +-- +-- Name: channels channels_pkey; Type: CONSTRAINT; Schema: public; Owner: test +-- + +ALTER TABLE ONLY public.channels + ADD CONSTRAINT channels_pkey PRIMARY KEY (id); + + +-- +-- Name: entities entities_pkey; Type: CONSTRAINT; Schema: public; Owner: test +-- + +ALTER TABLE ONLY public.entities + ADD CONSTRAINT entities_pkey PRIMARY KEY (id); + + +-- +-- Name: files files_pkey; Type: CONSTRAINT; Schema: public; Owner: test +-- + +ALTER TABLE ONLY public.files + ADD CONSTRAINT files_pkey PRIMARY KEY (id); + + +-- +-- Name: identities identities_pkey; Type: CONSTRAINT; Schema: public; Owner: test +-- + +ALTER TABLE ONLY public.identities + ADD CONSTRAINT identities_pkey PRIMARY KEY (id); + + +-- +-- Name: manuscripts manuscripts_pkey; Type: CONSTRAINT; Schema: public; Owner: test +-- + +ALTER TABLE ONLY public.manuscripts + ADD CONSTRAINT manuscripts_pkey PRIMARY KEY (id); + + +-- +-- Name: messages messages_pkey; Type: CONSTRAINT; Schema: public; Owner: test +-- + +ALTER TABLE ONLY public.messages + ADD CONSTRAINT messages_pkey PRIMARY KEY (id); + + +-- +-- Name: migrations migrations_pkey; Type: CONSTRAINT; Schema: public; Owner: test +-- + +ALTER TABLE ONLY public.migrations + ADD CONSTRAINT migrations_pkey PRIMARY KEY (id); + + +-- +-- Name: reviews reviews_pkey; Type: CONSTRAINT; Schema: public; Owner: test +-- + +ALTER TABLE ONLY public.reviews + ADD CONSTRAINT reviews_pkey PRIMARY KEY (id); + + +-- +-- Name: team_members team_members_pkey; Type: CONSTRAINT; Schema: public; Owner: test +-- + +ALTER TABLE ONLY public.team_members + ADD CONSTRAINT team_members_pkey PRIMARY KEY (id); + + +-- +-- Name: teams teams_pkey; Type: CONSTRAINT; Schema: public; Owner: test +-- + +ALTER TABLE ONLY public.teams + ADD CONSTRAINT teams_pkey PRIMARY KEY (id); + + +-- +-- Name: users users_email_key; Type: CONSTRAINT; Schema: public; Owner: test +-- + +ALTER TABLE ONLY public.users + ADD CONSTRAINT users_email_key UNIQUE (email); + + +-- +-- Name: users users_pkey; Type: CONSTRAINT; Schema: public; Owner: test +-- + +ALTER TABLE ONLY public.users + ADD CONSTRAINT users_pkey PRIMARY KEY (id); + + +-- +-- Name: users users_username_key; Type: CONSTRAINT; Schema: public; Owner: test +-- + +ALTER TABLE ONLY public.users + ADD CONSTRAINT users_username_key UNIQUE (username); + + +-- +-- Name: archive_archivedon_idx; Type: INDEX; Schema: pgboss; Owner: test +-- + +CREATE INDEX archive_archivedon_idx ON pgboss.archive USING btree (archivedon); + + +-- +-- Name: archive_id_idx; Type: INDEX; Schema: pgboss; Owner: test +-- + +CREATE INDEX archive_id_idx ON pgboss.archive USING btree (id); + + +-- +-- Name: job_name; Type: INDEX; Schema: pgboss; Owner: test +-- + +CREATE INDEX job_name ON pgboss.job USING btree (name text_pattern_ops); + + +-- +-- Name: job_singletonkey; Type: INDEX; Schema: pgboss; Owner: test +-- + +CREATE UNIQUE INDEX job_singletonkey ON pgboss.job USING btree (name, singletonkey) WHERE ((state < 'completed'::pgboss.job_state) AND (singletonon IS NULL)); + + +-- +-- Name: job_singletonkeyon; Type: INDEX; Schema: pgboss; Owner: test +-- + +CREATE UNIQUE INDEX job_singletonkeyon ON pgboss.job USING btree (name, singletonon, singletonkey) WHERE (state < 'expired'::pgboss.job_state); + + +-- +-- Name: job_singletonon; Type: INDEX; Schema: pgboss; Owner: test +-- + +CREATE UNIQUE INDEX job_singletonon ON pgboss.job USING btree (name, singletonon) WHERE ((state < 'expired'::pgboss.job_state) AND (singletonkey IS NULL)); + + +-- +-- Name: channel_members_idx; Type: INDEX; Schema: public; Owner: test +-- + +CREATE INDEX channel_members_idx ON public.channel_members USING btree (user_id, channel_id); + + +-- +-- Name: is_default_idx; Type: INDEX; Schema: public; Owner: test +-- + +CREATE UNIQUE INDEX is_default_idx ON public.identities USING btree (is_default, user_id) WHERE (is_default IS TRUE); + + +-- +-- Name: team_members_team_id_user_id_index; Type: INDEX; Schema: public; Owner: test +-- + +CREATE INDEX team_members_team_id_user_id_index ON public.team_members USING btree (team_id, user_id); + + +-- +-- Name: teams_object_id_object_type_index; Type: INDEX; Schema: public; Owner: test +-- + +CREATE INDEX teams_object_id_object_type_index ON public.teams USING btree (object_id, object_type); + + +-- +-- Name: channel_members channel_members_channel_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test +-- + +ALTER TABLE ONLY public.channel_members + ADD CONSTRAINT channel_members_channel_id_fkey FOREIGN KEY (channel_id) REFERENCES public.channels(id); + + +-- +-- Name: channel_members channel_members_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test +-- + +ALTER TABLE ONLY public.channel_members + ADD CONSTRAINT channel_members_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE; + + +-- +-- Name: channels channels_manuscript_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test +-- + +ALTER TABLE ONLY public.channels + ADD CONSTRAINT channels_manuscript_id_fkey FOREIGN KEY (manuscript_id) REFERENCES public.manuscripts(id) ON DELETE CASCADE; + + +-- +-- Name: channels channels_team_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test +-- + +ALTER TABLE ONLY public.channels + ADD CONSTRAINT channels_team_id_fkey FOREIGN KEY (team_id) REFERENCES public.teams(id); + + +-- +-- Name: manuscripts manuscripts_submitter_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test +-- + +ALTER TABLE ONLY public.manuscripts + ADD CONSTRAINT manuscripts_submitter_id_fkey FOREIGN KEY (submitter_id) REFERENCES public.users(id); + + +-- +-- Name: messages messages_channel_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test +-- + +ALTER TABLE ONLY public.messages + ADD CONSTRAINT messages_channel_id_fkey FOREIGN KEY (channel_id) REFERENCES public.channels(id) ON DELETE CASCADE; + + +-- +-- Name: messages messages_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test +-- + +ALTER TABLE ONLY public.messages + ADD CONSTRAINT messages_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE; + + +-- +-- Name: identities sidentities_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test +-- + +ALTER TABLE ONLY public.identities + ADD CONSTRAINT sidentities_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE; + + +-- +-- Name: team_members team_members_alias_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: test +-- + +ALTER TABLE ONLY public.team_members + ADD CONSTRAINT team_members_alias_id_foreign FOREIGN KEY (alias_id) REFERENCES public.aliases(id); + + +-- +-- Name: team_members team_members_team_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: test +-- + +ALTER TABLE ONLY public.team_members + ADD CONSTRAINT team_members_team_id_foreign FOREIGN KEY (team_id) REFERENCES public.teams(id) ON UPDATE CASCADE ON DELETE CASCADE; + + +-- +-- Name: team_members team_members_user_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: test +-- + +ALTER TABLE ONLY public.team_members + ADD CONSTRAINT team_members_user_id_foreign FOREIGN KEY (user_id) REFERENCES public.users(id) ON UPDATE CASCADE ON DELETE CASCADE; + + +-- +-- PostgreSQL database dump complete +-- + diff --git a/cypress/integration/submission_spec.js b/cypress/integration/submission_spec.js index e3317c21b68d3de567ef6f275cf2d44f2d140ff5..fcc254b70ed27cd2514800f4b459ff859216bd40 100644 --- a/cypress/integration/submission_spec.js +++ b/cypress/integration/submission_spec.js @@ -1,11 +1,18 @@ +// const URLsubmission = { +// title: +// } +const login = name => { + cy.task('createToken', name).then(token => { + cy.setToken(token) + cy.visit('/journal/dashboard') + }) +} + describe('URL submission test', () => { it('can submit a URL and some metadata', () => { cy.task('restore', 'initialState') - cy.task('createToken', 'Emily Clay').then(token => { - cy.setToken(token) - cy.visit('/journal/dashboard') - }) + login('Emily Clay') cy.get('button') .contains('New submission') @@ -22,274 +29,126 @@ describe('URL submission test', () => { cy.get('[data-testid="submission.name"]') .click() .type('Emily Clay') - cy.get('[data-testid="submission.keywords"]') - .click() - .type('some, keywords') - cy.get('button') - .contains('Submit your research object') - .click() - cy.get('button') - .contains('Submit your manuscript') + cy.get('[data-testid="submission.affiliation"]') .click() + .type('Example University, Egland') - cy.get('body').contains('My Submissions') - cy.get('body').contains('My URL submission') - }) -}) - -// // TODO: What's with the wait? - -// const login = (username, password = 'password') => { -// cy.get('input[name="username"]') -// .click() -// .wait(200) -// .focus() -// .type(username) -// .blur() -// cy.get('input[name="password"]') -// .click() -// .wait(200) -// .focus() -// .type(password) -// .blur() -// cy.get('button[type="submit"]').click() -// // cy.wait(1000) -// } - -// const doReview = (username, note, confidential, recommendation) => { -// // 1. Login -// login(username) - -// // 2. Accept and do the review -// cy.get('[data-testid=accept-review]').click() -// cy.contains('Do Review').click() - -// cy.get('[placeholder*="Enter your review"] div[contenteditable="true"]') -// .focus() -// .type(note) -// .blur() -// cy.wait(1000) -// cy.get( -// '[placeholder*="Enter a confidential note"] div[contenteditable="true"]', -// ) -// .focus() -// .type(confidential) -// .blur() -// cy.wait(1000) -// // 0 == accept, 1 == revise, 2 == reject -// cy.get(`[class*=Radio__Label]:nth(${recommendation})`).click() -// cy.get('button[type=submit]').click() - -// // 3. Logout -// cy.get('nav button').click() -// } - -// describe('PDF submission test', () => { -// it('can upload and submit a PDF', () => { -// cy.task('db:seed') - -// cy.visit('/dashboard') - -// // 1. Log in as author -// login('author') - -// // 2. Submit a PDF -// cy.fixture('test-pdf.pdf', 'base64').then(fileContent => { -// cy.get('[data-testid="dropzone"]').upload( -// { -// fileContent, -// fileName: 'test-pdf.pdf', -// encoding: 'base64', -// mimeType: 'application/pdf', -// }, -// { subjectType: 'drag-n-drop' }, -// ) -// }) - -// cy.get('body').contains('Submission information') -// cy.get('[data-testid="meta.title"]').contains('test pdf') -// cy.get('[data-testid="meta.title"] div[contenteditable="true"]') -// .click() -// .type('{selectall}{del}A Manuscript For The Ages') - -// cy.get('[data-testid="meta.abstract"] div[contenteditable="true"]') -// .click() -// .type( -// `{selectall}{del}Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem.`, -// ) - -// cy.get('[data-testid="meta.keywords"]').type('quantum, machines, nature') - -// // TODO: Find a way to not match by partial class -// cy.get('[class*="Menu__Root"]').click() -// cy.get('[class*="Menu__Root"] [role="option"]:first').click() - -// // TODO: Find a way to remove the forces -// cy.get('[name="meta.articleSections"]:first').click({ force: true }) -// cy.get('[name="meta.declarations.openData"]:first').click({ force: true }) -// cy.get('[name="meta.declarations.previouslySubmitted"]:nth(1)').click({ -// force: true, -// }) -// cy.get('[name="meta.declarations.openPeerReview"]:first').click({ -// force: true, -// }) -// cy.get('[name="meta.declarations.streamlinedReview"]:nth(1)').click({ -// force: true, -// }) -// cy.get('[name="meta.declarations.researchNexus"]:nth(1)').click({ -// force: true, -// }) -// cy.get('[name="meta.declarations.preregistered"]:first').click({ -// force: true, -// }) - -// cy.get('[data-testid="suggestions.reviewers.suggested"]').type('Jane Doe') -// cy.get('[data-testid="suggestions.reviewers.opposed"]').type('James Doe') - -// cy.get('[data-testid="suggestions.editors.suggested"]').type('John Ode') -// cy.get('[data-testid="suggestions.editors.opposed"]').type('Gina Ode') - -// cy.get('[name="meta.notes.0.content"] div[contenteditable="true"]') -// .click() -// .type( -// 'This work was supported by the Trust [grant numbers 393,295]; the Natural Environment Research Council [grant number 49493].', -// ) -// cy.get('[name="meta.notes.1.content"] div[contenteditable="true"]') -// .click() -// .type('This is extremely divisive work, choose reviewers with care.') - -// cy.get('form button:last').click() -// cy.get('button[type="submit"]').click() - -// cy.visit('/dashboard') -// cy.contains('A Manuscript For The Ages') + cy.get('[data-testid="submission.contact"]') + .click() + .type('emily@example.com') -// // 3. Logout -// cy.get('nav button').click() + cy.get('[data-testid="submission.cover"] div[contenteditable="true"]') + .click() + .type('This is my cover letter') -// // 4. And login as admin -// login('admin', 'password') + cy.get('[data-testid="submission.datacode"] div[contenteditable="true"]') + .click() + .type('This is my data and code availability statement') -// cy.get('[data-testid="control-panel"]').click() + cy.get('[data-testid="submission.ethics"] div[contenteditable="true"]') + .click() + .type('This is my ethics statement') -// // 5. Assign senior editor -// // TODO: Find a way to not match by partial class -// cy.get('[class*="AssignEditor"] [class*="Menu__Root"]:first').click() -// cy.get( -// '[class*="AssignEditor"] [class*="Menu__Root"]:first [role="option"]:nth(1)', -// ).click() + cy.get('*[aria-label="Type of Research Object"]').click({ force: true }) + cy.get('#react-select-2-option-1').click() + cy.get('[data-testid="submission.suggested"]') + .click() + .type('Erica James, Matthew Matretzky') -// // 6. Assign handling editor -// cy.get('[class*="AssignEditor"] [class*="Menu__Root"]:nth(1)').click() -// cy.get( -// '[class*="AssignEditor"] [class*="Menu__Root"]:nth(1) [role="option"]:nth(2)', -// ).click() + cy.get('[data-testid="submission.links"]') + .click() + .type( + 'https://doi.org/10.6084/m9.figshare.913521.v1, https://github.com/jure/mathtype_to_mathml', + ) -// // 7. Logout -// cy.get('nav button').click() + cy.get('[data-testid="submission.keywords"]') + .click() + .type('some, keywords') -// // 8. And login as handling editor -// cy.wait(1000) -// login('heditor') -// cy.get('[data-testid="control-panel"]').click() + cy.get('*[aria-label*="healthy subjects only or patients"]').click({ + force: true, + }) + cy.get('#react-select-3-option-1').click() -// // 9. Assign reviewers -// cy.get('[class*="AssignEditorsReviewers"] a').click() + cy.get('*[aria-label*="involved human subjects"]').click({ + force: true, + }) + cy.get('#react-select-4-option-0').click() -// cy.get('.Select-control').click() -// cy.get('.Select-menu[role="listbox"] [role="option"]:nth(3)').click() -// cy.get('button[type="submit"]').click() -// cy.get('[class*="Reviewer__"]').should('have.length', 1) + cy.get('*[aria-label*="animal research approved"]').click({ + force: true, + }) + cy.get('#react-select-5-option-0').click() -// cy.get('.Select-control').click() -// cy.get('.Select-menu[role="listbox"] [role="option"]:nth(4)').click() -// cy.get('button[type="submit"]').click() -// cy.get('[class*="Reviewer__"]').should('have.length', 2) + cy.get('input[name="submission.methods"][value="Functional MRI"]').click() + cy.get('input[name="submission.methods"][value="Optical Imaging"]').click() -// cy.get('.Select-control').click() -// cy.get('.Select-menu[role="listbox"] [role="option"]:nth(5)').click() -// cy.get('button[type="submit"]').click() -// cy.get('[class*="Reviewer__"]').should('have.length', 3) + cy.get('[data-testid="submission.otherMethods"]') + .click() + .type('Erica James, Matthew Matretzky') -// // 10. Check that 3 reviewers are invited -// cy.contains('SimpleJ').click() -// cy.get('[data-testid="invited"]').contains('3') + cy.get('*[aria-label*="what field strength"]').click({ + force: true, + }) + cy.get('#react-select-6-option-3').click() -// // 11. Logout -// cy.get('nav button').click() + cy.get('[data-testid="submission.humanMRIother"]') + .click() + .type('7T') -// doReview( -// 'reviewer1', -// 'Great research into CC bases in the ky289 variant are mutated to TC which results in the truncation of the SAD-1.', -// 'Not too bad.', -// 0, -// ) -// doReview( -// 'reviewer2', -// 'Mediocre analysis of Iron-Sulfur ClUster assembly enzyme homolog.', -// 'It is so so.', -// 1, -// ) -// doReview( -// 'reviewer3', -// 'mTOR-Is positively influence the occurrence and course of certain tumors after solid organ transplantation.', -// 'It is not good.', -// 2, -// ) + cy.get('input[name="submission.packages"][value="SPM"]').click() + cy.get('input[name="submission.packages"][value="FSL"]').click() -// // 12. Log in as handling editor -// login('heditor') -// cy.get('[data-testid="completed"]').contains('3') + cy.get('[data-testid="submission.otherPackages"]') + .click() + .type('Jupyter, Stencila') -// cy.task('dump', '3reviewscompleted') -// }) + cy.get('[data-testid="submission.references"] div[contenteditable="true"]') + .click() + .type('Hyde, 2020') -// it('accept a submitted paper', () => { -// cy.task('restore', '3reviewscompleted') -// cy.visit('/dashboard') -// login('heditor') -// cy.get('[data-testid="completed"]').contains('3') + cy.get('button') + .contains('Submit your research object') + .click() + cy.get('button') + .contains('Submit your manuscript') + .click() -// cy.get('[data-testid="control-panel"]').click() -// cy.contains('reviewer1') -// cy.contains('reviewer2') -// cy.contains('reviewer3') + cy.get('body').contains('My Submissions') + cy.get('body').contains('My URL submission') -// // Write a decision -// cy.get('[placeholder*="Write/paste"] div[contenteditable="true"]') -// .focus() -// .type("Let's do this!") -// .blur() -// .wait(1000) -// cy.get(`[class*=Radio__Label]:nth(0)`) -// .click() -// .wait(1000) + cy.task('dump', 'submissioncomplete') + }) -// cy.get('button[type=submit]').click() -// cy.wait(2000) -// cy.visit('/dashboard') -// cy.contains('accepted') -// }) + it('senior editor can view the submission', () => { + cy.task('restore', 'submissioncomplete') -// it('can delete a submission', () => { -// cy.task('restore', '3reviewscompleted') -// cy.visit('/dashboard') -// login('admin') -// cy.get('button:contains("Delete")').click() -// cy.visit('/dashboard') -// cy.contains('Nothing to do at the moment') -// }) -// }) + // Admin logs in to assign senior editor + login('Sinead Sullivan') + cy.get('nav') + .contains('Manuscripts') + .click() + cy.get('a') + .contains('Control') + .click() + cy.contains('My URL submission') -// cy.task('db:seed') + cy.get('*[aria-label="Assign seniorEditor"]').click({ force: true }) + cy.get('*[id*="react-select"]') + .contains('Joanne Pilger') + .click() -// cy.visit('/dashboard') + login('Joanne Pilger') + cy.contains('My URL submission') -// // 1. Log in as author -// login('author') + cy.contains('Control Panel').click() + cy.contains('This is my data and code availability statement') + }) +}) -// // 2. Submit a PDF +// Example of a file upload +// 2. Submit a PDF // cy.fixture('test-pdf.pdf', 'base64').then(fileContent => { // cy.get('[data-testid="dropzone"]').upload( // { @@ -301,178 +160,4 @@ describe('URL submission test', () => { // { subjectType: 'drag-n-drop' }, // ) // }) - -// cy.get('body').contains('Submission information') -// cy.get('[data-testid="meta.title"]').contains('test pdf') -// cy.get('[data-testid="meta.title"] div[contenteditable="true"]') -// .click() -// .type('{selectall}{del}A Manuscript For The Ages') - -// cy.get('[data-testid="meta.abstract"] div[contenteditable="true"]') -// .click() -// .type( -// `{selectall}{del}Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem.`, -// ) - -// cy.get('[data-testid="meta.keywords"]').type('quantum, machines, nature') - -// // TODO: Find a way to not match by partial class -// cy.get('[class*="Menu__Root"]').click() -// cy.get('[class*="Menu__Root"] [role="option"]:first').click() - -// // TODO: Find a way to remove the forces -// cy.get('[name="meta.articleSections"]:first').click({ force: true }) -// cy.get('[name="meta.declarations.openData"]:first').click({ force: true }) -// cy.get('[name="meta.declarations.previouslySubmitted"]:nth(1)').click({ -// force: true, -// }) -// cy.get('[name="meta.declarations.openPeerReview"]:first').click({ -// force: true, -// }) -// cy.get('[name="meta.declarations.streamlinedReview"]:nth(1)').click({ -// force: true, -// }) -// cy.get('[name="meta.declarations.researchNexus"]:nth(1)').click({ -// force: true, -// }) -// cy.get('[name="meta.declarations.preregistered"]:first').click({ -// force: true, -// }) - -// cy.get('[data-testid="suggestions.reviewers.suggested"]').type('Jane Doe') -// cy.get('[data-testid="suggestions.reviewers.opposed"]').type('James Doe') - -// cy.get('[data-testid="suggestions.editors.suggested"]').type('John Ode') -// cy.get('[data-testid="suggestions.editors.opposed"]').type('Gina Ode') - -// cy.get('[name="meta.notes.0.content"] div[contenteditable="true"]') -// .click() -// .type( -// 'This work was supported by the Trust [grant numbers 393,295]; the Natural Environment Research Council [grant number 49493].', -// ) -// cy.get('[name="meta.notes.1.content"] div[contenteditable="true"]') -// .click() -// .type('This is extremely divisive work, choose reviewers with care.') - -// cy.get('form button:last').click() -// cy.get('button[type="submit"]').click() - -// cy.visit('/dashboard') -// cy.contains('A Manuscript For The Ages') - -// // 3. Logout -// cy.get('nav button').click() - -// // 4. And login as admin -// login('admin', 'password') - -// cy.get('[data-testid="control-panel"]').click() - -// // 5. Assign senior editor -// // TODO: Find a way to not match by partial class -// cy.get('[class*="AssignEditor"] [class*="Menu__Root"]:first').click() -// cy.get( -// '[class*="AssignEditor"] [class*="Menu__Root"]:first [role="option"]:nth(1)', -// ).click() - -// // 6. Assign handling editor -// cy.get('[class*="AssignEditor"] [class*="Menu__Root"]:nth(1)').click() -// cy.get( -// '[class*="AssignEditor"] [class*="Menu__Root"]:nth(1) [role="option"]:nth(2)', -// ).click() - -// // 7. Logout -// cy.get('nav button').click() - -// // 8. And login as handling editor -// cy.wait(1000) -// login('heditor') -// cy.get('[data-testid="control-panel"]').click() - -// // 9. Assign reviewers -// cy.get('[class*="AssignEditorsReviewers"] a').click() - -// cy.get('.Select-control').click() -// cy.get('.Select-menu[role="listbox"] [role="option"]:nth(3)').click() -// cy.get('button[type="submit"]').click() -// cy.get('[class*="Reviewer__"]').should('have.length', 1) - -// cy.get('.Select-control').click() -// cy.get('.Select-menu[role="listbox"] [role="option"]:nth(4)').click() -// cy.get('button[type="submit"]').click() -// cy.get('[class*="Reviewer__"]').should('have.length', 2) - -// cy.get('.Select-control').click() -// cy.get('.Select-menu[role="listbox"] [role="option"]:nth(5)').click() -// cy.get('button[type="submit"]').click() -// cy.get('[class*="Reviewer__"]').should('have.length', 3) - -// // 10. Check that 3 reviewers are invited -// cy.contains('SimpleJ').click() -// cy.get('[data-testid="invited"]').contains('3') - -// // 11. Logout -// cy.get('nav button').click() - -// doReview( -// 'reviewer1', -// 'Great research into CC bases in the ky289 variant are mutated to TC which results in the truncation of the SAD-1.', -// 'Not too bad.', -// 0, -// ) -// doReview( -// 'reviewer2', -// 'Mediocre analysis of Iron-Sulfur ClUster assembly enzyme homolog.', -// 'It is so so.', -// 1, -// ) -// doReview( -// 'reviewer3', -// 'mTOR-Is positively influence the occurrence and course of certain tumors after solid organ transplantation.', -// 'It is not good.', -// 2, -// ) - -// // 12. Log in as handling editor -// login('heditor') -// cy.get('[data-testid="completed"]').contains('3') - -// cy.task('dump', '3reviewscompleted') -// }) - -// it('accept a submitted paper', () => { -// cy.task('restore', '3reviewscompleted') -// cy.visit('/dashboard') -// login('heditor') -// cy.get('[data-testid="completed"]').contains('3') - -// cy.get('[data-testid="control-panel"]').click() -// cy.contains('reviewer1') -// cy.contains('reviewer2') -// cy.contains('reviewer3') - -// // Write a decision -// cy.get('[placeholder*="Write/paste"] div[contenteditable="true"]') -// .focus() -// .type("Let's do this!") -// .blur() -// .wait(1000) -// cy.get(`[class*=Radio__Label]:nth(0)`) -// .click() -// .wait(1000) - -// cy.get('button[type=submit]').click() -// cy.wait(2000) -// cy.visit('/dashboard') -// cy.contains('accepted') -// }) - -// it('can delete a submission', () => { -// cy.task('restore', '3reviewscompleted') -// cy.visit('/dashboard') -// login('admin') -// cy.get('button:contains("Delete")').click() -// cy.visit('/dashboard') -// cy.contains('Nothing to do at the moment') -// }) // }) diff --git a/cypress/videos/login_spec.js.mp4 b/cypress/videos/login_spec.js.mp4 index 9658c320291adae84b1acec0d0f44ec07e124453..677c7899add35cf4c405c59b7b5be934886774d4 100644 Binary files a/cypress/videos/login_spec.js.mp4 and b/cypress/videos/login_spec.js.mp4 differ diff --git a/cypress/videos/submission_spec.js.mp4 b/cypress/videos/submission_spec.js.mp4 index ae842ab2e8ba0ced7a6fa9db44426a41821b7d22..c15776f8fd7e373407ac86e60ffcfe1fa103290d 100644 Binary files a/cypress/videos/submission_spec.js.mp4 and b/cypress/videos/submission_spec.js.mp4 differ