Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

E2e folder page #1742

Open
wants to merge 29 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
fee966c
Added tests for most folder logic
MaPoKen Feb 1, 2024
a14a789
Added MyFolder tests
MaPoKen Feb 5, 2024
05cdd68
Added delete/add method
MaPoKen Feb 5, 2024
6c23db6
Merge branch 'master' of https://github.com/NDLANO/ndla-frontend into…
MaPoKen Feb 5, 2024
aebb347
remove repeat 10 times config
MaPoKen Feb 6, 2024
538f22d
Updated e2e and add test
MaPoKen Feb 12, 2024
c8d866f
Merge branch 'master' of github.com:NDLANO/ndla-frontend into e2e-fol…
MaPoKen Mar 4, 2024
6d0da5a
Merge branch 'master' of github.com:NDLANO/ndla-frontend into e2e-fol…
MaPoKen Mar 12, 2024
2d27b76
Updated list of inputs
MaPoKen Mar 12, 2024
56be259
Merge branch 'master' of github.com:NDLANO/ndla-frontend into e2e-fol…
MaPoKen Apr 16, 2024
6378bb0
Add changes from master
MaPoKen Apr 16, 2024
7e66733
Merge branch 'master' of github.com:NDLANO/ndla-frontend into e2e-fol…
MaPoKen Apr 17, 2024
3c53a96
Merged master to resolve flakyness
MaPoKen Apr 17, 2024
cf5229a
Merge branch 'master' of github.com:NDLANO/ndla-frontend into e2e-fol…
MaPoKen May 14, 2024
261633b
Updated myNdlaMenu test
MaPoKen May 14, 2024
285f2c1
Merge branch 'master' of github.com:NDLANO/ndla-frontend into e2e-fol…
MaPoKen May 28, 2024
b8aea2f
Merge branch 'master' of github.com:NDLANO/ndla-frontend into e2e-fol…
MaPoKen May 30, 2024
49dc063
Updated har mocks
MaPoKen May 30, 2024
297eb45
force 1 worker ci
MaPoKen May 30, 2024
60f4f20
Bump playwright
MaPoKen May 30, 2024
4bb34d8
arbitrary changes
MaPoKen May 30, 2024
3e4eff0
Decrease batch interval
MaPoKen May 30, 2024
5eab664
try without batches
MaPoKen May 30, 2024
856a89d
E2E now starts server
MaPoKen May 31, 2024
fb47a3d
Removed unecessary config changes
MaPoKen May 31, 2024
461524d
Merge branch 'master' of github.com:NDLANO/ndla-frontend into e2e-fol…
MaPoKen Jun 26, 2024
007e45b
Removed start server on record
MaPoKen Jun 26, 2024
66c3f9e
Merge branch 'master' of github.com:NDLANO/ndla-frontend into e2e-fol…
MaPoKen Oct 31, 2024
2788f7d
Adjust playwright config for fast runtime
MaPoKen Nov 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"log":{"version":"1.2","creator":{"name":"Playwright","version":"1.43.1"},"browser":{"name":"chromium","version":"124.0.6367.29"},"entries":[{"startedDateTime":"2024-10-25T08:03:46.950Z","time":148.703,"request":{"method":"POST","url":"https://api.test.ndla.no/graphql-api/graphql","httpVersion":"HTTP/2.0","cookies":[],"headers":[{"name":":authority","value":"api.test.ndla.no"},{"name":":method","value":"POST"},{"name":":path","value":"/graphql-api/graphql"},{"name":":scheme","value":"https"},{"name":"accept","value":"*/*"},{"name":"accept-encoding","value":"gzip, deflate, br"},{"name":"accept-language","value":"nb"},{"name":"content-length","value":"1334"},{"name":"content-type","value":"application/json"},{"name":"origin","value":"http://localhost:3000"},{"name":"priority","value":"u=1, i"},{"name":"referer","value":"http://localhost:3000/"},{"name":"sec-ch-ua","value":"\"Chromium\";v=\"124\", \"HeadlessChrome\";v=\"124\", \"Not-A.Brand\";v=\"99\""},{"name":"sec-ch-ua-mobile","value":"?0"},{"name":"sec-ch-ua-platform","value":"\"Linux\""},{"name":"sec-fetch-dest","value":"empty"},{"name":"sec-fetch-mode","value":"cors"},{"name":"sec-fetch-site","value":"cross-site"},{"name":"user-agent","value":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/124.0.6367.29 Safari/537.36"}],"queryString":[],"headersSize":-1,"bodySize":-1,"postData":{"mimeType":"application/json","text":"[{\"operationName\":\"mastheadFrontpage\",\"variables\":{},\"query\":\"query mastheadFrontpage {\\n frontpage {\\n ...DrawerContent_FrontpageMenu\\n __typename\\n }\\n}\\n\\nfragment DrawerContent_FrontpageMenu on FrontpageMenu {\\n ...AboutMenu_FrontpageMenu\\n __typename\\n}\\n\\nfragment AboutMenu_FrontpageMenu on FrontpageMenu {\\n ...AboutMenu\\n menu {\\n ...AboutMenu\\n menu {\\n ...AboutMenu\\n menu {\\n ...AboutMenu\\n menu {\\n ...AboutMenu\\n __typename\\n }\\n __typename\\n }\\n __typename\\n }\\n __typename\\n }\\n __typename\\n}\\n\\nfragment AboutMenu on FrontpageMenu {\\n articleId\\n hideLevel\\n article {\\n id\\n title\\n slug\\n __typename\\n }\\n __typename\\n}\"},{\"operationName\":\"mastheadProgramme\",\"variables\":{},\"query\":\"query mastheadProgramme {\\n programmes {\\n ...DrawerContent_ProgrammePage\\n __typename\\n }\\n}\\n\\nfragment DrawerContent_ProgrammePage on ProgrammePage {\\n ...ProgrammeMenu_ProgrammePage\\n __typename\\n}\\n\\nfragment ProgrammeMenu_ProgrammePage on ProgrammePage {\\n id\\n contextId\\n title {\\n title\\n __typename\\n }\\n url\\n contentUri\\n __typename\\n}\"},{\"operationName\":\"alerts\",\"variables\":{},\"query\":\"query alerts {\\n alerts {\\n title\\n body\\n closable\\n number\\n __typename\\n }\\n}\"}]","params":[]}},"response":{"status":200,"statusText":"","httpVersion":"HTTP/2.0","cookies":[],"headers":[{"name":"access-control-allow-credentials","value":"true"},{"name":"access-control-allow-origin","value":"http://localhost:3000"},{"name":"access-control-expose-headers","value":"*"},{"name":"cache-control","value":"no-store"},{"name":"content-encoding","value":"gzip"},{"name":"content-type","value":"application/json; charset=utf-8"},{"name":"date","value":"Fri, 25 Oct 2024 08:03:47 GMT"},{"name":"etag","value":"W/\"1956-x9rXGAZvsU+zly4KVtPD6ON7jGM\""},{"name":"ratelimit-limit","value":"1000"},{"name":"ratelimit-remaining","value":"998"},{"name":"ratelimit-reset","value":"1"},{"name":"strict-transport-security","value":"max-age=15724800; includeSubDomains"},{"name":"vary","value":"Accept-Encoding"},{"name":"vary","value":"Origin"},{"name":"via","value":"kong/3.6.1"},{"name":"x-kong-proxy-latency","value":"2"},{"name":"x-kong-request-id","value":"c8a872403239c410d03b213c0dae412e"},{"name":"x-kong-upstream-latency","value":"6"},{"name":"x-powered-by","value":"Express"},{"name":"x-ratelimit-limit-hour","value":"3600000"},{"name":"x-ratelimit-limit-minute","value":"60000"},{"name":"x-ratelimit-limit-second","value":"1000"},{"name":"x-ratelimit-remaining-hour","value":"3599001"},{"name":"x-ratelimit-remaining-minute","value":"59490"},{"name":"x-ratelimit-remaining-second","value":"998"}],"content":{"size":-1,"mimeType":"application/json; charset=utf-8","text":"[{\"data\":{\"frontpage\":{\"articleId\":38140,\"hideLevel\":false,\"article\":{\"id\":38140,\"title\":\"Forside\",\"slug\":\"forside\",\"__typename\":\"Article\"},\"__typename\":\"FrontpageMenu\",\"menu\":[{\"articleId\":38247,\"hideLevel\":false,\"article\":{\"id\":38247,\"title\":\"Om NDLA\",\"slug\":\"om-ndla\",\"__typename\":\"Article\"},\"__typename\":\"FrontpageMenu\",\"menu\":[{\"articleId\":38253,\"hideLevel\":false,\"article\":{\"id\":38253,\"title\":\"Hvem er vi?\",\"slug\":\"hvem-er-vi\",\"__typename\":\"Article\"},\"__typename\":\"FrontpageMenu\",\"menu\":[{\"articleId\":38479,\"hideLevel\":false,\"article\":{\"id\":38479,\"title\":\"Om NDLA-film\",\"slug\":\"om-ndl-film\",\"__typename\":\"Article\"},\"__typename\":\"FrontpageMenu\",\"menu\":[]},{\"articleId\":38261,\"hideLevel\":false,\"article\":{\"id\":38261,\"title\":\"NDLAs historie\",\"slug\":\"ndlas-historie\",\"__typename\":\"Article\"},\"__typename\":\"FrontpageMenu\",\"menu\":[]}]},{\"articleId\":38259,\"hideLevel\":false,\"article\":{\"id\":38259,\"title\":\"Jobb hos oss\",\"slug\":\"jobb-hos-oss\",\"__typename\":\"Article\"},\"__typename\":\"FrontpageMenu\",\"menu\":[{\"articleId\":38260,\"hideLevel\":false,\"article\":{\"id\":38260,\"title\":\"Utlysninger\",\"slug\":\"utlysninger\",\"__typename\":\"Article\"},\"__typename\":\"FrontpageMenu\",\"menu\":[{\"articleId\":38603,\"hideLevel\":false,\"article\":{\"id\":38603,\"title\":\"Demo - Ledig stilling som RSS-ansvarleg\",\"slug\":\"demo---ledig-stilling-som-rss-ansvarleg\",\"__typename\":\"Article\"},\"__typename\":\"FrontpageMenu\"}]}]},{\"articleId\":38528,\"hideLevel\":false,\"article\":{\"id\":38528,\"title\":\"Test av grid\",\"slug\":\"test-av-grid\",\"__typename\":\"Article\"},\"__typename\":\"FrontpageMenu\",\"menu\":[{\"articleId\":38207,\"hideLevel\":false,\"article\":{\"id\":38207,\"title\":\"Tester bilde i grid\",\"slug\":\"tester-bilde-i-grid\",\"__typename\":\"Article\"},\"__typename\":\"FrontpageMenu\",\"menu\":[]},{\"articleId\":38488,\"hideLevel\":false,\"article\":{\"id\":38488,\"title\":\"NDLAFILMen\",\"slug\":\"ndlafilmen\",\"__typename\":\"Article\"},\"__typename\":\"FrontpageMenu\",\"menu\":[]}]},{\"articleId\":38002,\"hideLevel\":false,\"article\":{\"id\":38002,\"title\":\"Kontakt oss\",\"slug\":\"tittel-p-forsideartikkel\",\"__typename\":\"Article\"},\"__typename\":\"FrontpageMenu\",\"menu\":[]}]},{\"articleId\":38293,\"hideLevel\":false,\"article\":{\"id\":38293,\"title\":\"Om NDLA -testartikkel\",\"slug\":\"ndlafilmene-test\",\"__typename\":\"Article\"},\"__typename\":\"FrontpageMenu\",\"menu\":[]}]}}}\n,{\"data\":{\"programmes\":[{\"id\":\"urn:programme:2db54146-54af-4949-966a-002acf307886\",\"contextId\":\"847f59182173\",\"title\":{\"title\":\"Bygg- og anleggsteknikk\",\"__typename\":\"Title\"},\"url\":\"/bygg-og-anleggsteknikk/847f59182173\",\"contentUri\":\"urn:frontpage:250\",\"__typename\":\"ProgrammePage\"},{\"id\":\"urn:programme:e1a0127c-b9b2-47a5-855b-934640abdb30\",\"contextId\":\"55ad4a85ba78\",\"title\":{\"title\":\"Elektro og datateknologi\",\"__typename\":\"Title\"},\"url\":\"/elektro-og-datateknologi/55ad4a85ba78\",\"contentUri\":\"urn:frontpage:251\",\"__typename\":\"ProgrammePage\"},{\"id\":\"urn:programme:c4316fb8-f97b-44d3-8a7f-b65c3da71d93\",\"contextId\":\"235c13273508\",\"title\":{\"title\":\"Frisør, blomster, interiør og eksponeringsdesign\",\"__typename\":\"Title\"},\"url\":\"/frisor-blomster-interior-og-eksponeringsdesign/235c13273508\",\"contentUri\":\"urn:frontpage:252\",\"__typename\":\"ProgrammePage\"},{\"id\":\"urn:programme:22017624-90c0-4b05-bfb9-e152144445f9\",\"contextId\":\"28899b73c188\",\"title\":{\"title\":\"Håndverk, design og produktutvikling\",\"__typename\":\"Title\"},\"url\":\"/handverk-design-og-produktutvikling/28899b73c188\",\"contentUri\":\"urn:frontpage:254\",\"__typename\":\"ProgrammePage\"},{\"id\":\"urn:programme:6c6abdff-086b-4e5d-a8db-f23d5b677ef2\",\"contextId\":\"5ad439a5dacb\",\"title\":{\"title\":\"Helse- og oppvekstfag\",\"__typename\":\"Title\"},\"url\":\"/helse-og-oppvekstfag/5ad439a5dacb\",\"contentUri\":\"urn:frontpage:253\",\"__typename\":\"ProgrammePage\"},{\"id\":\"urn:programme:01323a26-1fa8-4e5e-bcde-7719758ccfbb\",\"contextId\":\"dd37b407714d\",\"title\":{\"title\":\"Idrettsfag\",\"__typename\":\"Title\"},\"url\":\"/idrettsfag/dd37b407714d\",\"contentUri\":\"urn:frontpage:255\",\"__typename\":\"ProgrammePage\"},{\"id\":\"urn:programme:4986522e-e76c-4d9b-bd20-c4b014b5e3c1\",\"contextId\":\"23f18a24131e\",\"title\":{\"title\":\"Informasjonsteknologi og medieproduksjon\",\"__typename\":\"Title\"},\"url\":\"/informasjonsteknologi-og-medieproduksjon/23f18a24131e\",\"contentUri\":\"urn:frontpage:256\",\"__typename\":\"ProgrammePage\"},{\"id\":\"urn:programme:838201bc-dd81-4fe3-890d-96621c81562c\",\"contextId\":\"72376dcfd25a\",\"title\":{\"title\":\"Kunst, design og arkitektur\",\"__typename\":\"Title\"},\"url\":\"/kunst-design-og-arkitektur/72376dcfd25a\",\"contentUri\":\"urn:frontpage:257\",\"__typename\":\"ProgrammePage\"},{\"id\":\"urn:programme:147f3fdd-2c3d-4f85-b4b3-daeae7a9aa5a\",\"contextId\":\"57b0e8cd7270\",\"title\":{\"title\":\"Medier og kommunikasjon\",\"__typename\":\"Title\"},\"url\":\"/medier-og-kommunikasjon/57b0e8cd7270\",\"contentUri\":\"urn:frontpage:258\",\"__typename\":\"ProgrammePage\"},{\"id\":\"urn:programme:c15de191-0a59-4aa8-91e6-4520085d3f99\",\"contextId\":\"338394ba465c\",\"title\":{\"title\":\"Musikk, dans og drama\",\"__typename\":\"Title\"},\"url\":\"/musikk-dans-og-drama/338394ba465c\",\"contentUri\":\"urn:frontpage:259\",\"__typename\":\"ProgrammePage\"},{\"id\":\"urn:programme:d70c4eea-aed6-4551-83a6-60a551047c0c\",\"contextId\":\"d23305736cde\",\"title\":{\"title\":\"Naturbruk\",\"__typename\":\"Title\"},\"url\":\"/naturbruk/d23305736cde\",\"contentUri\":\"urn:frontpage:260\",\"__typename\":\"ProgrammePage\"},{\"id\":\"urn:programme:a105b3a3-7a29-49be-817b-803c06892237\",\"contextId\":\"6ea1ed34e5e7\",\"title\":{\"title\":\"Påbygg\",\"__typename\":\"Title\"},\"url\":\"/pabygg/6ea1ed34e5e7\",\"contentUri\":\"urn:frontpage:261\",\"__typename\":\"ProgrammePage\"},{\"id\":\"urn:programme:a90d8927-288f-44a9-99cd-585194669421\",\"contextId\":\"0a0cd4e39743\",\"title\":{\"title\":\"Restaurant- og matfag\",\"__typename\":\"Title\"},\"url\":\"/restaurant-og-matfag/0a0cd4e39743\",\"contentUri\":\"urn:frontpage:262\",\"__typename\":\"ProgrammePage\"},{\"id\":\"urn:programme:088a27ed-66a0-4cd1-a425-da1e1797c957\",\"contextId\":\"b55100bbc29e\",\"title\":{\"title\":\"Salg, service og reiseliv\",\"__typename\":\"Title\"},\"url\":\"/salg-service-og-reiseliv/b55100bbc29e\",\"contentUri\":\"urn:frontpage:263\",\"__typename\":\"ProgrammePage\"},{\"id\":\"urn:programme:3d42b7bb-6819-495a-8c1c-1e8d6b0a90ab\",\"contextId\":\"7d5badf01ff2\",\"title\":{\"title\":\"Studiespesialisering\",\"__typename\":\"Title\"},\"url\":\"/studiespesialisering/7d5badf01ff2\",\"contentUri\":\"urn:frontpage:264\",\"__typename\":\"ProgrammePage\"},{\"id\":\"urn:programme:e27b83e3-5cff-49b2-aac5-1ea2cc40dc53\",\"contextId\":\"a920d0b5cbbb\",\"title\":{\"title\":\"Teknologi- og industrifag\",\"__typename\":\"Title\"},\"url\":\"/teknologi-og-industrifag/a920d0b5cbbb\",\"contentUri\":\"urn:frontpage:265\",\"__typename\":\"ProgrammePage\"}]}}\n,{\"data\":{\"alerts\":[]}}\n]"},"headersSize":-1,"bodySize":-1,"redirectURL":""},"cache":{},"timings":{"send":-1,"wait":-1,"receive":148.703}}]}}
{"log":{"version":"1.2","creator":{"name":"Playwright","version":"1.45.0"},"browser":{"name":"chromium","version":"127.0.6533.17"},"entries":[{"startedDateTime":"2024-10-31T06:37:43.226Z","time":-1,"request":{"method":"POST","url":"https://api.test.ndla.no/graphql-api/graphql","httpVersion":"HTTP/1.1","cookies":[],"headers":[{"name":"sec-ch-ua","value":"\"Not)A;Brand\";v=\"99\", \"HeadlessChrome\";v=\"127\", \"Chromium\";v=\"127\""},{"name":"accept-language","value":"nb"},{"name":"sec-ch-ua-mobile","value":"?0"},{"name":"User-Agent","value":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/127.0.6533.17 Safari/537.36"},{"name":"content-type","value":"application/json"},{"name":"accept","value":"*/*"},{"name":"Referer","value":"http://localhost:3000/"},{"name":"sec-ch-ua-platform","value":"\"Linux\""}],"queryString":[],"headersSize":-1,"bodySize":-1,"postData":{"mimeType":"application/json","text":"[{\"operationName\":\"mastheadFrontpage\",\"variables\":{},\"query\":\"query mastheadFrontpage {\\n frontpage {\\n ...DrawerContent_FrontpageMenu\\n __typename\\n }\\n}\\n\\nfragment DrawerContent_FrontpageMenu on FrontpageMenu {\\n ...AboutMenu_FrontpageMenu\\n __typename\\n}\\n\\nfragment AboutMenu_FrontpageMenu on FrontpageMenu {\\n ...AboutMenu\\n menu {\\n ...AboutMenu\\n menu {\\n ...AboutMenu\\n menu {\\n ...AboutMenu\\n menu {\\n ...AboutMenu\\n __typename\\n }\\n __typename\\n }\\n __typename\\n }\\n __typename\\n }\\n __typename\\n}\\n\\nfragment AboutMenu on FrontpageMenu {\\n articleId\\n hideLevel\\n article {\\n id\\n title\\n slug\\n __typename\\n }\\n __typename\\n}\"},{\"operationName\":\"mastheadProgramme\",\"variables\":{},\"query\":\"query mastheadProgramme {\\n programmes {\\n ...DrawerContent_ProgrammePage\\n __typename\\n }\\n}\\n\\nfragment DrawerContent_ProgrammePage on ProgrammePage {\\n ...ProgrammeMenu_ProgrammePage\\n __typename\\n}\\n\\nfragment ProgrammeMenu_ProgrammePage on ProgrammePage {\\n id\\n contextId\\n title {\\n title\\n __typename\\n }\\n url\\n contentUri\\n __typename\\n}\"},{\"operationName\":\"alerts\",\"variables\":{},\"query\":\"query alerts {\\n alerts {\\n title\\n body\\n closable\\n number\\n __typename\\n }\\n}\"}]","params":[]}},"response":{"status":-1,"statusText":"","httpVersion":"HTTP/1.1","cookies":[],"headers":[],"content":{"size":-1,"mimeType":"x-unknown"},"headersSize":-1,"bodySize":-1,"redirectURL":""},"cache":{},"timings":{"send":-1,"wait":-1,"receive":-1}}]}}

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions e2e/auth.setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
import { test, expect } from "@playwright/test";
import { STORAGE_STATE } from "../playwright.config";

if (process.env.RECORD_FIXTURES === "true") {
test.slow();
}

test("authenticate", async ({ page }) => {
if (process.env.RECORD_FIXTURES === "true") {
await page.goto("/login?state=/minndla");
Expand Down
1 change: 1 addition & 0 deletions e2e/specs/authenticated/MyNDLA.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ test("have recently added to folder", async ({ page }) => {
});

test("have new posts in arena", async ({ page }) => {
await mockWaitResponse(page, "**/graphql-api/graphql");
await expect(page.getByRole("heading", { name: "Nye innlegg i arena" })).toBeVisible();

expect(await page.getByRole("main").locator("section").nth(1).getByRole("listitem").count()).toBeGreaterThanOrEqual(
Expand Down
Loading
Loading