Skip to content

Commit

Permalink
fix: new return Result when test are duplicated doesn't close Modal. …
Browse files Browse the repository at this point in the history
…-> Fix test
  • Loading branch information
LatentDream committed Apr 20, 2024
1 parent 9cbcd8c commit c1f0de1
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions playwright-test/13_create_test_sequence.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,25 +67,8 @@ test.describe("Create a test sequence", () => {
await expect(window.getByTestId(Selectors.newDropdown)).toBeEnabled({
timeout: 15000,
});
await window.getByTestId(Selectors.newDropdown).click();
await window.getByTestId(Selectors.importTestBtn).click();

// Select the fixture file
const customTestFile = join(__dirname, "fixtures/custom-sequences/test.py");
await app.evaluate(async ({ dialog }, customTestFile) => {
dialog.showOpenDialog = () =>
Promise.resolve({ filePaths: [customTestFile], canceled: false });
}, customTestFile);

// Click on Pytest test to open modal
await window.getByTestId(Selectors.pytestBtn).click();

// Expect test to be loaded
await expect(
window.locator("div", { hasText: "test_one" }).first(),
).toBeVisible();

// Ctrl/meta + p key shortcut to save the sequence
// Ctrl/meta + s key shortcut to save the sequence
if (process.platform === "darwin") {
await window.keyboard.press("Meta+s");
} else {
Expand Down

0 comments on commit c1f0de1

Please sign in to comment.