-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6b015bb
commit 76fc084
Showing
11 changed files
with
158 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
export function seeActiveList(name: string): void { | ||
cy.see(name, 'li').within(() => { | ||
cy.see('(active)'); | ||
}); | ||
} | ||
|
||
export function seeActiveWorkspace(name: string): void { | ||
cy.see(name); | ||
} | ||
|
||
export function switchWorkspace(name: string): void { | ||
cy.ariaLabel('Select workspace').within(() => { | ||
cy.get('button').click(); | ||
}); | ||
cy.press(name, 'li'); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
export function createStubs(open: boolean = true): void { | ||
cy.model('Workspace').then(async (Workspace) => { | ||
const main = await Workspace.create({ name: 'Main' }); | ||
|
||
await main.relatedTasks.create({ name: 'Learn Typescript' }).then((task) => task.toggle()); | ||
await main.relatedTasks.create({ name: 'Learn Vue' }).then((task) => task.toggle()); | ||
await main.relatedTasks.create({ name: 'Learn TailwindCSS' }).then((task) => task.toggle()); | ||
await main.relatedTasks.create({ name: 'Learn Aerogel' }); | ||
}); | ||
|
||
cy.model('Workspace').then(async (Workspace) => { | ||
const household = await Workspace.create({ name: 'Household' }); | ||
const groceries = await household.relatedLists.create({ name: 'Groceries' }); | ||
const recipes = await household.relatedLists.create({ name: 'Recipes' }); | ||
|
||
await household.relatedTasks.create({ name: 'Clean room' }); | ||
await household.relatedTasks.create({ name: 'Clean Neko\'s litter box' }).then((task) => task.toggle()); | ||
|
||
await groceries.relatedTasks.create({ name: 'Chickpeas' }); | ||
await groceries.relatedTasks.create({ name: 'Tomatoes' }); | ||
await groceries.relatedTasks.create({ name: 'Nuts' }); | ||
|
||
await recipes.relatedTasks.create({ name: 'Ramen' }); | ||
await recipes.relatedTasks.create({ name: 'Pizza' }).then((task) => task.toggle()); | ||
await recipes.relatedTasks.create({ name: 'Baba Ganoush' }).then((task) => task.toggle()); | ||
}); | ||
|
||
cy.model('Workspace').then(async (Workspace) => { | ||
const japanese = await Workspace.create({ name: 'Japanese' }); | ||
const manga = await japanese.relatedLists.create({ name: 'Manga' }); | ||
|
||
await japanese.relatedTasks.create({ name: 'Learn Hiragana' }).then((task) => task.toggle()); | ||
await japanese.relatedTasks.create({ name: 'Learn Katakana' }).then((task) => task.toggle()); | ||
await japanese.relatedTasks.create({ name: 'Learn Heisig Kanji' }); | ||
|
||
await manga.relatedTasks.create({ name: 'Read One Piece' }); | ||
await manga.relatedTasks.create({ name: 'Read Yotsubato' }).then((task) => task.toggle()); | ||
}); | ||
|
||
if (open) { | ||
cy.model('Workspace').then((Workspace) => Workspace.all().then((workspaces) => workspaces[0].open())); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.