test fix - filtering products (#3739)

This commit is contained in:
wojteknowacki 2023-06-13 09:06:57 +02:00 committed by GitHub
parent dcf8e26169
commit 17bca62f31
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 4 deletions

View file

@ -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,

View file

@ -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()

View file

@ -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 };