[Koha-bugs] [Bug 34076] [ALTERNATE] [DOCS] Automated screenshots using Cypress.io testing framework
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Thu Jul 20 18:58:53 CEST 2023
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34076
--- Comment #17 from Caroline Cyr La Rose <caroline.cyr-la-rose at inlibro.com> ---
With Jonathan's help, I was finally able to run KTD and Cypress. I don't
know/remember all the problems we ran into, but I apparently have to delete
/kohadevbox/Cypress from the docker (or something) because it doesn't work on
my computer (because I'm not 1000 or something).
docker exec -it koha-koha-1 bash
rm -rf /kohadevbox/Cypress
And I also needed to disable Wayland. Cypress opened with the long multi-line
command in step 2, but the window was just white with nothing else. Jonathan
found this
https://github.com/cypress-io/cypress/issues/20891#issuecomment-1375410342 I
needed to edit the /etc/gdm3/custom.conf file to uncomment #WaylandEnable=false
and then restart my computer. So far I haven't had side-effects from this
(crossed fingers).
I also ran in the same problem as Philip on step 0b (see comment #6). I had to
update node. I had to install nvm. I tried a lot of different things, cursed a
little bit too, so I'm not sure what worked in the end, but here are the
commands I did (found here https://blog.hubspot.com/website/update-node-js),
insert curses anywhere you see fit
node --version
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh |
bash
source ~/.bashrc
nvm -v
nvm install 18
yarn install
On step 5, all the tests end up red (they were all green in step 3), and I only
have 3 screenshots. I have a lot of languages installed on my Koha, I don't
know if that's why. I only enabled the 4 languages in the preferences on step
1c (en, fr-CA, fr-FR, es-ES), but I have like 6 or 7 language options in total.
Error in 0-language-ui.ts https://snipboard.io/NZo0Lm.jpg
Error in 1-sysprefs.ts https://snipboard.io/im6WlB.jpg
Error in 2-checkouts.ts https://snipboard.io/OJ6wVE.jpg
Error in 3-patrons.ts https://snipboard.io/4yj2w8.jpg
On step 6, removing the "first libraries 'it'" is lines 7 to 9 (it wasn't clear
to me where the element ended, so I had to go by trial and error).
1 describe("Libraries", function () {
2 beforeEach(() => {
3 cy.login();
4 cy.set_cookie_lang();
5 });
6
7 it("librarylist", function () {
8 assert(true);
9 });
10
11 /* ==== Test Created with Cypress Studio ==== */
12 it('librarylist', function() {
13 /* ==== Generated with Cypress Studio ==== */
14 cy.get(':nth-child(2) > .biglinks-list > :nth-child(6) >
.icon_general').click();
15 cy.get(':nth-child(1) > :nth-child(4) > :nth-child(1) >
a').click();
16 cy.get('main').should('be.visible');
17 /* ==== End Cypress Studio ==== */
18 });
19 });
In step 6 still, the first commit command didn't work for me, I think because
the file did not exist before (nothing added to commit but untracked files
present (use "git add" to track)), so I did
git add 4-library.ts
git commit -m "auto librarylist"
I did this in ktd --shell, but I think it might have worked in my host too, I'm
not sure.
Haven't tried step 7 yet...
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list