Skip to content

Commit

Permalink
Merge pull request #80 from zkLinkProtocol/build/base-url
Browse files Browse the repository at this point in the history
build: rm /bridge from base url
  • Loading branch information
zkcarter authored Apr 4, 2024
2 parents 041fce6 + d92182a commit abc0af3
Show file tree
Hide file tree
Showing 13 changed files with 38 additions and 38 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/feature.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ jobs:
- name: Reorganize Files
run: |
mkdir -p dist/bridge
mv dist/_nuxt dist/bridge/_nuxt
mkdir -p dist
mv dist/_nuxt dist/_nuxt
- name: Deploy
uses: matter-labs/action-hosting-deploy@main
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ jobs:
- name: Reorganize Files
run: |
mkdir -p dist/bridge
mv dist/_nuxt dist/bridge/_nuxt
mkdir -p dist
mv dist/_nuxt dist/_nuxt
- name: Deploy to Production
uses: matter-labs/action-hosting-deploy@main
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ jobs:
- name: Reorganize Files
run: |
mkdir -p dist/bridge
mv dist/_nuxt dist/bridge/_nuxt
mkdir -p dist
mv dist/_nuxt dist/_nuxt
- name: Deploy
uses: matter-labs/action-hosting-deploy@main
Expand Down
2 changes: 1 addition & 1 deletion firebase.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"ignore": ["firebase.json", "**/.*", "**/node_modules/**", "**/*.map"],
"rewrites": [
{
"source": "/bridge/**",
"source": "/**",
"destination": "/index.html"
}
],
Expand Down
2 changes: 1 addition & 1 deletion nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { portal as portalMeta } from "./data/meta";
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
app: {
baseURL: "/bridge",
// baseURL: "/",
head: {
htmlAttrs: {
lang: "en",
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
"generate": "nuxt generate && npm run generate-meta",
"generate:node:memory": "cross-env NODE_TYPE=memory npm run generate",
"generate:node:docker": "cross-env NODE_TYPE=dockerized npm run generate",
"generate:node:nexus": "cross-env NODE_TYPE=nexus npm run generate && mkdir -p dist/bridge && mv dist/_nuxt dist/bridge/_nuxt",
"generate:node:nexus-goerli": "cross-env NODE_TYPE=nexus-goerli npm run generate && mkdir -p dist/bridge && mv dist/_nuxt dist/bridge/_nuxt",
"generate:node:nexus-sepolia": "cross-env NODE_TYPE=nexus-sepolia npm run generate && mkdir -p dist/bridge && mv dist/_nuxt dist/bridge/_nuxt",
"generate:node:nexus": "cross-env NODE_TYPE=nexus npm run generate",
"generate:node:nexus-goerli": "cross-env NODE_TYPE=nexus-goerli npm run generate",
"generate:node:nexus-sepolia": "cross-env NODE_TYPE=nexus-sepolia npm run generate",
"generate:node:hyperchain": "ts-node --transpile-only scripts/hyperchains/empty-check.ts && cross-env NODE_TYPE=hyperchain npm run generate",
"generate-meta": "ts-node --transpile-only scripts/updateBridgeMetaTags.ts",
"hyperchain:create": "ts-node --transpile-only scripts/hyperchains/create.ts",
Expand Down
12 changes: 6 additions & 6 deletions plugins/redirects.client.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
export default defineNuxtPlugin(() => {
const currentUrl = new URL(window.location.href);

if (currentUrl.pathname === "/") {
const newUrl = new URL(currentUrl.href);
newUrl.pathname = "/bridge";
navigateTo(newUrl.href, { external: true });
return;
}
// if (currentUrl.pathname === "/") {
// const newUrl = new URL(currentUrl.href);
// newUrl.pathname = "/";
// navigateTo(newUrl.href, { external: true });
// return;
// }

const redirectNetworks = ["goerli", "sepolia"];
for (const network of redirectNetworks) {
Expand Down
12 changes: 6 additions & 6 deletions scripts/create-release-assets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ set -e

# Run the first npm command and move folder
npm run generate:node:memory
mkdir -p dist/bridge
mv dist/_nuxt dist/bridge/_nuxt
mkdir -p dist
mv dist/_nuxt dist/_nuxt
mv .output/public ./dist-node-memory

# Run the second npm command and move folder
npm run generate:node:docker
mkdir -p dist/bridge
mv dist/_nuxt dist/bridge/_nuxt
mkdir -p dist
mv dist/_nuxt dist/_nuxt
mv .output/public ./dist-node-docker

# Run the final npm command
npm run generate
mkdir -p dist/bridge
mv dist/_nuxt dist/bridge/_nuxt
mkdir -p dist
mv dist/_nuxt dist/_nuxt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Feature: Artifacts - UI
@id1678
Scenario: Check "Insufficient balance" warning message (Zero token balance) (Bridge)
Then A wallet should be "empty"
When I go to page "/bridge?network=era-goerli"
When I go to page "/?network=era-goerli"
When I click by text "Withdraw"
When I choose "ETH" as token and insert "1000" as amount
Then Message " Insufficient balance " should be visible
Expand Down
22 changes: 11 additions & 11 deletions tests/e2e/features/artifacts/bridgePage/artifacts.feature
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Feature: Withdraw

@id1602
Scenario: Check the Account Dropdown Artifacts on the Bridge Page
Given I go to page "/bridge?network=era-goerli"
Given I go to page "/?network=era-goerli"
#click on the account dropdown
When I click by partial text "..."
Then Modal card element with the "//*[contains(@class, 'address-avatar')]" xpath should be "visible"
Expand All @@ -24,7 +24,7 @@ Feature: Withdraw

@id1603
Scenario: Check the Network Switcher Artifacts on the Bridge Page
Given I go to page "/bridge?network=era-goerli"
Given I go to page "/?network=era-goerli"
#click on the account dropdown
When I click by partial text "..."
Then Element with "text" "Bridge network" should be "visible"
Expand All @@ -35,7 +35,7 @@ Feature: Withdraw

@id1604:I
Scenario: Check the View on Explorer Artifacts on the Bridge Page (Testnet)
Given I go to page "/bridge?network=era-goerli"
Given I go to page "/?network=era-goerli"
#click on the account dropdown
When I click by partial text "..."
Then Element with "text" "View on Explorer" should be "visible"
Expand All @@ -51,7 +51,7 @@ Feature: Withdraw

@id1604:II
Scenario: Check the View on Explorer Artifacts on the Bridge Page (Mainnet)
Given I go to page "/bridge?network=era-mainnet"
Given I go to page "/?network=era-mainnet"
#click on the account dropdown
When I click by partial text "..."
Then Element with "text" "View on Explorer" should be "visible"
Expand All @@ -67,7 +67,7 @@ Feature: Withdraw

@id1597
Scenario: Check the Bridge artifacts on Withdraw (Testnet)
Given I go to page "/bridge?network=era-goerli"
Given I go to page "/?network=era-goerli"
When I click by text "Withdraw"
Then Element with "text" "Bridge" should be "visible"
Then Element with "partial text" "Recent withdrawals" should be "visible"
Expand Down Expand Up @@ -100,7 +100,7 @@ Feature: Withdraw

@id1613
Scenario: Check the Bridge To artifacts on Withdraw (Testnet)
Given I go to page "/bridge?network=era-goerli"
Given I go to page "/?network=era-goerli"
When I click by text "Withdraw"
When I click by "text" with "Your Ethereum Goerli Testnet account" value
Then Element with "text" "Bridge to" should be "visible"
Expand All @@ -120,7 +120,7 @@ Feature: Withdraw
@id1599
Scenario: Check the Bridge artifacts on Withdraw: a wallet is not connected
Given I'm logged out
Given I go to page "/bridge?network=era-goerli"
Given I go to page "/?network=era-goerli"
Then Element with "text" "Bridge" should be "visible"
When I click by text "Withdraw"
Then Element with "text" " Connect wallet " should be "visible"
Expand All @@ -135,7 +135,7 @@ Feature: Withdraw

@id1612
Scenario: Check the editing recipient address in Bridge (Withdraw)
Given I go to page "/bridge?network=era-goerli"
Given I go to page "/?network=era-goerli"
When I click by text "Withdraw"
When I click by "text" with "Your Ethereum Goerli Testnet account" value
Then Element with "text" "Bridge to" should be "visible"
Expand All @@ -146,7 +146,7 @@ Feature: Withdraw

@id756
Scenario: Check the Bridge artifacts on Deposit (Testnet)
Given I go to page "/bridge?network=era-goerli"
Given I go to page "/?network=era-goerli"
Then Element with "text" "Bridge" should be "visible"
Then Element with "text" "Deposit" should be "visible"
Then Element with "text" "Withdraw" should be "visible"
Expand Down Expand Up @@ -182,7 +182,7 @@ Feature: Withdraw
@id1598
Scenario: Check the Bridge artifacts on Deposit: a wallet is not connected
Given I'm logged out
Given I go to page "/bridge?network=era-goerli"
Given I go to page "/?network=era-goerli"
Then Element with "text" "Bridge" should be "visible"
When I click by text "Deposit"
Then Element with "text" " Connect wallet " should be "visible"
Expand All @@ -197,7 +197,7 @@ Feature: Withdraw

@id1611
Scenario: Check the editing recipient address in Bridge (Deposit)
Given I go to page "/bridge?network=era-goerli"
Given I go to page "/?network=era-goerli"
When I click by text "Deposit"
When I click by "text" with "Your zkSync Era Testnet account" value
Then Element with "text" "Bridge to" should be "visible"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ Feature: External Redirection on the Main Page

@id1610
Scenario: Check redirection for the "Explore ecosystem" button (Withdraw Bridge)
Given I go to page "/bridge?network=era-goerli"
Given I go to page "/?network=era-goerli"
When I click by text "Withdraw"
When I choose "ETH" as token and insert "0.0000000001" as amount
When I "confirm" transaction after clicking "Send to Ethereum Goerli Testnet" button
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Feature: Deposit

@id785 @id1609 @id1607
Scenario: Make a deposit on Bridge (Deposit)
Given I go to page "/bridge?network=era-goerli"
Given I go to page "/?network=era-goerli"
When I click by text "Deposit"
Then Element with "id" "amount-input" should have "" "value"
Then Element with "testId" "fee-amount" should be "visible"
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/features/transactions/withdraw.feature
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Feature: Withdraw

@id1601 @id1608 @id1694
Scenario: make a Withdraw (Bridge)
Given I go to page "/bridge?network=era-goerli"
Given I go to page "/?network=era-goerli"
When I click by text "Withdraw"
When I choose "ETH" as token and insert "0.0000000001" as amount
When I "confirm" transaction after clicking "Send to Ethereum Goerli Testnet" button
Expand Down

0 comments on commit abc0af3

Please sign in to comment.