mirror of
https://github.com/usebruno/bruno.git
synced 2026-07-07 22:18:33 +00:00
test: workspace import and validation testcase (TC-969) (#8349)
* test cases for workspace import and validation TC-969, jira: https://usebruno.atlassian.net/browse/BRU-3575 * incorporated comments, moved findWorkspaceDirByName function to helpers.ts, fixed all the comments * modified as per comment provided , removed css locators , used playwright inbuilt methods , handled timeout * Created file structure as per comment provided, added tc-id , resolved code-rabbit review * incorporated comments removed commented line, removed timeouts, modified package.json added package in dev dependencies * changed const l to locators for better readbility * - Reorganized test helpers: split title-bar locators into title-bar.ts and import-workspace flow into workspace/import-workspace.ts for reuse - Replaced brittle .bruno-modal-card/CSS locators with stable role/testid/label based locators - Added a data-testid for the Import Workspace modal and removed the redundant one - Cleaned up unnecessary comments - Updated package-lock.json * minor changes * minor changes * addressed comments * addressed comments for variable naming * minor changes
This commit is contained in:
@@ -24,8 +24,8 @@ function findCreatedWorkspaceDirs(location: string): string[] {
|
||||
}
|
||||
|
||||
test.describe('Create Workspace', () => {
|
||||
test.describe('Inline Creation Flow', () => {
|
||||
test('should create workspace via inline rename and press Enter', async ({ launchElectronApp, createTmpDir }) => {
|
||||
test.describe('inline workspace creation flow', () => {
|
||||
test('TC-957: Verify create a workspace directly from the title bar by typing a name', { tag: '@sanity' }, async ({ launchElectronApp, createTmpDir }) => {
|
||||
const wsLocation = await createTmpDir('ws-location-enter');
|
||||
|
||||
const app = await launchElectronApp({ initUserDataPath, templateVars: { wsLocation } });
|
||||
@@ -454,7 +454,7 @@ test.describe('Create Workspace', () => {
|
||||
await closeElectronApp(app);
|
||||
});
|
||||
|
||||
test('should persist workspace name after app restart', async ({ launchElectronApp, createTmpDir }) => {
|
||||
test('TC-959: Verify created Workspace persists even after bruno app restart.', { tag: '@sanity' }, async ({ launchElectronApp, createTmpDir }) => {
|
||||
const userDataPath = await createTmpDir('create-ws-name-persist');
|
||||
const wsLocation = await createTmpDir('ws-location-persist');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user