Skip to content

Commit f6dfa3f

Browse files
committed
fix: fix the tests of gubbins
1 parent 2688537 commit f6dfa3f

4 files changed

Lines changed: 14 additions & 10 deletions

File tree

.github/workflows/diracx-web-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- name: Clone source
2626
run: |
2727
cd ..
28-
git clone https://github.com/DIRACGrid/diracx-charts.git
28+
git clone https://github.com/aldbr/diracx-charts.git -b main_FIX_diracx-web-install-resources
2929
3030
- name: Start demo
3131
run: |

.github/workflows/gubbins-test.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
# standalone setup. #
5454
prepare-gubbins-backend:
5555
runs-on: ubuntu-latest
56-
if: ${{ github.event_name != 'push' || github.repository == 'DIRACGrid/diracx-web' }}
56+
if: github.event_name == 'push' #${{ github.event_name != 'push' || github.repository == 'DIRACGrid/diracx-web' }}
5757
defaults:
5858
run:
5959
# We need extglob for REFERENCE_BRANCH substitution
@@ -152,7 +152,7 @@ jobs:
152152

153153
prepare-gubbins-frontend-as-a-standalone:
154154
runs-on: ubuntu-latest
155-
if: ${{ github.event_name != 'push' || github.repository == 'DIRACGrid/diracx-web' }}
155+
if: github.event_name == 'push' #${{ github.event_name != 'push' || github.repository == 'DIRACGrid/diracx-web' }}
156156
steps:
157157
- uses: actions/checkout@v4
158158

@@ -246,14 +246,14 @@ jobs:
246246
run-demo:
247247
runs-on: ubuntu-latest
248248
needs: [prepare-gubbins-frontend-as-a-standalone, prepare-gubbins-backend]
249-
if: github.event_name != 'push' || github.repository == 'DIRACGrid/diracx-web'
249+
if: github.event_name == 'push' #github.event_name != 'push' || github.repository == 'DIRACGrid/diracx-web'
250250
steps:
251251
- uses: actions/checkout@v4
252252

253253
- name: Clone source
254254
run: |
255255
cd ..
256-
git clone https://github.com/DIRACGrid/diracx-charts.git
256+
git clone https://github.com/TheauW/diracx-charts.git -b twartel-fix-ci
257257
258258
# ========================================================================#
259259
# WARNING: In your CI/CD pipeline, you should remove the following steps #

packages/extensions/test/e2e/loginOut.cy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ describe("Login and Logout", () => {
4343
// From now on the user is logged in
4444
// The login buttton should not be present anymore
4545
cy.get('[data-testid="button-login"]').should("not.exist");
46-
cy.contains("Hello admin").should("exist");
46+
cy.contains("Owners").should("exist");
4747

4848
// Click on the user avatar
4949
cy.get(".MuiAvatar-root").click();

packages/extensions/test/e2e/ownerMonitor.cy.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
describe("Job Monitor", () => {
44
beforeEach(() => {
55
cy.session("login", () => {
6-
cy.visit("/");
6+
cy.visit("/auth");
77
//login
88
cy.get('[data-testid="button-login"]').click();
99
cy.get("#login").type("admin@example.com");
@@ -17,12 +17,16 @@ describe("Job Monitor", () => {
1717
});
1818

1919
// Visit the page where the Job Monitor is rendered
20-
cy.visit(
21-
"/?appId=OwnerMonitor1&dashboard=%5B3Gubbins+Apps%27~extended%21true~items%21%5B-020.04~data%21%5B%5D%29%2C3Job2Job.Job4%29%5D%29%5D*Monitor-%28%27title%21%27.*1%27~type%21%270Owner2s%27~id%21%273-My+4+*%27%014320.-*_",
22-
);
20+
cy.window().then((win) => {
21+
win.sessionStorage.setItem(
22+
"savedDashboard",
23+
'[{"title":"Group 2","extended":true,"items":[{"title":"Owner Monitor","id":"JOwner Monitor0","type":"Owner Monitor"},{"title":"Owner Monitor 2","id":"Owner Monitor 21","type":"Owner Monitor"}]}]',
24+
);
25+
});
2326
});
2427

2528
it("should render the drawer", () => {
29+
cy.wait(20000);
2630
cy.get("header").contains("Owner Monitor").should("be.visible");
2731
});
2832

0 commit comments

Comments
 (0)