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

test: stabilize and enable 1 e2e and 1 unit registry test #552

Merged
merged 1 commit into from
Nov 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 3 additions & 2 deletions e2e/spec/news.spec.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Scenario('should open a news page and show news sources', async ({ I, newsPage:
I.see('Pick a news source', newsPage.bannerHeadline);
});

Scenario.skip('should open an article page from a direct link', async ({ I, newsPage: newsPage }) => {
Scenario('should open an article page from a direct link', async ({ I, newsPage: newsPage }) => {
I.amOnPage(newsPage.url.main);
I.waitInUrl(newsPage.url.main, 10);
I.waitForElement(newsPage.newsSources, 10);
Expand All @@ -29,8 +29,9 @@ Scenario.skip('should open an article page from a direct link', async ({ I, news
const firstNewsSourceArticleHref = await I.grabAttributeFrom(newsPage.firstNewsSourceArticle, 'href');

I.click(newsPage.firstNewsSourceArticle);
I.wait(3);
I.switchToNextTab();
I.waitInUrl(firstNewsSourceArticleHref.replace(/https?/, ''), 10);
I.waitInUrl(firstNewsSourceArticleHref, 10);
I.switchToPreviousTab();
I.seeInCurrentUrl(lastNewsSourceLinkHref);
I.closeOtherTabs();
Expand Down
2 changes: 1 addition & 1 deletion registry/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"compile": "tsc --incremental",
"dev": "nodemon -e ts,json5 --exec \"npx tsc --incremental && dotenv -- npm run start\" ",
"build": "npm run compile && cd ./client && npm run build",
"start": "node -r source-map-support/register ./build/server/index.js",
"start": "dotenv -- node -r source-map-support/register ./build/server/index.js",
"start-docker": "npm run migrate && npm start",
"knex": "knex",
"migrate": "dotenv -- knex --knexfile config/knexfile.ts migrate:latest",
Expand Down
11 changes: 4 additions & 7 deletions registry/tests/routerDomains.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,14 +156,11 @@ describe(`Tests ${example.url}`, () => {
domainName: `domainNameCorrect${i}.com`,
}));

const promises = routerDomainsList.map(async (data) => {
const { body } = await req.post(example.url).send(data).expect(200);
data.id = body.id;
});

try {
await Promise.all(promises);
routerDomainsList.sort((a, b) => a.id! - b.id!);
for (const data of routerDomainsList) {
const { body } = await req.post(example.url).send(data).expect(200);
data.id = body.id;
}

const responseFetching01 = await req.get(
`${example.url}?range=${encodeURIComponent(`[${rangeStart + 0},${rangeStart + 1}]`)}`,
Expand Down
Loading