Commit 6a158b60 authored by ransome1's avatar ransome1
Browse files

Fixed test cases, fixed search/lower case bug

parent ee544ba9
{
"name": "sleek",
"productName": "sleek",
"version": "1.2.5",
"version": "1.2.6-rc.1",
"description": "todo.txt manager for Linux, Windows and MacOS, free and open-source (FOSS)",
"synopsis": "todo.txt manager for Linux, Windows and MacOS, free and open-source (FOSS)",
"category": "ProjectManagement",
......@@ -132,7 +132,7 @@
"sass": "sass -w src/scss/style.scss:src/css/style.css",
"start": "yarn sass & electron .",
"test": "yarn playwright test --config=test/playwright.config.js",
"test1": "yarn playwright test -g 'Add a new todo and delete it' --config=test/playwright.config.js"
"test1": "yarn playwright test -g 'Recurrence picker' --config=test/playwright.config.js"
},
"dependencies": {
"@fortawesome/fontawesome-free": "^6.1.1",
......
name: sleek
base: core18
version: "1.2.5"
version: "1.2.6"
summary: todo.txt manager for Linux, free and open-source (FOSS)
description: |
sleek is an open-source (FOSS) todo manager based on the todo.txt syntax. Stripped down to only the most necessary features, and with a clean and simple interface, sleek aims to help you focus on getting things done.
......
......@@ -194,7 +194,7 @@ function applySearchInput(queryString) {
items.filtered = items.filtered.filter(function(item) {
if(!userData.caseSensitive) {
queryString = queryString.toLowerCase();
item.raw = item.raw.toLowerCase()
item.raw = item.raw;
}
return item.raw.indexOf(queryString) !== -1;
});
......
......@@ -397,7 +397,6 @@ function generateTableRow(todo) {
const renderer = {
link(href, title, text) {
const linkId = Math.random().toString(36).slice(2);
if(userData.getPageTitles) getAndSetPageTitle(linkId, text);
......
......@@ -27,4 +27,5 @@ x 2022-04-12 This is a test todo that needs to be archived
x 2022-06-13 This is a test todo that needs to be archived
x 2022-07-01 This is a test todo that needs to be archived
x 2022-09-29 This is a test todo that needs to be archived
x 2022-10-04 This is a test todo that needs to be archived
\ No newline at end of file
x 2022-10-04 This is a test todo that needs to be archived
x 2022-10-06 This is a test todo that needs to be archived
\ No newline at end of file
......@@ -340,6 +340,44 @@ test.describe("Recurrence picker", () => {
await expect(page.locator("#recurrencePickerContainer")).toBeVisible();
await page.locator("#datePickerInput").click();
await expect(page.locator("#recurrencePickerContainer")).not.toBeVisible();
await page.keyboard.press("Escape");
await page.keyboard.press("Escape");
});
test("Create recurring todo, mark it complete and check result", async () => {
await page.locator("#btnAddTodoContainer").click();
await page.locator("#modalFormInput").fill("This is a test todo that contains a recurrence due:2028-02-01 rec:+2d");
await page.locator("#btnSave").click();
let row = await page.locator(":nth-match(#todoTable .todo, 1)");
const checkbox = await row.locator(".checkbox");
await checkbox.click();
await page.locator(":nth-match(#todoTable .todo, 2) > .text").click();
await expect(page.locator("#modalFormInput")).toHaveValue(/due:2028-02-03 rec:\+2d/);
await page.locator("#btnCancel").click();
await row.click({
"button": "right",
"position": {
"x": 10,
"y": 10
}
});
let deleteButton = await page.locator(":nth-match(#todoContext .dropdown-item, 5)");
await deleteButton.click();
row = await page.locator(":nth-match(#todoTable .todo, 1)");
await row.click({
"button": "right",
"position": {
"x": 10,
"y": 10
}
});
await deleteButton.click();
});
});
......@@ -534,7 +572,7 @@ test.describe("Filter drawer", () => {
await contextButton.click();
const projectButton = await page.locator(":nth-match(#filterDrawer #todoFilters a.button, 11)");
await projectButton.click();
rows = await page.locator("#todoTable .todo").count();
let rows = await page.locator("#todoTable .todo").count();
await expect(rows).toBe(1);
const filterResetButton = await page.locator("#btnFiltersResetFilters").click();
rows = await page.locator("#todoTable .todo").count();
......@@ -544,7 +582,7 @@ test.describe("Filter drawer", () => {
test("Project headline is being clicked, which reduces results to 14", async () => {
await page.locator("#filterDrawer #todoFilters .projects h4").click();
rows = await page.locator("#todoTable .todo").count();
let rows = await page.locator("#todoTable .todo").count();
await expect(rows).toBe(14);
const filterResetButton = await page.locator("#btnFiltersResetFilters").click();
rows = await page.locator("#todoTable .todo").count();
......@@ -703,7 +741,7 @@ test.describe("Settings modal", () => {
await expect(page.locator("#language")).toBeVisible();
const languageCount = await page.locator("#language option").count();
await expect(languageCount).toBe(12);
await expect(languageCount).toBe(13);
const fifthLanguage = await page.locator(":nth-match(#language option, 5)").innerHTML();
await expect(fifthLanguage).toBe("Français");
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment