Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

export and archive test #178

Merged
merged 7 commits into from
Oct 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
236 changes: 208 additions & 28 deletions e2e-tests/base.test.ts

Large diffs are not rendered by default.

248 changes: 189 additions & 59 deletions e2e-tests/common.js

Large diffs are not rendered by default.

50 changes: 25 additions & 25 deletions e2e-tests/myFixtures.ts
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
import {test as myTest} from "@playwright/test"
import { test as myTest } from "@playwright/test"

type myFixture = {
userName: string
textProject: string,
obsProject: string,
audioProject: string,
syncName:string,
doorUser:string,
doorPassword:string,
flavorText:string,
flavorObs:string
textUnderscore:string,
obsUnderscore:string,
obsUrduProject:string,
userName: string
textProject: string,
obsProject: string,
audioProject: string,
syncName: string,
doorUser: string,
doorPassword: string,
flavorText: string,
flavorObs: string
textUnderscore: string,
obsUnderscore: string,
obsUrduProject: string,
}
const myFixtureTest = myTest.extend<myFixture>({
userName : "Playwright user",
textProject: "Translation test project",
obsProject: "Obs test project",
textUnderscore: "Translation_test_project",
obsUnderscore: "Obs_test_project",
audioProject: "Audio test project",
syncName:"Sync_Collab_Test",
doorUser:"bobby",
doorPassword:"Bobby@123",
flavorText: "textTranslation",
flavorObs: "textStories",
obsUrduProject: "Obs urdu project",
userName: "Playwright user",
textProject: "Translation test project",
obsProject: "Obs test project",
textUnderscore: "Translation_test_project",
obsUnderscore: "Obs_test_project",
audioProject: "Audio test project",
syncName: "Sync_Collab_Test",
doorUser: "bobby",
doorPassword: "Bobby@123",
flavorText: "textTranslation",
flavorObs: "textStories",
obsUrduProject: "Obs urdu project",
})

export const test = myFixtureTest;
Expand Down
1 change: 1 addition & 0 deletions jsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"compilerOptions": {
"resolveJsonModule": true,
"baseUrl": ".",
"paths": {
"@/icons/*": [
Expand Down
2 changes: 1 addition & 1 deletion renderer/src/components/Profile/UserProfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
// if(!process.env.NEXT_PUBLIC_IS_ELECTRON){
const { error } = await supabaseSignout();
localforage.removeItem('userProfile');
error ? console.log({ error }) : router.push('/login');

Check warning on line 29 in renderer/src/components/Profile/UserProfile.js

View workflow job for this annotation

GitHub Actions / Lint Run

Unexpected console statement

Check warning on line 29 in renderer/src/components/Profile/UserProfile.js

View workflow job for this annotation

GitHub Actions / Lint Run

Unexpected console statement
};
// }

Expand All @@ -49,7 +49,7 @@
<>
<div>
<Menu.Button
id="user-profile"
id="user-profile-image"
className="max-w-xs bg-gray-800 border-4 border-white rounded-full flex items-center text-sm
focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-800 focus:ring-gray-700"
>
Expand Down
2 changes: 1 addition & 1 deletion renderer/src/components/Projects/ProjectList.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export default function ProjectList() {
<div className="-my-2 sm:-mx-6 lg:-mx-8">
<div className="align-middle inline-block min-w-full sm:px-6 lg:px-8">
<div className="shadow border-b border-gray-200 sm:rounded-lg">
<table data-testid="tablelayout" className="min-w-full divide-y divide-gray-200 mb-9">
<table data-testid="tablelayout" id="projects-list" className="min-w-full divide-y divide-gray-200 mb-9">
<EnhancedTableHead
order={order}
orderBy={orderBy}
Expand Down
4 changes: 3 additions & 1 deletion renderer/src/components/Projects/ProjectRow.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const ProjectRow = ({
return 0;
}
return (
<tbody className="bg-white divide-y divide-gray-200">
<tbody className="bg-white divide-y divide-gray-200" id="projects-list-body">
{projects && (stableSort(
projects,
getComparator(order, orderBy),
Expand Down Expand Up @@ -167,6 +167,7 @@ const ProjectRow = ({
{({ active }) => (
<button
type="button"
aria-label="export-project"
className={`${active ? 'bg-primary text-white' : 'text-gray-900'
} group rounded-md items-center w-full px-2 py-2 text-sm ${project.isArchived ? 'hidden' : 'flex'}`}
onClick={() => openExportPopUp(project)}
Expand All @@ -179,6 +180,7 @@ const ProjectRow = ({
{({ active }) => (
<button
type="button"
aria-label="archive-restore-project"
className={`${active ? 'bg-primary text-white' : 'text-gray-900'
} group flex rounded-md items-center w-full px-2 py-2 text-sm`}
onClick={() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ export default function AdvancedSettingsDropdown({ call, project, projectType })
className={canonSpecification.title === 'Old Testament (OT)' ? 'bg-primary hover:bg-secondary text-white px-3 py-1 rounded-full cursor-pointer whitespace-nowrap' : 'bg-gray-200 hover:bg-primary hover:text-white px-3 py-1 rounded-full cursor-pointer whitespace-nowrap'}
onClick={() => selectCanon(canonList[1])}
role="button"
aria-label="old-testament"
tabIndex="0"
>
{`${t('label-old-testament')} (OT)`}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ function CustomMultiComboBox({
// displayValue={(language) => language?.ang}
displayValue={(selectedList) => `${selectedList.length > 0 ? `${selectedList[0][filterParams]}${multiSelect ? '... click for more' : '' }` : ''}`}
placeholder="Select Language"
aria-label="custom-dropdown"
onFocus={() => !open && setIsActive(true)}
onBlur={() => setIsActive(false)}
onChange={(event) => setQuery(event.target.value)}
Expand All @@ -54,7 +55,7 @@ function CustomMultiComboBox({
{filteredData.length > 0
? filteredData.map((data) => (
// <Combobox.Option key={data?.id || data?.pk} className={`${selectedList.includes(data) ? 'bg-gray-400' : ''} hover:bg-gray-300 p-1`} value={data}>
<Combobox.Option key={data?.id || data?.pk} className=" hover:bg-gray-300 p-1" value={data}>
<Combobox.Option key={data?.id || data?.pk} className=" hover:bg-gray-300 p-1" value={data} aria-label={data[filterParams]}>
{data[filterParams] }
{' '}
{showLangCode.show && (
Expand Down
2 changes: 1 addition & 1 deletion renderer/src/components/SnackBar/SnackBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const SnackBar = ({
>
<XMarkIcon />
</button>
<p>
<p aria-label="snack-text">
{snackText}
</p>
</div>
Expand Down
4 changes: 2 additions & 2 deletions renderer/src/layouts/projects/Layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,12 @@ export default function ProjectsLayout(props) {
{showArchived ? (
<>
<ComputerDesktopIcon className="h-4 mr-2 text-white" />
<span>{t('label-active')}</span>
<span aria-label="active-projects">{t('label-active')}</span>
</>
) : (
<>
<ArchiveBoxIcon className="h-4 mr-2 text-white" />
<span>{t('label-archived')}</span>
<span aria-label="archived-projects">{t('label-archived')}</span>
</>
)}
</button>
Expand Down
1 change: 1 addition & 0 deletions renderer/src/modules/projects/Profile.js
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ export default function UserProfile() {

<button
type="submit"
id="save-profile"
className=" w-20 h-9 bg-success shadow-md font-light text-white border-none text-xs leading-5 rounded uppercase mb-5"
>
{t('btn-save')}
Expand Down
Loading