Skip to content

Commit 2814653

Browse files
committed
Fix tests and api in chrome
1 parent eb32fae commit 2814653

3 files changed

Lines changed: 10 additions & 5 deletions

File tree

src/scripts/content/api/request.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,11 @@ const request = async <T = any>(url: string, init?: RequestInit) => {
88
while (true) {
99
const auth = opt.auth ? { "Authorization": `Bearer ${opt.auth}` } : {};
1010
const i = Object.assign({}, init, {
11-
"credentials": "include",
11+
"credentials": "omit",
1212
"headers": {
1313
"Accept": "application/json, text/plain, */*",
1414
"Accept-Language": "en,en-US;q=0.5",
1515
"Nebula-Platform": "web",
16-
"Sec-GPC": "1",
1716
...auth,
1817
},
1918
"mode": "cors"

src/scripts/content/api/store.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export const refreshToken = async () => {
1515
const apiAuth = apiToken ? { "Authorization": `Token ${apiToken}` } : {};
1616

1717
const req = await fetch("https://api.watchnebula.com/api/v1/authorization/", {
18-
"credentials": "include",
18+
"credentials": "omit",
1919
"headers": {
2020
"Accept": "application/json, text/plain, */*",
2121
"Accept-Language": "en-US,en;q=0.5",

tests/integration/queue.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
import { addToQueue, expectQueueLength, qbuttSelector, queueSelector, titles, videoSelector } from "../shared";
22

3-
describe('videos page', () => {
4-
jest.setTimeout(10000);
3+
jest.setTimeout(10000);
4+
5+
beforeAll(async () => {
6+
await page.goto(__NEBULA_BASE__);
7+
await page.waitForSelector('.CookieConsent-Button');
8+
await page.click('.CookieConsent-Button');
9+
});
510

11+
describe('videos page', () => {
612
beforeEach(async () => {
713
await page.goto(`${__NEBULA_BASE__}/videos`);
814
await page.waitForSelector(videoSelector);

0 commit comments

Comments
 (0)