Skip to content

Commit

Permalink
chore(e2e-tests): rewording
Browse files Browse the repository at this point in the history
co-authored-by: Sarah Dayan<[email protected]>
  • Loading branch information
Haroenv committed Nov 23, 2022
1 parent 6c7b809 commit 854a553
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 21 deletions.
22 changes: 11 additions & 11 deletions tests/e2e/all-flavors.spec.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import { brandAndQuery } from './specs/brand-and-query.spec';
import { category } from './specs/category.spec';
import { initialStateFromRoute } from './specs/initial-state-from-route.spec';
import { pagination } from './specs/pagination.spec';
import { priceRange } from './specs/price-range.spec';
import { flavors } from './flavors';
import { createBrandAndQueryTestSuite } from './specs/brand-and-query.spec';
import { createCategoryTestSuite } from './specs/category.spec';
import { createInitialStateFromRouteTestSuite } from './specs/initial-state-from-route.spec';
import { createPaginationTestSuite } from './specs/pagination.spec';
import { createPriceRangeTestSuite } from './specs/price-range.spec';

import { flavors } from './flavors';
flavors.forEach((flavor) => {
describe(`${flavor}`, () => {
brandAndQuery(flavor);
category(flavor);
initialStateFromRoute(flavor);
pagination(flavor);
priceRange(flavor);
createBrandAndQueryTestSuite(flavor);
createCategoryTestSuite(flavor);
createInitialStateFromRouteTestSuite(flavor);
createPaginationTestSuite(flavor);
createPriceRangeTestSuite(flavor);
});
});
4 changes: 2 additions & 2 deletions tests/e2e/specs/brand-and-query.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export function brandAndQuery(flavor: string) {
export function createBrandAndQueryTestSuite(flavor: string) {
const root = `examples/${flavor}/e-commerce/`;

describe('Search on specific brand and query filtering', () => {
describe('search on specific brand and query filtering', () => {
it('navigates to the e-commerce demo', async () => {
await browser.url(root);
});
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/specs/category.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export function category(flavor: string) {
export function createCategoryTestSuite(flavor: string) {
const root = `examples/${flavor}/e-commerce/`;

describe('Search on specific category', () => {
describe('search on specific category', () => {
it('navigates to the e-commerce demo', async () => {
await browser.url(root);
});
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/specs/initial-state-from-route.spec.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { URL, URLSearchParams } from 'url';

export function initialStateFromRoute(flavor: string) {
export function createInitialStateFromRouteTestSuite(flavor: string) {
const root = `examples/${flavor}/e-commerce/`;

describe('State and route', () => {
describe('state and route', () => {
describe('read', () => {
it('navigates to the e-commerce demo with refinements set in route', async () => {
const params = new URLSearchParams({
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/specs/pagination.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export function pagination(flavor: string) {
export function createPaginationTestSuite(flavor: string) {
const root = `examples/${flavor}/e-commerce/`;

describe('Page navigation', () => {
describe('page navigation', () => {
it('navigates to the e-commerce demo', async () => {
await browser.url(root);
});
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/specs/price-range.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export function priceRange(flavor: string) {
export function createPriceRangeTestSuite(flavor: string) {
const root = `examples/${flavor}/e-commerce/`;

describe('Search on specific price range', () => {
describe('search on specific price range', () => {
let lowerBound: number;
let upperBound: number;

Expand Down

0 comments on commit 854a553

Please sign in to comment.