diff --git a/.gitignore b/.gitignore
index 046c8a068..2771441e7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,3 @@
dist
node_modules
-cypress/videos
stats.html
diff --git a/cypress.config.ts b/cypress.config.ts
deleted file mode 100644
index ccd72c11d..000000000
--- a/cypress.config.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-import { defineConfig } from "cypress";
-
-export default defineConfig({
- viewportWidth: 1200,
- viewportHeight: 800,
- e2e: {
- baseUrl: "http://localhost:5173",
- setupNodeEvents(on, config) {
- // implement node event listeners here
- },
- },
-});
diff --git a/cypress/e2e/embeds.cy.ts b/cypress/e2e/embeds.cy.ts
deleted file mode 100644
index 2116fa165..000000000
--- a/cypress/e2e/embeds.cy.ts
+++ /dev/null
@@ -1,127 +0,0 @@
-describe("Embeds", () => {
- describe("hashtags", () => {
- it('should handle uppercase hashtags and ","', () => {
- cy.visit(
- "#/n/nevent1qqsrj5ns6wva3fcghlyx0hp7hhajqtqk3kuckp7xhhscrm4jl7futegpz9mhxue69uhkummnw3e82efwvdhk6qgswaehxw309ahx7um5wgh8w6twv5pkpt8l",
- );
-
- cy.findByRole("link", { name: "#Japan" }).should("be.visible");
- cy.findByRole("link", { name: "#kyudo" }).should("be.visible");
- cy.findByRole("link", { name: "#Shiseikan" }).should("be.visible");
- cy.findByRole("link", { name: "#Nostrasia" }).should("be.visible");
- });
- });
-
- describe("links", () => {
- it("embed trustless.computer links", () => {
- cy.visit(
- "#/n/nevent1qqsfn2mv3pe2v7jak4r5wnyengt36t0rx26w04hgysrmtpml8jnlk5cprdmhxue69uhkvet9v3ejumn0wd68ytnzv9hxgtmdv4kk2qgawaehxw309ahx7um5wgkhqatz9emk2mrvdaexgetj9ehx2aq2wry06",
- );
-
- cy.get('[href="https://trustless.computer/"]').should("be.visible");
- cy.get(
- '[href="https://mempool.space/tx/461c6f56015c94d74837b68c9d08f4b80e7db7ca1e5ac4c53d9aa8c76b667672"]',
- ).should("be.visible");
- });
-
- it("embeds links", () => {
- cy.visit(
- "#/n/nevent1qqsvg6kt4hl79qpp5p673g7ref6r0c5jvp4yys7mmvs4m50t30sy9dgpz9mhxue69uhkummnw3e82efwvdhk6qgjwaehxw309aex2mrp0yhxvdm69e5k7r3xlpe",
- );
-
- cy.get('[href="https://getalby.com/"]').should("exist");
- cy.get('[href="https://lightningaddress.com/"]').should("exist");
- cy.get('[href="https://snort.social/"]').should("exist");
- cy.get('[href="http://damus.io/"]').should("exist");
- cy.get('[href="https://vida.live/"]').should("exist");
- });
-
- it("embeds simplex.chat links", () => {
- cy.visit(
- "#/n/nevent1qqsymds0vlpp4f5s0dckjf4qz283pdsen0rmx8lu7ct6hpnxag2hpacpremhxue69uhkummnw3ez6un9d3shjtnwda4k7arpwfhjucm0d5q3qamnwvaz7tmwdaehgu3wwa5kueghxyq76",
- );
-
- cy.get(
- '[href="https://simplex.chat/contact#/?v=1-2&smp=smp%3A%2F%2F0YuTwO05YJWS8rkjn9eLJDjQhFKvIYd8d4xG8X1blIU%3D%40smp8.simplex.im%2FVlHiRmia02CDgga7w-uNb2FQZTZsj3UR%23%2F%3Fv%3D1-2%26dh%3DMCowBQYDK2VuAyEAd2GEWU9Zjrljhw8O4FldcxrqehkDWezXl-cWD-VkeEw%253D%26srv%3Dbeccx4yfxxbvyhqypaavemqurytl6hozr47wfc7uuecacjqdvwpw2xid.onion"]',
- ).should("be.visible");
- });
- });
-
- describe("Nostr links", () => {
- it("should embed noub1...", () => {
- cy.visit(
- "#/n/nevent1qqsd5yw7sntqfc4e7u4aempvgctry2plz653t9gpf97ctk5vc0ftskgpz3mhxue69uhhyetvv9ujuerpd46hxtnfduq3zamnwvaz7tmwdaehgun4v5hxxmmdfxdj3a",
- );
- cy.contains("Alby team");
-
- cy.get(".chakra-card")
- .first()
- .within(() => {
- cy.get('[href="#/u/npub13sajvl5ak6cpz4ycesl0e5v869r5sey5pt50l9mcy6uas0fqtpmscth4np"]').should("be.visible");
- cy.get('[href="#/u/npub167n5w6cj2wseqtmk26zllc7n28uv9c4vw28k2kht206vnghe5a7stgzu3r"]').should("be.visible");
-
- // make sure the leading @ is removed
- cy.get(".chakra-card__body").should("not.contain.text", "@@");
- });
- });
- });
-
- describe("youtube", () => {
- it("should embed playlists", () => {
- cy.visit(
- "#/n/nevent1qqs8w6e63smpr5ccmz4l0w5pvnkp6r7z2fxaadjwu2g74y95pl9xv0cpzpmhxue69uhkummnw3ezuamfdejszrthwden5te0dehhxtnvdakqqkgf54",
- );
-
- cy.findByTitle(/youtube video player/i).should("be.visible");
- cy.findByTitle(/youtube video player/i).should("have.attr", "src");
- });
- });
-
- describe("Music", () => {
- it("should handle wavlake links", () => {
- cy.visit(
- "#/n/nevent1qqsve4ud5v8gjds2f2h7exlmjvhqayu4s520pge7frpwe22wezny0pcpp4mhxue69uhkummn9ekx7mqprdmhxue69uhkvet9v3ejumn0wd68ytnzv9hxgtmdv4kk2mxs3z0",
- );
- cy.findByTitle("Wavlake Embed").should("be.visible");
- });
-
- it("should handle spotify links", () => {
- cy.visit(
- "#/n/nevent1qqsx0lz7m72qzq499exwhnfszvgwea8tv38x9wkv32yhkmwwmhgs7jgprdmhxue69uhkvet9v3ejumn0wd68ytnzv9hxgtmdv4kk25m3sln",
- );
- cy.findByTitle("Spotify List Embed").should("exist");
-
- cy.visit(
- "#/n/nevent1qqsqxkmz49hydf8ppa9k6x6zrcq7m4evhhlye0j3lcnz8hrl2q6np4spz3mhxue69uhhyetvv9ujuerpd46hxtnfdult02qz",
- );
- cy.findByTitle("Spotify Embed").should("exist");
- });
-
- it("should handle apple music links", () => {
- cy.visit(
- "#/n/nevent1qqs9kqt9d7r4zjpawcyl82x5qsn4hals4wn294dv95knrahs4mggwasprdmhxue69uhkvet9v3ejumn0wd68ytnzv9hxgtmdv4kk2whhzvz",
- );
- cy.findByTitle("Apple Music Embed").should("exist");
-
- cy.visit(
- "#/n/nevent1qqszyrz4uug75j4086kj4f8peg3g0v8g9f04zjxplnpq0uxljtthggqprdmhxue69uhkvet9v3ejumn0wd68ytnzv9hxgtmdv4kk2aeexmq",
- );
- cy.findByTitle("Apple Music List Embed").should("exist");
- });
-
- it("should handle Tidal playlist links", () => {
- cy.visit("#/n/nevent1qqsg4d6rvg3te0y7sa0xp8r2rgcrnqyp2jmddzm4ufnmqs36aa2247qpp4mhxue69uhkummn9ekx7mqacwd3t");
- cy.findByTitle("Tidal List Embed").should("be.visible");
- });
- });
-
- describe("Emoji", () => {
- it("should embed emojis", () => {
- cy.visit(
- "#/n/nevent1qqsdj7k47uh4z0ypl2m29lvd4ar9zpf6dcy7ls0q6g6qctnxfj5n3pcpzpmhxue69uhkummnw3ezuamfdejszrthwden5te0dehhxtnvdakqdyqlpq",
- );
-
- cy.findByRole("img", { name: /pepeD/i }).should("be.visible");
- });
- });
-});
diff --git a/cypress/e2e/login.cy.ts b/cypress/e2e/login.cy.ts
deleted file mode 100644
index 00a7770a5..000000000
--- a/cypress/e2e/login.cy.ts
+++ /dev/null
@@ -1,68 +0,0 @@
-describe("Login view", () => {
- beforeEach(() => {
- cy.visit("#/login");
-
- cy.window().then(($win) => {
- cy.stub($win, "prompt").returns("pass");
- });
- });
-
- it("login with nip05", () => {
- cy.intercept("get", "https://hzrd149.com/.well-known/nostr.json?name=_", {
- names: {
- _: "266815e0c9210dfa324c6cba3573b14bee49da4209a9456f9484e5106cd408a5",
- },
- relays: {
- "266815e0c9210dfa324c6cba3573b14bee49da4209a9456f9484e5106cd408a5": ["wss://nostrue.com"],
- },
- });
-
- cy.findByRole("link", { name: /nip-05/i }).click();
-
- cy.findByRole("textbox", { name: /nip-05/i }).type("_@hzrd149.com");
- cy.contains(/found 1 relays/i);
- cy.findByRole("button", { name: /login/i }).click();
-
- cy.findByRole("button", { name: "Home" }).should("be.visible");
- });
-
- it("login with npub", () => {
- cy.findByRole("link", { name: /npub/i }).click();
- cy.findByRole("textbox", { name: /npub/i }).type("npub1ye5ptcxfyyxl5vjvdjar2ua3f0hynkjzpx552mu5snj3qmx5pzjscpknpr");
- cy.findByRole("combobox", { name: /bootstrap relay/i })
- .clear()
- .type("wss://nostrue.com");
- cy.findByRole("button", { name: /login/i }).click();
-
- cy.findByRole("button", { name: "Home" }).should("be.visible");
- });
-
- it("login with new nsec", () => {
- cy.findByRole("link", { name: /nsec/i }).click();
- cy.findByRole("button", { name: /generate/i }).click();
- cy.findByRole("combobox", { name: /bootstrap relay/i })
- .clear()
- .type("wss://nostrue.com");
- cy.findByRole("button", { name: /login/i }).click();
-
- cy.findByRole("button", { name: "Home" }).should("be.visible");
- });
-
- it("should redirect after login", () => {
- cy.visit(
- "#/n/nevent1qqs88gdxv36qsjfwr66k7wxuq9r2tg8rsdcnfkcqdg4sc6vlnsma98qpzpmhxue69uhkummnw3ezuamfdejsz9rhwden5te0wfjkccte9ejxzmt4wvhxjmccew89d",
- );
-
- cy.findByRole("link", { name: /login/i }).click();
-
- cy.findByRole("link", { name: /nsec/i }).click();
- cy.findByRole("button", { name: /generate/i }).click();
- cy.findByRole("combobox", { name: /bootstrap relay/i })
- .clear()
- .type("wss://nostrue.com");
- cy.findByRole("button", { name: /login/i }).click();
-
- // should be redirect to note
- cy.contains(/GM, and happy bday to your son/i);
- });
-});
diff --git a/cypress/e2e/profile.cy.ts b/cypress/e2e/profile.cy.ts
deleted file mode 100644
index 5f6d3ad38..000000000
--- a/cypress/e2e/profile.cy.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-describe("Profile view", () => {
- it("should load a rss feed profile", () => {
- cy.visit(
- "#/u/nprofile1qqsp6hxqjatvxtesgszs8aee0fcjccxa3ef3mzjva4uv2yr5lucp6jcpzemhxue69uhhyumnd3shjtnwdaehgu3wd4hk2s8c5un",
- );
-
- cy.contains("fjsmu");
- cy.contains("https://rsshub.app/pixiv/user/7569500@rsslay.nostr.moe");
- });
-
- it("should load PABLOF7z", () => {
- cy.visit("#/u/npub1l2vyh47mk2p0qlsku7hg0vn29faehy9hy34ygaclpn66ukqp3afqutajft");
-
- cy.contains("npub1l2vyh...3afqutajft");
- });
-});
diff --git a/cypress/e2e/public.cy.ts b/cypress/e2e/public.cy.ts
deleted file mode 100644
index 499d320b2..000000000
--- a/cypress/e2e/public.cy.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-describe("No account", () => {
- describe("note view", () => {
- it("should fetch and render note", () => {
- cy.visit(
- "#/n/nevent1qqs84hwdlls703w4yf66qsszxjqfc0xselfxrzr6n4qp40vzdnczragpr4mhxue69uhkummnw3ez6ur4vgh8wetvd3hhyer9wghxuet5jcwczn",
- );
-
- cy.get(".chakra-card")
- .first()
- .within(() => {
- // check for note content
- cy.contains('I didn\'t know someone had taken the "rsslay" idea and made it good');
-
- // check for author name
- cy.get(".chakra-card__header .chakra-heading .chakra-link").should("not.contain", "npub");
- });
-
- // check for multiple replies
- cy.get(".chakra-card").should("have.length.above", 2);
- });
- });
-});
diff --git a/cypress/e2e/search.cy.ts b/cypress/e2e/search.cy.ts
deleted file mode 100644
index 7f2025f5f..000000000
--- a/cypress/e2e/search.cy.ts
+++ /dev/null
@@ -1,69 +0,0 @@
-describe("Search", () => {
- describe("Events", () => {
- const links: [string, RegExp][] = [
- [
- "nostr:nevent1qqsvg6kt4hl79qpp5p673g7ref6r0c5jvp4yys7mmvs4m50t30sy9dgpp4mhxue69uhkummn9ekx7mqpr4mhxue69uhkummnw3ez6ur4vgh8wetvd3hhyer9wghxuet59dl66z",
- /Nostr zaps - a guide/i,
- ],
- ["nostr:note10twumllpulza2gn45ppqydyqns7dpn7jvxy8482qr27cym8sy86sgxe3c8", /someone had taken/i],
- ];
-
- for (const [link, regexp] of links) {
- it(`should handle ${link}`, () => {
- cy.visit("#/search");
- cy.findByRole("searchbox").type(link, { delay: 0 }).type("{enter}");
-
- cy.contains(regexp).should("be.visible");
- });
- }
-
- for (const [link, regexp] of links) {
- const withoutPrefix = link.replace("nostr:", "");
- it(`should handle ${withoutPrefix}`, () => {
- cy.visit("#/search");
- cy.findByRole("searchbox").type(link, { delay: 0 }).type("{enter}");
-
- cy.contains(regexp).should("be.visible");
- });
- }
- });
-
- describe("Profiles", () => {
- const profiles: [string, RegExp][] = [
- [
- "nostr:nprofile1qqsp2alytxwazryxxjv0u0pqhkp247hc9xjetn5rch8c4s6xx5cmpxcpzpmhxue69uhkummnw3ezuamfdejsz9nhwden5te0v96xcctn9ehx7um5wghxcctwvs6ymk33",
- /npub1z4m7g\.\.\.kzdsxana6p/i,
- ],
- ["nostr:npub180cvv07tjdrrgpa0j7j7tmnyl2yr6yr7l8j4s3evf6u64th6gkwsyjh6w6", /npub180cvv\.\.\.gkwsyjh6w6/i],
- ];
-
- for (const [search, regexp] of profiles) {
- it(`should handle ${search}`, () => {
- cy.visit("#/search");
- cy.findByRole("searchbox").type(search, { delay: 0 }).type("{enter}");
-
- cy.contains(regexp).should("be.visible");
- });
- }
-
- for (const [search, regexp] of profiles) {
- const withoutPrefix = search.replace("nostr:", "");
- it(`should handle ${withoutPrefix}`, () => {
- cy.visit("#/search");
- cy.findByRole("searchbox").type(search, { delay: 0 }).type("{enter}");
-
- cy.contains(regexp).should("be.visible");
- });
- }
- });
-
- describe("Hashtag", () => {
- it("should redirect to hashtag view", () => {
- cy.visit("#/search");
- cy.findByRole("searchbox").type("#bitcoin").type("{enter}");
-
- cy.url().should("contain", "/t/bitcoin");
- cy.contains("#bitcoin");
- });
- });
-});
diff --git a/cypress/e2e/thread.cy.ts b/cypress/e2e/thread.cy.ts
deleted file mode 100644
index 0a1d37156..000000000
--- a/cypress/e2e/thread.cy.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-describe("Thread", () => {
- it("should handle quote notes with e tags correctly", () => {
- cy.visit(
- "#/n/nevent1qqsx2lnyuke6vmsrz9fdrd6uwjy0g0e9l6menfgdj5truugkh9qmkkgpzpmhxue69uhkummnw3ezuamfdejszrthwden5te0dehhxtnvdakqgc9md6",
- );
-
- // find first note
- cy.get(".chakra-card")
- .first()
- .within(() => {
- // get quoted note
- cy.get(".chakra-card").within(() => {
- cy.contains(/looking for people to send money/);
- });
- });
- });
-});
diff --git a/cypress/support/commands.ts b/cypress/support/commands.ts
deleted file mode 100644
index 0d3f6897a..000000000
--- a/cypress/support/commands.ts
+++ /dev/null
@@ -1,53 +0,0 @@
-///
-import "@testing-library/cypress/add-commands";
-
-// ***********************************************
-// This example commands.ts shows you how to
-// create various custom commands and overwrite
-// existing commands.
-//
-// For more comprehensive examples of custom
-// commands please read more here:
-// https://on.cypress.io/custom-commands
-// ***********************************************
-//
-//
-// -- This is a parent command --
-// Cypress.Commands.add('login', (email, password) => { ... })
-//
-//
-// -- This is a child command --
-// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... })
-//
-//
-// -- This is a dual command --
-// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... })
-//
-//
-// -- This will overwrite an existing command --
-// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
-//
-declare global {
- namespace Cypress {
- interface Chainable {
- loginWithNewUser(): Chainable;
- }
- }
-}
-
-Cypress.Commands.add("loginWithNewUser", () => {
- cy.visit("/login");
-
- cy.window().then(($win) => {
- cy.stub($win, "prompt").returns("pass");
- });
-
- cy.findByRole("link", { name: /nsec/i }).click();
- cy.findByRole("button", { name: /generate/i }).click();
- cy.findByRole("combobox", { name: /bootstrap relay/i })
- .clear()
- .type("wss://nostrue.com", { delay: 0 });
- cy.findByRole("button", { name: /login/i }).click();
-
- cy.findByRole("button", { name: "Home" }).should("be.visible");
-});
diff --git a/cypress/support/e2e.ts b/cypress/support/e2e.ts
deleted file mode 100644
index 3782fdbae..000000000
--- a/cypress/support/e2e.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-// ***********************************************************
-// This example support/e2e.ts is processed and
-// loaded automatically before your test files.
-//
-// This is a great place to put global configuration and
-// behavior that modifies Cypress.
-//
-// You can change the location of this file or turn off
-// automatically serving support files with the
-// 'supportFile' configuration option.
-//
-// You can read more here:
-// https://on.cypress.io/configuration
-// ***********************************************************
-
-// Import commands.js using ES2015 syntax:
-import "./commands";
-
-// Alternatively you can use CommonJS syntax:
-// require('./commands')
-
-beforeEach(() => {
- cy.clearAllLocalStorage();
-
- // remove the database for every test
- new Promise((res, rej) => {
- const request = window.indexedDB.deleteDatabase("storage");
- request.onsuccess = res;
- request.onerror = rej;
- });
-});
diff --git a/cypress/tsconfig.json b/cypress/tsconfig.json
deleted file mode 100644
index 6c7b010d4..000000000
--- a/cypress/tsconfig.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "$schema": "https://json.schemastore.org/tsconfig",
- "extends": "../tsconfig.json",
- "include": ["../next-env.d.ts", "../cypress.config.ts", "**/*.ts", "**/*.tsx"],
- "compilerOptions": {
- "types": ["cypress", "@testing-library/cypress", "next"]
- }
-}
diff --git a/package.json b/package.json
index aba737a9e..038466dee 100644
--- a/package.json
+++ b/package.json
@@ -8,8 +8,6 @@
"dev": "VITE_APP_VERSION=development vite serve",
"build": "tsc --project tsconfig.json && vite build",
"format": "prettier --ignore-path .prettierignore -w .",
- "e2e": "cypress open",
- "test": "cypress run --e2e --browser=chrome",
"analyze": "npx vite-bundle-visualizer -o ./stats.html",
"build-icons": "node ./scripts/build-icons.mjs"
},
@@ -67,7 +65,6 @@
},
"devDependencies": {
"@changesets/cli": "^2.26.2",
- "@testing-library/cypress": "^9.0.0",
"@types/chroma-js": "^2.4.1",
"@types/debug": "^4.1.8",
"@types/identicon.js": "^2.3.1",
@@ -80,7 +77,6 @@
"@types/webscopeio__react-textarea-autocomplete": "^4.7.2",
"@vitejs/plugin-react": "^4.0.4",
"camelcase": "^8.0.0",
- "cypress": "^12.17.4",
"prettier": "^3.0.2",
"typescript": "^5.1.6",
"vite": "^4.4.9",
diff --git a/src/app.tsx b/src/app.tsx
index ca4359686..cc31ab6b5 100644
--- a/src/app.tsx
+++ b/src/app.tsx
@@ -19,11 +19,11 @@ import NotificationsView from "./views/notifications";
import DirectMessagesView from "./views/messages";
import DirectMessageChatView from "./views/messages/chat";
-import LoginView from "./views/login";
-import LoginStartView from "./views/login/start";
-import LoginNpubView from "./views/login/npub";
-import LoginNip05View from "./views/login/nip05";
-import LoginNsecView from "./views/login/nsec";
+import LoginView from "./views/signin";
+import LoginStartView from "./views/signin/start";
+import LoginNpubView from "./views/signin/npub";
+import LoginNip05View from "./views/signin/nip05";
+import LoginNsecView from "./views/signin/nsec";
import UserView from "./views/user";
import UserNotesTab from "./views/user/notes";
@@ -67,6 +67,7 @@ import RelayView from "./views/relays/relay";
import RelayReviewsView from "./views/relays/reviews";
import PopularRelaysView from "./views/relays/popular";
import UserTracksTab from "./views/user/tracks";
+import SignupView from "./views/signup";
const ToolsHomeView = React.lazy(() => import("./views/tools"));
const NetworkView = React.lazy(() => import("./views/tools/network"));
@@ -122,7 +123,7 @@ const RootPage = () => {
const router = createHashRouter([
{
- path: "login",
+ path: "signin",
element: ,
children: [
{ path: "", element: },
@@ -131,6 +132,10 @@ const router = createHashRouter([
{ path: "nsec", element: },
],
},
+ {
+ path: "signup",
+ element: ,
+ },
{
path: "streams/:naddr",
element: (
diff --git a/src/components/layout/account-switcher.tsx b/src/components/layout/account-switcher.tsx
index 57b7da8d1..8fe4ab2be 100644
--- a/src/components/layout/account-switcher.tsx
+++ b/src/components/layout/account-switcher.tsx
@@ -83,7 +83,7 @@ export default function AccountSwitcher() {
leftIcon={}
onClick={() => {
accountService.logout();
- navigate("/login", { state: { from: location.pathname } });
+ navigate("/signin", { state: { from: location.pathname } });
}}
>
Add Account
diff --git a/src/components/layout/desktop-side-nav.tsx b/src/components/layout/desktop-side-nav.tsx
index 4a6041b76..a298b0c62 100644
--- a/src/components/layout/desktop-side-nav.tsx
+++ b/src/components/layout/desktop-side-nav.tsx
@@ -64,8 +64,8 @@ export default function DesktopSideNav(props: Omit) {
{!account && (
-