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}`,
{ tags: ["@productsList", "@allEnv", "@stable"] },
() => {
cy.addAliasToGraphRequest("ProductList");
selectFilterOption(filterBy.type, name);
cy.get(SHARED_ELEMENTS.dataGridTable).contains(name).should("exist");
},
);
});
it.only(
it(
"should filter products out of stock. TC: SALEOR_2604",
{ tags: ["@productsList", "@allEnv", "@stable"] },
() => {
const productOutOfStock = `${startsWith}${faker.datatype.number()}`;
cy.addAliasToGraphRequest("ProductList");
createProductInChannel({
name: productOutOfStock,
channelId: channel.id,

View file

@ -108,8 +108,7 @@ export function selectChannel(channelSlug) {
}
export function submitFilters() {
cy.addAliasToGraphRequest("ProductList")
.get(BUTTON_SELECTORS.submit)
cy.get(BUTTON_SELECTORS.submit)
.scrollIntoView()
.should("be.visible")
.click()