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

Fix e2e tests #348

Merged
merged 1 commit into from
Dec 23, 2024
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
14 changes: 7 additions & 7 deletions tests/e2e.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ describe('Search', () => {
});

it.each([
['by title', 'adobe', 'Adobe'],
['by title', 'dotenv ', '.ENV'],
['aka alias', 'All Elite Wrestling', 'AEW'],
['dup alias', 'GoToWebinar', 'GoToMeeting'],
['loc alias', 'КиноПоиск', 'Kinopoisk'],
Expand Down Expand Up @@ -174,31 +174,31 @@ describe('Search', () => {

it('shows the "order by relevance" button on search', async () => {
const $searchInput = await page.$('#search-input');
await $searchInput.type('adobe');
await $searchInput.type('dotenv');

const $orderRelevance = await page.$('#order-relevance');
expect(await isVisible($orderRelevance)).toBeTruthy();
});

it('shows the "clear search" button on search', async () => {
const $searchInput = await page.$('#search-input');
await $searchInput.type('adobe');
await $searchInput.type('env');

const $searchClear = await page.$('#search-clear');
expect(await isVisible($searchClear)).toBeTruthy();
});

it('enables ordering by relevance on search', async () => {
const $searchInput = await page.$('#search-input');
await $searchInput.type('adobe');
await $searchInput.type('env');

const $body = await page.$('body');
expect(await hasClass($body, 'order-relevance')).toBeTruthy();
});

it('resets the search when clicking the "clear search" button', async () => {
const $searchInput = await page.$('#search-input');
await $searchInput.type('adobe');
await $searchInput.type('env');

const $searchClear = await page.$('#search-clear');
await $searchClear.click();
Expand All @@ -214,7 +214,7 @@ describe('Search', () => {
await page.click(`#${id}`);

const $searchInput = await page.$('#search-input');
await $searchInput.type('adobe');
await $searchInput.type('env');

await $searchInput.click({clickCount: 3});
await $searchInput.press('Backspace');
Expand All @@ -231,7 +231,7 @@ describe('Search', () => {
await page.click(`#${id}`);

const $searchInput = await page.$('#search-input');
await $searchInput.type('adobe');
await $searchInput.type('env');

const $searchClear = await page.$('#search-clear');
await $searchClear.click();
Expand Down
2 changes: 1 addition & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ if (process.env.TEST_ENV) {
}
};

for (const slug of ['adobe', 'aew', 'gotomeeting', 'kinopoisk'])
for (const slug of ['dotenv', 'aew', 'gotomeeting', 'kinopoisk'])
ensureIconDisplayed(slug);
}

Expand Down
Loading