test fix - filtering products (#3739)
This commit is contained in:
parent
dcf8e26169
commit
17bca62f31
3 changed files with 5 additions and 4 deletions
|
@ -99,17 +99,19 @@ describe("As an admin I should be able to filter products", () => {
|
||||||
`should filter products by ${filterBy.type}. TC: ${filterBy.testCase}`,
|
`should filter products by ${filterBy.type}. TC: ${filterBy.testCase}`,
|
||||||
{ tags: ["@productsList", "@allEnv", "@stable"] },
|
{ tags: ["@productsList", "@allEnv", "@stable"] },
|
||||||
() => {
|
() => {
|
||||||
|
cy.addAliasToGraphRequest("ProductList");
|
||||||
selectFilterOption(filterBy.type, name);
|
selectFilterOption(filterBy.type, name);
|
||||||
cy.get(SHARED_ELEMENTS.dataGridTable).contains(name).should("exist");
|
cy.get(SHARED_ELEMENTS.dataGridTable).contains(name).should("exist");
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
it.only(
|
it(
|
||||||
"should filter products out of stock. TC: SALEOR_2604",
|
"should filter products out of stock. TC: SALEOR_2604",
|
||||||
{ tags: ["@productsList", "@allEnv", "@stable"] },
|
{ tags: ["@productsList", "@allEnv", "@stable"] },
|
||||||
() => {
|
() => {
|
||||||
const productOutOfStock = `${startsWith}${faker.datatype.number()}`;
|
const productOutOfStock = `${startsWith}${faker.datatype.number()}`;
|
||||||
|
cy.addAliasToGraphRequest("ProductList");
|
||||||
createProductInChannel({
|
createProductInChannel({
|
||||||
name: productOutOfStock,
|
name: productOutOfStock,
|
||||||
channelId: channel.id,
|
channelId: channel.id,
|
||||||
|
|
|
@ -108,8 +108,7 @@ export function selectChannel(channelSlug) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function submitFilters() {
|
export function submitFilters() {
|
||||||
cy.addAliasToGraphRequest("ProductList")
|
cy.get(BUTTON_SELECTORS.submit)
|
||||||
.get(BUTTON_SELECTORS.submit)
|
|
||||||
.scrollIntoView()
|
.scrollIntoView()
|
||||||
.should("be.visible")
|
.should("be.visible")
|
||||||
.click()
|
.click()
|
||||||
|
|
|
@ -10840,4 +10840,4 @@ export type WarehouseDetailsQuery = { __typename: 'Query', warehouse: { __typena
|
||||||
export type WarehousesCountQueryVariables = Exact<{ [key: string]: never; }>;
|
export type WarehousesCountQueryVariables = Exact<{ [key: string]: never; }>;
|
||||||
|
|
||||||
|
|
||||||
export type WarehousesCountQuery = { __typename: 'Query', warehouses: { __typename: 'WarehouseCountableConnection', totalCount: number | null } | null };
|
export type WarehousesCountQuery = { __typename: 'Query', warehouses: { __typename: 'WarehouseCountableConnection', totalCount: number | null } | null };
|
||||||
|
|
Loading…
Reference in a new issue