Skip to content

Commit 2e55915

Browse files
authored
Merge pull request #1569 from visualize-admin/fix/tests
Repairing tests
2 parents 2dd9fd3 + 8b1929c commit 2e55915

60 files changed

Lines changed: 467 additions & 143 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/chromatic.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
push-storybook:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v3
11+
- uses: actions/checkout@v4
1212
with:
1313
fetch-depth: 0
1414
- name: Setup node

.github/workflows/docker-build-dev.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
docker-build:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v2
9+
- uses: actions/checkout@v3
1010
- uses: docker/build-push-action@v1
1111
with:
1212
registry: docker.pkg.github.com

.github/workflows/docker-build-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
docker-build:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v2
9+
- uses: actions/checkout@v3
1010
- uses: docker/build-push-action@v1
1111
with:
1212
registry: docker.pkg.github.com

.github/workflows/e2e.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
if: github.event.deployment_status.state == 'success'
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/checkout@v3
10+
- uses: actions/checkout@v4
1111
with:
1212
# fetch all commits so we can find the branch
1313
fetch-depth: 0
@@ -20,12 +20,12 @@ jobs:
2020
- name: Install Playwright Browsers
2121
run: npx playwright install --with-deps chromium
2222
- name: Run Playwright tests
23-
run: yarn e2e
23+
run: yarn e2e -- --grep-invert @noci
2424
env:
2525
E2E_BASE_URL: ${{ github.event.deployment_status.target_url }}
2626
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
2727
- name: Upload E2E artifacts to job
28-
uses: actions/upload-artifact@v2
28+
uses: actions/upload-artifact@v3
2929
if: failure()
3030
with:
3131
name: e2e-screenshots

.github/workflows/lint-types.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
lint-typecheck-test:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v3
13+
- uses: actions/checkout@v4
1414
- name: Setup node
1515
uses: actions/setup-node@v3
1616
with:

.github/workflows/performance-tests-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- name: Check out
17-
uses: actions/checkout@v2
17+
uses: actions/checkout@v3
1818
- name: Send an HTTP request to start up the server
1919
run: |
2020
curl -s '${{ github.event.deployment_status.target_url }}/api/graphql' -X 'POST' -H 'Content-Type: application/json' -d '{"operationName":"DataCubeObservations","variables":{"locale":"en","sourceType":"sparql","sourceUrl":"https://lindas.admin.ch/query","cubeFilter":{"iri":"https://energy.ld.admin.ch/sfoe/bfe_ogd84_einmalverguetung_fuer_photovoltaikanlagen/9","filters":{"https://energy.ld.admin.ch/sfoe/bfe_ogd84_einmalverguetung_fuer_photovoltaikanlagen/Kanton":{"type":"single","value":"https://ld.admin.ch/canton/1"}}}},"query":"query DataCubeObservations($sourceType: String!, $sourceUrl: String!, $locale: String!, $cubeFilter: DataCubeObservationFilter!) { dataCubeObservations(sourceType: $sourceType, sourceUrl: $sourceUrl, locale: $locale, cubeFilter: $cubeFilter) }"}' > /dev/null

.github/workflows/performance-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Check out
16-
uses: actions/checkout@v2
16+
uses: actions/checkout@v3
1717
- name: Download, unzip and install k6 binary
1818
run: |
1919
wget https://github.com/grafana/k6/releases/download/v0.49.0/k6-v0.49.0-linux-amd64.tar.gz

app/flags/types.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,6 @@ export type FlagName =
1414
/** Whether we can use shared filters on dashboard layout */
1515
| "layouter.dashboard.shared-filters"
1616
/** Whether server side cache is disabled */
17-
| "server-side-cache.disable";
17+
| "server-side-cache.disable"
18+
/** The GraphQL endpoint, is used for testing purposes */
19+
| "graphql.endpoint";

app/graphql/client.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,12 @@ import { flag } from "@/flags/flag";
55
// @ts-ignore - dynamic package import based on NODE_ENV
66
import { devtoolsExchanges } from "@/graphql/devtools";
77

8+
const graphqlEndpointFlag = flag("graphql.endpoint");
9+
if (graphqlEndpointFlag) {
10+
console.log("ℹ️ Using custom GraphQL endpoint:", graphqlEndpointFlag);
11+
}
812
export const client = createClient({
9-
url: GRAPHQL_ENDPOINT,
13+
url: graphqlEndpointFlag ?? GRAPHQL_ENDPOINT,
1014
exchanges: [...devtoolsExchanges, ...defaultExchanges],
1115
fetchOptions: {
1216
headers: getHeaders(),

app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@
144144
"@percy/cli": "^1.26.1",
145145
"@percy/playwright": "^1.0.4",
146146
"@playwright-testing-library/test": "^4.5.0",
147-
"@playwright/test": "^1.32.1",
147+
"@playwright/test": "^1.44.1",
148148
"@svgr/cli": "^5.5.0",
149149
"@testing-library/react": "^14.1.2",
150150
"@types/autosuggest-highlight": "^3.2.0",

0 commit comments

Comments
 (0)