Ocelot-Social/cypress/e2e/Post.Create/the_post_was_saved_successfully.js

9 lines
310 B
JavaScript

import { Then } from "@badeball/cypress-cucumber-preprocessor";
Then("the post was saved successfully", async () => {
cy.task('getValue', 'lastPost').then(lastPost => {
cy.get(".base-card > .title").should("contain", lastPost.title);
cy.get(".content").should("contain", lastPost.content);
})
});