Skip to content

Commit

Permalink
Merge pull request #552 from namecheap/test/stabilize
Browse files Browse the repository at this point in the history
test: stabilize and enable 1 e2e and 1 unit registry test
  • Loading branch information
stas-nc authored Nov 9, 2023
2 parents 54b0e0a + c8a631e commit 146076e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
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

0 comments on commit 146076e

Please sign in to comment.