Skip to content

Commit

Permalink
Update tests (#283)
Browse files Browse the repository at this point in the history
* update

* update

* update

* update
  • Loading branch information
karl-johan-grahn authored Jul 24, 2024
1 parent 0104bb2 commit a759917
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
4 changes: 2 additions & 2 deletions testcafe/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ COPY package.json package.json

RUN echo "Install build deps.." \
&& apk --update --no-cache add \
chromium \
chromium \
tzdata

RUN yarn

CMD ["yarn", "start"]
CMD ["yarn", "start"]
18 changes: 14 additions & 4 deletions testcafe/src/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,21 @@ const searchResultItem = Selector('li.md-search-result__item');
const searchLabel = Selector('label.md-header__button.md-icon').withAttribute('for', '__search');


fixture("Check if yamls are valid")
fixture("Verify site")
.page`${'http://127.0.0.1:8080/saap'}`
.skipJsErrors();

test(`Accept cookies if cookies consent message is displayed`, async (t) => {
test('Verify index file exists', async t => {
await t
.navigateTo('http://127.0.0.1:8080/saap/index.html');
})

test('Verify custom 404 file exists', async t => {
await t
.navigateTo('http://127.0.0.1:8080/saap/404.html');
})

test('Search for existence of incorrectly rendered fenced code blocks', async (t) => {
await t.maximizeWindow();

const acceptButtonExists = await acceptButton.exists;
Expand All @@ -32,5 +42,5 @@ test(`Accept cookies if cookies consent message is displayed`, async (t) => {
await t.typeText(searchInput, "```")

const searchResultItemExists = await searchResultItem.exists;
await t.expect(searchResultItemExists).notOk('Invalid yamls exist, failing the test');
})
await t.expect(searchResultItemExists).notOk('Fenced code blocks exist in the search result and are therefore incorrectly rendered, failing the test');
})

0 comments on commit a759917

Please sign in to comment.